Search is not available for this dataset
repo stringlengths 2 152 ⌀ | file stringlengths 15 239 | code stringlengths 0 58.4M | file_length int64 0 58.4M | avg_line_length float64 0 1.81M | max_line_length int64 0 12.7M | extension_type stringclasses 364
values |
|---|---|---|---|---|---|---|
null | ceph-main/qa/tasks/thrashosds.py | """
Thrash -- Simulate random osd failures.
"""
import contextlib
import logging
from tasks import ceph_manager
from teuthology import misc as teuthology
log = logging.getLogger(__name__)
@contextlib.contextmanager
def task(ctx, config):
"""
"Thrash" the OSDs by randomly marking them out/down (and then back
... | 8,661 | 38.018018 | 149 | py |
null | ceph-main/qa/tasks/tox.py | import argparse
import contextlib
import logging
from teuthology import misc as teuthology
from teuthology.orchestra import run
log = logging.getLogger(__name__)
def get_toxvenv_dir(ctx):
return '{tdir}/tox-venv'.format(tdir=teuthology.get_testdir(ctx))
@contextlib.contextmanager
def task(ctx, config):
"""... | 1,662 | 31.607843 | 82 | py |
null | ceph-main/qa/tasks/userdata_setup.yaml | #cloud-config-archive
- type: text/cloud-config
content: |
output:
all: '| tee -a /var/log/cloud-init-output.log'
# allow passwordless access for debugging
- |
#!/usr/bin/env bash
exec passwd -d ubuntu
- |
#!/usr/bin/env bash
# mount a NFS share for storing logs
sed -i 's/archive.ubuntu.com/ol... | 1,161 | 30.405405 | 98 | yaml |
null | ceph-main/qa/tasks/userdata_teardown.yaml | - |
#!/usr/bin/env bash
cp /var/log/cloud-init-output.log /mnt/log
- |
#!/usr/bin/env bash
umount /mnt/log
- |
#!/usr/bin/env bash
shutdown -h -P now
| 164 | 12.75 | 44 | yaml |
null | ceph-main/qa/tasks/vault.py | """
Deploy and configure Vault for Teuthology
"""
import argparse
import contextlib
import logging
import time
import json
from os import path
from http import client as http_client
from urllib.parse import urljoin
from teuthology import misc as teuthology
from teuthology import contextutil
from teuthology.orchestra ... | 9,344 | 31.33564 | 126 | py |
null | ceph-main/qa/tasks/vip.py | import contextlib
import ipaddress
import logging
import re
from teuthology import misc as teuthology
from teuthology.config import config as teuth_config
log = logging.getLogger(__name__)
def subst_vip(ctx, cmd):
p = re.compile(r'({{VIP(\d+)}})')
for m in p.findall(cmd):
n = int(m[1])
if n ... | 6,936 | 32.674757 | 105 | py |
null | ceph-main/qa/tasks/vstart_runner.py | """
vstart_runner: override Filesystem and Mount interfaces to run a CephFSTestCase against a vstart
ceph instance instead of a packaged/installed cluster. Use this to turn around test cases
quickly during development.
Simple usage (assuming teuthology and ceph checked out in ~/git):
# Activate the teuthology vi... | 54,022 | 34.611734 | 174 | py |
null | ceph-main/qa/tasks/watch_notify_same_primary.py |
"""
watch_notify_same_primary task
"""
from io import StringIO
import contextlib
import logging
from teuthology.orchestra import run
from teuthology.contextutil import safe_while
log = logging.getLogger(__name__)
@contextlib.contextmanager
def task(ctx, config):
"""
Run watch_notify_same_primary
The ... | 3,242 | 23.946154 | 74 | py |
null | ceph-main/qa/tasks/watch_notify_stress.py | """
test_stress_watch task
"""
import contextlib
import logging
from teuthology.orchestra import run
from teuthology.task import proc_thrasher
log = logging.getLogger(__name__)
@contextlib.contextmanager
def task(ctx, config):
"""
Run test_stress_watch
The config should be as follows:
test_stress_... | 1,634 | 22.357143 | 75 | py |
null | ceph-main/qa/tasks/workunit.py | """
Workunit task -- Run ceph on sets of specific clients
"""
import logging
import pipes
import os
import re
import shlex
from tasks.util import get_remote_for_role
from tasks.util.workunit import get_refspec_after_overrides
from teuthology import misc
from teuthology.config import config as teuth_config
from teutho... | 15,308 | 33.793182 | 98 | py |
null | ceph-main/qa/tasks/cephadm_cases/__init__.py | 0 | 0 | 0 | py | |
null | ceph-main/qa/tasks/cephadm_cases/test_cli.py | import json
import logging
import time
from tasks.mgr.mgr_test_case import MgrTestCase
from teuthology.contextutil import safe_while
log = logging.getLogger(__name__)
class TestCephadmCLI(MgrTestCase):
def _cmd(self, *args) -> str:
assert self.mgr_cluster is not None
return self.mgr_cluster.mon_... | 2,465 | 32.324324 | 104 | py |
null | ceph-main/qa/tasks/cephadm_cases/test_cli_mon.py | import json
import logging
from tasks.mgr.mgr_test_case import MgrTestCase
log = logging.getLogger(__name__)
class TestCephadmCLI(MgrTestCase):
APPLY_MON_PERIOD = 60
def _cmd(self, *args) -> str:
assert self.mgr_cluster is not None
return self.mgr_cluster.mon_manager.raw_cluster_cmd(*args)... | 2,509 | 34.352113 | 88 | py |
null | ceph-main/qa/tasks/cephfs/__init__.py | 0 | 0 | 0 | py | |
null | ceph-main/qa/tasks/cephfs/caps_helper.py | """
Helper methods to test that MON and MDS caps are enforced properly.
"""
from os.path import join as os_path_join
from logging import getLogger
from textwrap import dedent
from teuthology.orchestra.run import Raw
log = getLogger(__name__)
def gen_mon_cap_str(caps):
"""
Accepts a tuple of tuples, where t... | 11,393 | 34.495327 | 79 | py |
null | ceph-main/qa/tasks/cephfs/cephfs_test_case.py | import json
import logging
import os
import re
from io import StringIO
from tasks.ceph_test_case import CephTestCase
from teuthology import contextutil
from teuthology.orchestra import run
from teuthology.exceptions import CommandFailedError
log = logging.getLogger(__name__)
def for_teuthology(f):
"""
Decor... | 19,099 | 40.341991 | 125 | py |
null | ceph-main/qa/tasks/cephfs/filesystem.py |
import json
import logging
from gevent import Greenlet
import os
import time
import datetime
import re
import errno
import random
from io import BytesIO, StringIO
from errno import EBUSY
from teuthology.exceptions import CommandFailedError
from teuthology import misc
from teuthology.nuke import clear_firewall
from t... | 63,765 | 36.181341 | 134 | py |
null | ceph-main/qa/tasks/cephfs/fuse_mount.py | import json
import time
import logging
from io import StringIO
from textwrap import dedent
from teuthology.contextutil import MaxWhileTries
from teuthology.contextutil import safe_while
from teuthology.orchestra import run
from teuthology.exceptions import CommandFailedError
from tasks.ceph_manager import get_valgrin... | 19,573 | 35.655431 | 115 | py |
null | ceph-main/qa/tasks/cephfs/kernel_mount.py | import errno
import json
import logging
import os
import re
from io import StringIO
from textwrap import dedent
from teuthology.exceptions import CommandFailedError
from teuthology.orchestra import run
from teuthology.contextutil import MaxWhileTries
from tasks.cephfs.mount import CephFSMount, UMOUNT_TIMEOUT
log = ... | 13,672 | 33.880102 | 133 | py |
null | ceph-main/qa/tasks/cephfs/mount.py | import hashlib
import json
import logging
import datetime
import os
import re
import time
from io import StringIO
from contextlib import contextmanager
from textwrap import dedent
from IPy import IP
from teuthology.contextutil import safe_while
from teuthology.misc import get_file, write_file
from teuthology.orchestr... | 55,146 | 34.464309 | 130 | py |
null | ceph-main/qa/tasks/cephfs/test_acls.py | from logging import getLogger
from io import StringIO
from tasks.cephfs.xfstests_dev import XFSTestsDev
log = getLogger(__name__)
class TestACLs(XFSTestsDev):
def test_acls(self):
from tasks.cephfs.fuse_mount import FuseMount
from tasks.cephfs.kernel_mount import KernelMount
if isinst... | 1,502 | 36.575 | 86 | py |
null | ceph-main/qa/tasks/cephfs/test_admin.py | import errno
import json
import logging
import time
import uuid
from io import StringIO
from os.path import join as os_path_join
from teuthology.exceptions import CommandFailedError
from tasks.cephfs.cephfs_test_case import CephFSTestCase
from tasks.cephfs.filesystem import FileLayout, FSMissing
from tasks.cephfs.fus... | 57,479 | 38.614059 | 122 | py |
null | ceph-main/qa/tasks/cephfs/test_auto_repair.py |
"""
Exercise the MDS's auto repair functions
"""
import logging
import time
from teuthology.exceptions import CommandFailedError
from tasks.cephfs.cephfs_test_case import CephFSTestCase
log = logging.getLogger(__name__)
# Arbitrary timeouts for operations involving restarting
# an MDS or waiting for it to come u... | 2,592 | 28.134831 | 85 | py |
null | ceph-main/qa/tasks/cephfs/test_backtrace.py |
from tasks.cephfs.cephfs_test_case import CephFSTestCase
from tasks.cephfs.filesystem import ObjectNotFound
class TestBacktrace(CephFSTestCase):
def test_backtrace(self):
"""
That the 'parent' 'layout' and 'symlink' xattrs on the head objects of files
are updated correctly.
"""
... | 5,038 | 47.92233 | 105 | py |
null | ceph-main/qa/tasks/cephfs/test_cap_flush.py |
import os
import time
from textwrap import dedent
from tasks.cephfs.cephfs_test_case import CephFSTestCase, for_teuthology
class TestCapFlush(CephFSTestCase):
@for_teuthology
def test_replay_create(self):
"""
MDS starts to handle client caps when it enters clientreplay stage.
When hand... | 2,130 | 35.118644 | 96 | py |
null | ceph-main/qa/tasks/cephfs/test_cephfs_shell.py | """
NOTE: For running this tests locally (using vstart_runner.py), export the
path to src/tools/cephfs/shell/cephfs-shell module to $PATH. Running
"export PATH=$PATH:$(cd ../src/tools/cephfs/shell && pwd)" from the build dir
will update the environment without hassles of typing the path correctly.
"""
from io import St... | 45,469 | 37.963153 | 80 | py |
null | ceph-main/qa/tasks/cephfs/test_client_limits.py |
"""
Exercise the MDS's behaviour when clients and the MDCache reach or
exceed the limits of how many caps/inodes they should hold.
"""
import logging
from textwrap import dedent
from tasks.ceph_test_case import TestTimeoutError
from tasks.cephfs.cephfs_test_case import CephFSTestCase, needs_trimming
from tasks.cephfs... | 13,471 | 40.198777 | 118 | py |
null | ceph-main/qa/tasks/cephfs/test_client_recovery.py |
"""
Teuthology task for exercising CephFS client recovery
"""
import logging
import random
import signal
from textwrap import dedent
import time
import distutils.version as version
import re
import os
from teuthology.orchestra import run
from teuthology.exceptions import CommandFailedError
from tasks.cephfs.fuse_mou... | 31,476 | 35.347575 | 112 | py |
null | ceph-main/qa/tasks/cephfs/test_damage.py | from io import BytesIO, StringIO
import json
import logging
import errno
import re
import time
from teuthology.contextutil import MaxWhileTries
from teuthology.exceptions import CommandFailedError
from teuthology.orchestra.run import wait
from tasks.cephfs.fuse_mount import FuseMount
from tasks.cephfs.cephfs_test_case ... | 26,918 | 39.60181 | 125 | py |
null | ceph-main/qa/tasks/cephfs/test_data_scan.py |
"""
Test our tools for recovering metadata from the data pool
"""
import json
import logging
import os
import time
import traceback
import stat
from io import BytesIO, StringIO
from collections import namedtuple, defaultdict
from textwrap import dedent
from teuthology.exceptions import CommandFailedError
from tasks... | 31,731 | 38.814304 | 123 | py |
null | ceph-main/qa/tasks/cephfs/test_dump_tree.py | from tasks.cephfs.cephfs_test_case import CephFSTestCase
import random
import os
class TestDumpTree(CephFSTestCase):
def get_paths_to_ino(self):
inos = {}
p = self.mount_a.run_shell(["find", "./"])
paths = p.stdout.getvalue().strip().split()
for path in paths:
inos[path]... | 2,364 | 34.298507 | 76 | py |
null | ceph-main/qa/tasks/cephfs/test_exports.py | import logging
import random
import time
from tasks.cephfs.fuse_mount import FuseMount
from tasks.cephfs.cephfs_test_case import CephFSTestCase
from teuthology.exceptions import CommandFailedError
log = logging.getLogger(__name__)
class TestExports(CephFSTestCase):
MDSS_REQUIRED = 2
CLIENTS_REQUIRED = 2
... | 23,209 | 38.811321 | 139 | py |
null | ceph-main/qa/tasks/cephfs/test_failover.py | import time
import signal
import logging
import operator
from random import randint, choice
from tasks.cephfs.cephfs_test_case import CephFSTestCase
from teuthology.exceptions import CommandFailedError
from tasks.cephfs.fuse_mount import FuseMount
log = logging.getLogger(__name__)
class TestClusterAffinity(CephFSTes... | 31,542 | 37.514042 | 112 | py |
null | ceph-main/qa/tasks/cephfs/test_flush.py |
from textwrap import dedent
from tasks.cephfs.cephfs_test_case import CephFSTestCase
from tasks.cephfs.filesystem import ObjectNotFound, ROOT_INO
class TestFlush(CephFSTestCase):
def test_flush(self):
self.mount_a.run_shell(["mkdir", "mydir"])
self.mount_a.run_shell(["touch", "mydir/alpha"])
... | 5,001 | 43.265487 | 122 | py |
null | ceph-main/qa/tasks/cephfs/test_forward_scrub.py |
"""
Test that the forward scrub functionality can traverse metadata and apply
requested tags, on well formed metadata.
This is *not* the real testing for forward scrub, which will need to test
how the functionality responds to damaged metadata.
"""
import logging
import json
from collections import namedtuple
from ... | 11,812 | 37.353896 | 96 | py |
null | ceph-main/qa/tasks/cephfs/test_fragment.py | from io import StringIO
from tasks.cephfs.cephfs_test_case import CephFSTestCase
from teuthology.orchestra import run
import os
import time
import logging
log = logging.getLogger(__name__)
class TestFragmentation(CephFSTestCase):
CLIENTS_REQUIRED = 1
MDSS_REQUIRED = 1
def get_splits(self):
retu... | 12,308 | 33.286908 | 101 | py |
null | ceph-main/qa/tasks/cephfs/test_fscrypt.py | from logging import getLogger
from io import StringIO
from tasks.cephfs.xfstests_dev import XFSTestsDev
log = getLogger(__name__)
class TestFscrypt(XFSTestsDev):
def setup_xfsprogs_devs(self):
self.install_xfsprogs = True
def test_fscrypt_encrypt(self):
# XXX: check_status is set to False... | 2,796 | 44.852459 | 91 | py |
null | ceph-main/qa/tasks/cephfs/test_fstop.py | import logging
import json
from tasks.cephfs.cephfs_test_case import CephFSTestCase
from teuthology.exceptions import CommandFailedError
from teuthology.contextutil import safe_while
log = logging.getLogger(__name__)
class TestFSTop(CephFSTestCase):
CLIENTS_REQUIRED = 2
def setUp(self):
super(TestF... | 3,788 | 31.947826 | 85 | py |
null | ceph-main/qa/tasks/cephfs/test_full.py | import json
import logging
import os
from textwrap import dedent
from typing import Optional
from teuthology.exceptions import CommandFailedError
from tasks.cephfs.fuse_mount import FuseMount
from tasks.cephfs.cephfs_test_case import CephFSTestCase
log = logging.getLogger(__name__)
class FullnessTestCase(CephFSTest... | 16,812 | 41.137845 | 113 | py |
null | ceph-main/qa/tasks/cephfs/test_journal_migration.py |
from tasks.cephfs.cephfs_test_case import CephFSTestCase
from tasks.workunit import task as workunit
JOURNAL_FORMAT_LEGACY = 0
JOURNAL_FORMAT_RESILIENT = 1
class TestJournalMigration(CephFSTestCase):
CLIENTS_REQUIRED = 1
MDSS_REQUIRED = 2
def test_journal_migration(self):
old_journal_version = ... | 3,928 | 37.90099 | 99 | py |
null | ceph-main/qa/tasks/cephfs/test_journal_repair.py |
"""
Test our tools for recovering the content of damaged journals
"""
import json
import logging
from textwrap import dedent
import time
from teuthology.exceptions import CommandFailedError, ConnectionLostError
from tasks.cephfs.filesystem import ObjectNotFound, ROOT_INO
from tasks.cephfs.cephfs_test_case import Cep... | 16,591 | 39.866995 | 122 | py |
null | ceph-main/qa/tasks/cephfs/test_mantle.py | from io import StringIO
from tasks.cephfs.cephfs_test_case import CephFSTestCase
import json
import logging
log = logging.getLogger(__name__)
failure = "using old balancer; mantle failed for balancer="
success = "mantle balancer version changed: "
class TestMantle(CephFSTestCase):
def start_mantle(self):
... | 4,451 | 38.75 | 93 | py |
null | ceph-main/qa/tasks/cephfs/test_mds_metrics.py | import os
import json
import time
import random
import logging
import errno
from teuthology.contextutil import safe_while, MaxWhileTries
from teuthology.exceptions import CommandFailedError
from tasks.cephfs.cephfs_test_case import CephFSTestCase
log = logging.getLogger(__name__)
class TestMDSMetrics(CephFSTestCase)... | 24,654 | 37.284161 | 106 | py |
null | ceph-main/qa/tasks/cephfs/test_meta_injection.py | from tasks.cephfs.cephfs_test_case import CephFSTestCase
class TestMetaInjection(CephFSTestCase):
def test_meta_injection(self):
conf_ori = self.fs.mds_asok(['config', 'show'])
self.fs.mds_asok(['config', 'set', 'mds_log_max_segments', '1'])
self.mount_a.run_shell(["mkdir", "metadir"])
... | 2,013 | 50.641026 | 119 | py |
null | ceph-main/qa/tasks/cephfs/test_mirroring.py | import os
import json
import errno
import logging
import random
import time
from io import StringIO
from collections import deque
from tasks.cephfs.cephfs_test_case import CephFSTestCase
from teuthology.exceptions import CommandFailedError
from teuthology.contextutil import safe_while
log = logging.getLogger(__name_... | 61,612 | 46.10474 | 127 | py |
null | ceph-main/qa/tasks/cephfs/test_misc.py | from io import StringIO
from tasks.cephfs.fuse_mount import FuseMount
from tasks.cephfs.cephfs_test_case import CephFSTestCase
from teuthology.exceptions import CommandFailedError
from textwrap import dedent
from threading import Thread
import errno
import platform
import time
import json
import logging
import os
impo... | 26,684 | 39.493171 | 110 | py |
null | ceph-main/qa/tasks/cephfs/test_multifs_auth.py | """
Test for Ceph clusters with multiple FSs.
"""
import logging
from tasks.cephfs.cephfs_test_case import CephFSTestCase
from tasks.cephfs.caps_helper import (MonCapTester, MdsCapTester,
gen_mon_cap_str, gen_osd_cap_str,
gen_mds_cap_str)
fro... | 13,408 | 41.568254 | 78 | py |
null | ceph-main/qa/tasks/cephfs/test_multimds_misc.py | import logging
import errno
from tasks.cephfs.cephfs_test_case import CephFSTestCase
from teuthology.contextutil import safe_while
from teuthology.exceptions import CommandFailedError
log = logging.getLogger(__name__)
class TestScrub2(CephFSTestCase):
MDSS_REQUIRED = 3
CLIENTS_REQUIRED = 1
def _check_scr... | 8,573 | 37.276786 | 100 | py |
null | ceph-main/qa/tasks/cephfs/test_newops.py | import logging
from tasks.cephfs.cephfs_test_case import CephFSTestCase
log = logging.getLogger(__name__)
class TestNewOps(CephFSTestCase):
def test_newops_getvxattr(self):
"""
For nautilus it will crash the MDSs when receive unknown OPs, as a workaround
the clients should avoid sending th... | 651 | 33.315789 | 85 | py |
null | ceph-main/qa/tasks/cephfs/test_nfs.py | # NOTE: these tests are not yet compatible with vstart_runner.py.
import errno
import json
import time
import logging
from io import BytesIO, StringIO
from tasks.mgr.mgr_test_case import MgrTestCase
from teuthology import contextutil
from teuthology.exceptions import CommandFailedError
log = logging.getLogger(__name_... | 36,773 | 40.836177 | 104 | py |
null | ceph-main/qa/tasks/cephfs/test_openfiletable.py | import time
import logging
from tasks.cephfs.cephfs_test_case import CephFSTestCase
log = logging.getLogger(__name__)
class OpenFileTable(CephFSTestCase):
CLIENTS_REQUIRED = 1
MDSS_REQUIRED = 1
def _check_oft_counter(self, name, count):
perf_dump = self.fs.mds_asok(['perf', 'dump'])
if pe... | 3,151 | 35.651163 | 100 | py |
null | ceph-main/qa/tasks/cephfs/test_pool_perm.py | from textwrap import dedent
from teuthology.exceptions import CommandFailedError
from tasks.cephfs.cephfs_test_case import CephFSTestCase
import os
class TestPoolPerm(CephFSTestCase):
def test_pool_perm(self):
self.mount_a.run_shell(["touch", "test_file"])
file_path = os.path.join(self.mount_a.mo... | 4,005 | 35.418182 | 92 | py |
null | ceph-main/qa/tasks/cephfs/test_quota.py |
from tasks.cephfs.cephfs_test_case import CephFSTestCase
from teuthology.exceptions import CommandFailedError
class TestQuota(CephFSTestCase):
CLIENTS_REQUIRED = 2
MDSS_REQUIRED = 1
def test_remote_update_getfattr(self):
"""
That quota changes made from one client are visible to another
... | 6,308 | 37.705521 | 83 | py |
null | ceph-main/qa/tasks/cephfs/test_readahead.py | import logging
from tasks.cephfs.cephfs_test_case import CephFSTestCase
log = logging.getLogger(__name__)
class TestReadahead(CephFSTestCase):
def test_flush(self):
# Create 32MB file
self.mount_a.run_shell(["dd", "if=/dev/urandom", "of=foo", "bs=1M", "count=32"])
# Unmount and remount t... | 1,031 | 37.222222 | 94 | py |
null | ceph-main/qa/tasks/cephfs/test_recovery_fs.py | import logging
from os.path import join as os_path_join
from tasks.cephfs.cephfs_test_case import CephFSTestCase
log = logging.getLogger(__name__)
class TestFSRecovery(CephFSTestCase):
"""
Tests for recovering FS after loss of FSMap
"""
CLIENTS_REQUIRED = 1
MDSS_REQUIRED = 3
def test_recove... | 1,483 | 37.051282 | 74 | py |
null | ceph-main/qa/tasks/cephfs/test_recovery_pool.py | """
Test our tools for recovering metadata from the data pool into an alternate pool
"""
import logging
import traceback
from collections import namedtuple
from teuthology.exceptions import CommandFailedError
from tasks.cephfs.cephfs_test_case import CephFSTestCase
log = logging.getLogger(__name__)
ValidationError... | 7,029 | 38.055556 | 118 | py |
null | ceph-main/qa/tasks/cephfs/test_scrub.py | """
Test CephFS scrub (distinct from OSD scrub) functionality
"""
from io import BytesIO
import logging
from collections import namedtuple
from tasks.cephfs.cephfs_test_case import CephFSTestCase
log = logging.getLogger(__name__)
ValidationError = namedtuple("ValidationError", ["exception", "backtrace"])
class Wo... | 6,745 | 34.882979 | 104 | py |
null | ceph-main/qa/tasks/cephfs/test_scrub_checks.py | """
MDS admin socket scrubbing-related tests.
"""
import json
import logging
import errno
import time
from teuthology.exceptions import CommandFailedError
from teuthology.contextutil import safe_while
import os
from tasks.cephfs.cephfs_test_case import CephFSTestCase
log = logging.getLogger(__name__)
class TestScrubC... | 17,530 | 36.863931 | 103 | py |
null | ceph-main/qa/tasks/cephfs/test_sessionmap.py | import time
import json
import logging
from tasks.cephfs.fuse_mount import FuseMount
from teuthology.exceptions import CommandFailedError
from tasks.cephfs.cephfs_test_case import CephFSTestCase
log = logging.getLogger(__name__)
class TestSessionMap(CephFSTestCase):
CLIENTS_REQUIRED = 2
MDSS_REQUIRED = 2
... | 9,335 | 39.06867 | 112 | py |
null | ceph-main/qa/tasks/cephfs/test_snap_schedules.py | import os
import json
import time
import errno
import logging
from tasks.cephfs.cephfs_test_case import CephFSTestCase
from teuthology.exceptions import CommandFailedError
from datetime import datetime, timedelta
log = logging.getLogger(__name__)
def extract_schedule_and_retention_spec(spec=[]):
schedule = set([... | 23,455 | 40.515044 | 130 | py |
null | ceph-main/qa/tasks/cephfs/test_snapshots.py | import errno
import logging
import signal
from textwrap import dedent
from tasks.cephfs.fuse_mount import FuseMount
from tasks.cephfs.cephfs_test_case import CephFSTestCase
from teuthology.orchestra.run import Raw
from teuthology.exceptions import CommandFailedError
log = logging.getLogger(__name__)
MDS_RESTART_GRACE... | 26,553 | 42.818482 | 116 | py |
null | ceph-main/qa/tasks/cephfs/test_strays.py | import json
import time
import logging
from textwrap import dedent
import datetime
import gevent
from teuthology.exceptions import CommandFailedError
from teuthology.orchestra.run import Raw
from tasks.cephfs.cephfs_test_case import CephFSTestCase, for_teuthology
log = logging.getLogger(__name__)
class TestStrays(C... | 39,750 | 37.70594 | 140 | py |
null | ceph-main/qa/tasks/cephfs/test_subvolume.py | import logging
from tasks.cephfs.cephfs_test_case import CephFSTestCase
from teuthology.exceptions import CommandFailedError
log = logging.getLogger(__name__)
class TestSubvolume(CephFSTestCase):
CLIENTS_REQUIRED = 1
MDSS_REQUIRED = 1
def setUp(self):
super().setUp()
self.setup_test()
... | 6,671 | 38.017544 | 79 | py |
null | ceph-main/qa/tasks/cephfs/test_volumes.py | import os
import json
import time
import errno
import random
import logging
import collections
import uuid
import unittest
from hashlib import md5
from textwrap import dedent
from io import StringIO
from tasks.cephfs.cephfs_test_case import CephFSTestCase
from tasks.cephfs.fuse_mount import FuseMount
from teuthology.e... | 342,867 | 42.296881 | 160 | py |
null | ceph-main/qa/tasks/cephfs/tests_from_xfstests_dev.py | from logging import getLogger
from tasks.cephfs.xfstests_dev import XFSTestsDev
log = getLogger(__name__)
class TestXFSTestsDev(XFSTestsDev):
def test_generic(self):
self.run_generic_tests()
| 209 | 15.153846 | 49 | py |
null | ceph-main/qa/tasks/cephfs/xfstests_dev.py | from io import StringIO
from logging import getLogger
from os import getcwd as os_getcwd
from os.path import join
from textwrap import dedent
from tasks.cephfs.cephfs_test_case import CephFSTestCase
from tasks.cephfs.fuse_mount import FuseMount
from tasks.cephfs.kernel_mount import KernelMount
log = getLogger(__nam... | 18,007 | 42.497585 | 95 | py |
null | ceph-main/qa/tasks/mgr/__init__.py | 0 | 0 | 0 | py | |
null | ceph-main/qa/tasks/mgr/mgr_test_case.py | import json
import logging
from unittest import SkipTest
from teuthology import misc
from tasks.ceph_test_case import CephTestCase
# TODO move definition of CephCluster away from the CephFS stuff
from tasks.cephfs.filesystem import CephCluster
log = logging.getLogger(__name__)
class MgrCluster(CephCluster):
... | 8,534 | 35.630901 | 99 | py |
null | ceph-main/qa/tasks/mgr/test_cache.py | import json
from .mgr_test_case import MgrTestCase
class TestCache(MgrTestCase):
def setUp(self):
super(TestCache, self).setUp()
self.setup_mgrs()
self._load_module("cli_api")
self.ttl = 10
self.enable_cache(self.ttl)
def tearDown(self):
self.disable_cache()
... | 2,474 | 28.464286 | 86 | py |
null | ceph-main/qa/tasks/mgr/test_crash.py | import json
import logging
import datetime
from .mgr_test_case import MgrTestCase
log = logging.getLogger(__name__)
UUID = 'd5775432-0742-44a3-a435-45095e32e6b1'
DATEFMT = '%Y-%m-%d %H:%M:%S.%f'
class TestCrash(MgrTestCase):
def setUp(self):
super(TestCrash, self).setUp()
self.setup_mgrs()
... | 3,380 | 30.018349 | 68 | py |
null | ceph-main/qa/tasks/mgr/test_dashboard.py | import logging
import ssl
import requests
from requests.adapters import HTTPAdapter
from .mgr_test_case import MgrTestCase
log = logging.getLogger(__name__)
class TestDashboard(MgrTestCase):
MGRS_REQUIRED = 3
def setUp(self):
super(TestDashboard, self).setUp()
self._assign_ports("dashboar... | 7,149 | 39.168539 | 95 | py |
null | ceph-main/qa/tasks/mgr/test_failover.py |
import logging
import json
from .mgr_test_case import MgrTestCase
log = logging.getLogger(__name__)
class TestFailover(MgrTestCase):
MGRS_REQUIRED = 2
def setUp(self):
super(TestFailover, self).setUp()
self.setup_mgrs()
def test_timeout(self):
"""
That when an active ... | 6,107 | 32.377049 | 100 | py |
null | ceph-main/qa/tasks/mgr/test_insights.py | import logging
import json
import datetime
import time
from .mgr_test_case import MgrTestCase
log = logging.getLogger(__name__)
UUID = 'd5775432-0742-44a3-a435-45095e32e6b2'
DATEFMT = '%Y-%m-%d %H:%M:%S.%f'
class TestInsights(MgrTestCase):
def setUp(self):
super(TestInsights, self).setUp()
self.... | 6,853 | 34.512953 | 84 | py |
null | ceph-main/qa/tasks/mgr/test_module_selftest.py |
import time
import requests
import errno
import logging
from teuthology.exceptions import CommandFailedError
from .mgr_test_case import MgrTestCase
log = logging.getLogger(__name__)
class TestModuleSelftest(MgrTestCase):
"""
That modules with a self-test command can be loaded and execute it
without e... | 9,787 | 37.384314 | 81 | py |
null | ceph-main/qa/tasks/mgr/test_orchestrator_cli.py | import errno
import json
import logging
from .mgr_test_case import MgrTestCase
log = logging.getLogger(__name__)
class TestOrchestratorCli(MgrTestCase):
MGRS_REQUIRED = 1
def _cmd(self, module, *args):
return self.mgr_cluster.mon_manager.raw_cluster_cmd(module, *args)
def _orch_cmd(self, *ar... | 8,477 | 32.776892 | 104 | py |
null | ceph-main/qa/tasks/mgr/test_progress.py |
import json
import logging
import time
from .mgr_test_case import MgrTestCase
from contextlib import contextmanager
log = logging.getLogger(__name__)
class TestProgress(MgrTestCase):
POOL = "progress_data"
# How long we expect to wait at most between taking an OSD out
# and seeing the progress event po... | 14,713 | 33.70283 | 89 | py |
null | ceph-main/qa/tasks/mgr/test_prometheus.py | import json
import logging
import requests
from .mgr_test_case import MgrTestCase
log = logging.getLogger(__name__)
class TestPrometheus(MgrTestCase):
MGRS_REQUIRED = 3
def setUp(self):
super(TestPrometheus, self).setUp()
self.setup_mgrs()
def test_file_sd_command(self):
self._... | 2,507 | 30.35 | 81 | py |
null | ceph-main/qa/tasks/mgr/dashboard/__init__.py | DEFAULT_API_VERSION = '1.0'
| 28 | 13.5 | 27 | py |
null | ceph-main/qa/tasks/mgr/dashboard/helper.py | # -*- coding: utf-8 -*-
# pylint: disable=W0212,too-many-return-statements,too-many-public-methods
from __future__ import absolute_import
import json
import logging
import random
import re
import string
import time
from collections import namedtuple
from typing import List
import requests
from tasks.mgr.mgr_test_case... | 25,696 | 34.444138 | 100 | py |
null | ceph-main/qa/tasks/mgr/dashboard/test_api.py | # -*- coding: utf-8 -*-
from __future__ import absolute_import
import unittest
from . import DEFAULT_API_VERSION
from .helper import DashboardTestCase
class VersionReqTest(DashboardTestCase, unittest.TestCase):
def test_version(self):
for (version, expected_status) in [
(DEFAULT_API_VER... | 561 | 25.761905 | 59 | py |
null | ceph-main/qa/tasks/mgr/dashboard/test_auth.py | # -*- coding: utf-8 -*-
from __future__ import absolute_import
import time
import jwt
from teuthology.orchestra.run import \
CommandFailedError # pylint: disable=import-error
from .helper import DashboardTestCase, JLeaf, JObj
class AuthTest(DashboardTestCase):
AUTO_AUTHENTICATE = False
def setUp(se... | 14,445 | 39.923513 | 97 | py |
null | ceph-main/qa/tasks/mgr/dashboard/test_cephfs.py | # -*- coding: utf-8 -*-
# pylint: disable=too-many-public-methods
from contextlib import contextmanager
from .helper import DashboardTestCase, JLeaf, JList, JObj
class CephfsTest(DashboardTestCase):
CEPHFS = True
AUTH_ROLES = ['cephfs-manager']
QUOTA_PATH = '/quotas'
def assertToHave(self, data, ... | 9,874 | 32.703072 | 87 | py |
null | ceph-main/qa/tasks/mgr/dashboard/test_cluster.py | from .helper import DashboardTestCase, JLeaf, JObj
class ClusterTest(DashboardTestCase):
def setUp(self):
super().setUp()
self.reset_session()
def test_get_status(self):
data = self._get('/api/cluster', version='0.1')
self.assertStatus(200)
self.assertSchema(data, JOb... | 686 | 27.625 | 55 | py |
null | ceph-main/qa/tasks/mgr/dashboard/test_cluster_configuration.py | from __future__ import absolute_import
from .helper import DashboardTestCase
class ClusterConfigurationTest(DashboardTestCase):
def test_list(self):
data = self._get('/api/cluster_conf')
self.assertStatus(200)
self.assertIsInstance(data, list)
self.assertGreater(len(data), 1000)
... | 15,716 | 38.390977 | 98 | py |
null | ceph-main/qa/tasks/mgr/dashboard/test_crush_rule.py | # -*- coding: utf-8 -*-
from __future__ import absolute_import
from .helper import DashboardTestCase, JList, JObj
class CrushRuleTest(DashboardTestCase):
AUTH_ROLES = ['pool-manager']
rule_schema = JObj(sub_elems={
'rule_id': int,
'rule_name': str,
'steps': JList(JObj({}, allow_unk... | 2,801 | 31.964706 | 81 | py |
null | ceph-main/qa/tasks/mgr/dashboard/test_erasure_code_profile.py | # -*- coding: utf-8 -*-
from __future__ import absolute_import
from .helper import DashboardTestCase, JList, JObj
class ECPTest(DashboardTestCase):
AUTH_ROLES = ['pool-manager']
@DashboardTestCase.RunAs('test', 'test', ['rgw-manager'])
def test_read_access_permissions(self):
self._get('/api/er... | 3,388 | 30.971698 | 88 | py |
null | ceph-main/qa/tasks/mgr/dashboard/test_feedback.py | import time
from .helper import DashboardTestCase
class FeedbackTest(DashboardTestCase):
@classmethod
def setUpClass(cls):
super().setUpClass()
cls._ceph_cmd(['mgr', 'module', 'enable', 'feedback'])
time.sleep(10)
def test_create_api_key(self):
self._post('/api/feedback/... | 1,306 | 34.324324 | 97 | py |
null | ceph-main/qa/tasks/mgr/dashboard/test_health.py | # -*- coding: utf-8 -*-
from __future__ import absolute_import
from .helper import (DashboardTestCase, JAny, JLeaf, JList, JObj,
addrvec_schema, module_options_schema)
class HealthTest(DashboardTestCase):
CEPHFS = True
__pg_info_schema = JObj({
'object_stats': JObj({
... | 11,096 | 34.681672 | 79 | py |
null | ceph-main/qa/tasks/mgr/dashboard/test_host.py | # -*- coding: utf-8 -*-
from __future__ import absolute_import
from .helper import DashboardTestCase, JList, JObj, devices_schema
class HostControllerTest(DashboardTestCase):
AUTH_ROLES = ['read-only']
URL_HOST = '/api/host'
URL_UI_HOST = '/ui-api/host'
ORCHESTRATOR = True
@classmethod
de... | 6,190 | 37.937107 | 99 | py |
null | ceph-main/qa/tasks/mgr/dashboard/test_logs.py | # -*- coding: utf-8 -*-
from __future__ import absolute_import
from .helper import DashboardTestCase, JList, JObj, addrvec_schema
class LogsTest(DashboardTestCase):
CEPHFS = True
def test_logs(self):
data = self._get("/api/logs/all")
self.assertStatus(200)
log_entry_schema = JList(JO... | 922 | 25.371429 | 66 | py |
null | ceph-main/qa/tasks/mgr/dashboard/test_mgr_module.py | # -*- coding: utf-8 -*-
from __future__ import absolute_import
import logging
import requests
from .helper import (DashboardTestCase, JLeaf, JList, JObj,
module_options_object_schema, module_options_schema)
logger = logging.getLogger(__name__)
class MgrModuleTestCase(DashboardTestCase):
M... | 5,697 | 35.76129 | 81 | py |
null | ceph-main/qa/tasks/mgr/dashboard/test_monitor.py | # -*- coding: utf-8 -*-
from __future__ import absolute_import
from .helper import DashboardTestCase
class MonitorTest(DashboardTestCase):
AUTH_ROLES = ['cluster-manager']
@DashboardTestCase.RunAs('test', 'test', ['block-manager'])
def test_access_permissions(self):
self._get('/api/monitor')
... | 729 | 28.2 | 63 | py |
null | ceph-main/qa/tasks/mgr/dashboard/test_motd.py | # -*- coding: utf-8 -*-
# pylint: disable=too-many-public-methods
from __future__ import absolute_import
import time
from .helper import DashboardTestCase
class MotdTest(DashboardTestCase):
@classmethod
def tearDownClass(cls):
cls._ceph_cmd(['dashboard', 'motd', 'clear'])
super(MotdTest, cl... | 1,041 | 26.421053 | 81 | py |
null | ceph-main/qa/tasks/mgr/dashboard/test_orchestrator.py | # -*- coding: utf-8 -*-
from __future__ import absolute_import
from .helper import DashboardTestCase
class OrchestratorControllerTest(DashboardTestCase):
AUTH_ROLES = ['cluster-manager']
URL_STATUS = '/ui-api/orchestrator/status'
ORCHESTRATOR = True
@classmethod
def setUpClass(cls):
s... | 702 | 24.107143 | 76 | py |
null | ceph-main/qa/tasks/mgr/dashboard/test_osd.py | # -*- coding: utf-8 -*-
from __future__ import absolute_import
import json
from .helper import (DashboardTestCase, JAny, JLeaf, JList, JObj, JTuple,
devices_schema)
class OsdTest(DashboardTestCase):
AUTH_ROLES = ['cluster-manager']
@classmethod
def setUpClass(cls):
super(... | 13,727 | 36.203252 | 100 | py |
null | ceph-main/qa/tasks/mgr/dashboard/test_perf_counters.py | # -*- coding: utf-8 -*-
from __future__ import absolute_import
from .helper import DashboardTestCase, JObj
class PerfCountersControllerTest(DashboardTestCase):
def test_perf_counters_list(self):
data = self._get('/api/perf_counters')
self.assertStatus(200)
self.assertIsInstance(data, di... | 2,785 | 37.694444 | 93 | py |
null | ceph-main/qa/tasks/mgr/dashboard/test_pool.py | # -*- coding: utf-8 -*-
from __future__ import absolute_import
import logging
import time
from contextlib import contextmanager
from .helper import DashboardTestCase, JAny, JList, JObj, JUnion
log = logging.getLogger(__name__)
class PoolTest(DashboardTestCase):
AUTH_ROLES = ['pool-manager']
pool_schema = ... | 17,108 | 38.421659 | 100 | py |
null | ceph-main/qa/tasks/mgr/dashboard/test_rbd.py | # -*- coding: utf-8 -*-
# pylint: disable=too-many-public-methods
from __future__ import absolute_import
import time
from .helper import DashboardTestCase, JLeaf, JList, JObj
class RbdTest(DashboardTestCase):
AUTH_ROLES = ['pool-manager', 'block-manager', 'cluster-manager']
LIST_VERSION = '2.0'
@Dashb... | 40,160 | 40.022472 | 146 | py |
null | ceph-main/qa/tasks/mgr/dashboard/test_rbd_mirroring.py | # -*- coding: utf-8 -*-
# pylint: disable=too-many-public-methods
from __future__ import absolute_import
from .helper import DashboardTestCase
class RbdMirroringTest(DashboardTestCase):
AUTH_ROLES = ['pool-manager', 'block-manager']
@classmethod
def get_pool(cls, pool):
data = cls._get('/api/bl... | 6,471 | 32.020408 | 97 | py |
null | ceph-main/qa/tasks/mgr/dashboard/test_requests.py | # -*- coding: utf-8 -*-
from __future__ import absolute_import
from . import DEFAULT_API_VERSION
from .helper import DashboardTestCase
class RequestsTest(DashboardTestCase):
def test_gzip(self):
self._get('/api/summary')
self.assertHeaders({
'Content-Encoding': 'gzip',
'C... | 1,154 | 34 | 92 | py |