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/ceph_iscsi_client.py | """
Set up ceph-iscsi client.
"""
import logging
import contextlib
from textwrap import dedent
log = logging.getLogger(__name__)
@contextlib.contextmanager
def task(ctx, config):
"""
Set up ceph-iscsi client.
tasks:
ceph_iscsi_client:
clients: [client.1]
"""
log.info('Setting... | 1,796 | 30.526316 | 69 | py |
null | ceph-main/qa/tasks/ceph_manager.py | """
ceph manager -- Thrasher and CephManager objects
"""
from functools import wraps
import contextlib
import errno
import random
import signal
import time
import gevent
import base64
import json
import logging
import threading
import traceback
import os
import shlex
from io import BytesIO, StringIO
from subprocess im... | 124,143 | 37.339716 | 128 | py |
null | ceph-main/qa/tasks/ceph_objectstore_tool.py | """
ceph_objectstore_tool - Simple test of ceph-objectstore-tool utility
"""
from io import BytesIO
import contextlib
import json
import logging
import os
import sys
import tempfile
import time
from tasks import ceph_manager
from tasks.util.rados import (rados, create_replicated_pool, create_ec_pool)
from teuthology i... | 26,396 | 38.81448 | 86 | py |
null | ceph-main/qa/tasks/ceph_test_case.py | from typing import Optional, TYPE_CHECKING
import unittest
import time
import logging
from teuthology.exceptions import CommandFailedError
if TYPE_CHECKING:
from tasks.mgr.mgr_test_case import MgrCluster
log = logging.getLogger(__name__)
class TestTimeoutError(RuntimeError):
pass
class CephTestCase(unittes... | 9,545 | 39.449153 | 140 | py |
null | ceph-main/qa/tasks/cephadm.py | """
Ceph cluster task, deployed via cephadm orchestrator
"""
import argparse
import configobj
import contextlib
import logging
import os
import json
import re
import uuid
import yaml
from copy import deepcopy
from io import BytesIO, StringIO
from tarfile import ReadError
from tasks.ceph_manager import CephManager
from... | 56,456 | 32.565398 | 99 | py |
null | ceph-main/qa/tasks/cephfs_mirror.py | """
Task for running cephfs mirror daemons
"""
import logging
from teuthology.orchestra import run
from teuthology import misc
from teuthology.exceptions import ConfigError
from teuthology.task import Task
from tasks.ceph_manager import get_valgrind_args
from tasks.util import get_remote_for_role
log = logging.getLo... | 2,149 | 28.054054 | 81 | py |
null | ceph-main/qa/tasks/cephfs_mirror_thrash.py | """
Task for thrashing cephfs-mirror daemons
"""
import contextlib
import logging
import random
import signal
import socket
import time
from gevent import sleep
from gevent.greenlet import Greenlet
from gevent.event import Event
from teuthology.exceptions import CommandFailedError
from teuthology.orchestra import ru... | 7,264 | 32.022727 | 101 | py |
null | ceph-main/qa/tasks/cephfs_test_runner.py | import contextlib
import logging
import os
import unittest
from unittest import suite, loader, case
from teuthology.task import interactive
from teuthology import misc
from tasks.cephfs.filesystem import Filesystem, MDSCluster, CephCluster
from tasks.mgr.mgr_test_case import MgrCluster
log = logging.getLogger(__name__... | 6,319 | 28.53271 | 87 | py |
null | ceph-main/qa/tasks/cephfs_upgrade_snap.py | """
Upgrade cluster snap format.
"""
import logging
import time
from tasks.cephfs.filesystem import Filesystem
log = logging.getLogger(__name__)
def task(ctx, config):
"""
Upgrade CephFS file system snap format.
"""
if config is None:
config = {}
assert isinstance(config, dict), \
... | 1,422 | 28.645833 | 84 | py |
null | ceph-main/qa/tasks/check_counter.py |
import logging
import json
from teuthology.task import Task
from teuthology import misc
from tasks import ceph_manager
log = logging.getLogger(__name__)
class CheckCounter(Task):
"""
Use this task to validate that some daemon perf counters were
incremented by the nested tasks.
Config:
'clust... | 4,748 | 35.251908 | 116 | py |
null | ceph-main/qa/tasks/cifs_mount.py | """
Mount cifs clients. Unmount when finished.
"""
import contextlib
import logging
import os
from teuthology import misc as teuthology
from teuthology.orchestra import run
log = logging.getLogger(__name__)
@contextlib.contextmanager
def task(ctx, config):
"""
Mount/unmount a cifs client.
The config is... | 3,758 | 26.23913 | 111 | py |
null | ceph-main/qa/tasks/cram.py | """
Cram tests
"""
import logging
import os
from tasks.util.workunit import get_refspec_after_overrides
from teuthology import misc as teuthology
from teuthology.parallel import parallel
from teuthology.orchestra import run
from teuthology.config import config as teuth_config
log = logging.getLogger(__name__)
def t... | 5,402 | 32.559006 | 87 | py |
null | ceph-main/qa/tasks/create_verify_lfn_objects.py | """
Rados modle-based integration tests
"""
import contextlib
import logging
log = logging.getLogger(__name__)
@contextlib.contextmanager
def task(ctx, config):
"""
For each combination of namespace and name_length, create
<num_objects> objects with name length <name_length>
on entry. On exit, verify... | 2,499 | 28.761905 | 74 | py |
null | ceph-main/qa/tasks/d4ntests.py | import logging
from teuthology import misc as teuthology
from teuthology.task import Task
from teuthology.orchestra import run
from teuthology.packaging import remove_package
log = logging.getLogger(__name__)
def get_toxvenv_dir(ctx):
return ctx.tox.venv_path
def toxvenv_sh(ctx, remote, args, **kwargs):
act... | 4,963 | 31.444444 | 90 | py |
null | ceph-main/qa/tasks/daemonwatchdog.py | import logging
import signal
import time
from gevent import sleep
from gevent.greenlet import Greenlet
from gevent.event import Event
log = logging.getLogger(__name__)
class DaemonWatchdog(Greenlet):
"""
DaemonWatchdog::
Watch Ceph daemons for failures. If an extended failure is detected (i.e.
not i... | 5,606 | 42.465116 | 160 | py |
null | ceph-main/qa/tasks/deduplication.py | """
Run ceph-dedup-tool
"""
import contextlib
import logging
import gevent
from teuthology import misc as teuthology
import json
import time
from io import StringIO
log = logging.getLogger(__name__)
@contextlib.contextmanager
def task(ctx, config):
"""
Run ceph-dedup-tool.
The config should be as follows:... | 8,576 | 37.809955 | 111 | py |
null | ceph-main/qa/tasks/devstack.py | #!/usr/bin/env python
import contextlib
import logging
import textwrap
import time
from configparser import ConfigParser
from io import BytesIO, StringIO
from teuthology.orchestra import run
from teuthology import misc
from teuthology.contextutil import nested
log = logging.getLogger(__name__)
DEVSTACK_GIT_REPO = 'h... | 13,327 | 34.827957 | 131 | py |
null | ceph-main/qa/tasks/die_on_err.py | """
Raise exceptions on osd coredumps or test err directories
"""
import contextlib
import logging
import time
from teuthology.orchestra import run
from tasks import ceph_manager
from teuthology import misc as teuthology
log = logging.getLogger(__name__)
@contextlib.contextmanager
def task(ctx, config):
"""
... | 1,944 | 26.394366 | 75 | py |
null | ceph-main/qa/tasks/divergent_priors.py | """
Special case divergence test
"""
import logging
import time
from teuthology import misc as teuthology
from tasks.util.rados import rados
log = logging.getLogger(__name__)
def task(ctx, config):
"""
Test handling of divergent entries with prior_version
prior to log_tail
overrides:
ceph:
... | 4,925 | 29.596273 | 79 | py |
null | ceph-main/qa/tasks/divergent_priors2.py | """
Special case divergence test with ceph-objectstore-tool export/remove/import
"""
import logging
import time
from teuthology.exceptions import CommandFailedError
from teuthology import misc as teuthology
from tasks.util.rados import rados
import os
log = logging.getLogger(__name__)
def task(ctx, config):
""... | 6,262 | 31.450777 | 79 | py |
null | ceph-main/qa/tasks/dnsmasq.py | """
Task for dnsmasq configuration
"""
import contextlib
import logging
from teuthology import misc
from teuthology.exceptions import ConfigError
from teuthology import contextutil
from teuthology import packaging
from tasks.util import get_remote_for_role
log = logging.getLogger(__name__)
@contextlib.contextmanager... | 5,995 | 34.064327 | 93 | py |
null | ceph-main/qa/tasks/dump_stuck.py | """
Dump_stuck command
"""
import logging
import time
from tasks import ceph_manager
from teuthology import misc as teuthology
log = logging.getLogger(__name__)
def check_stuck(manager, num_inactive, num_unclean, num_stale, timeout=10):
"""
Do checks. Make sure get_stuck_pgs return the right amount of info... | 4,415 | 26.259259 | 84 | py |
null | ceph-main/qa/tasks/ec_inconsistent_hinfo.py | """
Inconsistent_hinfo
"""
import logging
import time
from dateutil.parser import parse
from tasks import ceph_manager
from tasks.util.rados import rados
from teuthology import misc as teuthology
log = logging.getLogger(__name__)
def wait_for_deep_scrub_complete(manager, pgid, check_time_now, inconsistent):
log.d... | 7,848 | 33.730088 | 92 | py |
null | ceph-main/qa/tasks/ec_lost_unfound.py | """
Lost_unfound
"""
import logging
import time
from tasks import ceph_manager
from tasks.util.rados import rados
from teuthology import misc as teuthology
from teuthology.orchestra import run
log = logging.getLogger(__name__)
def task(ctx, config):
"""
Test handling of lost objects on an ec pool.
A pret... | 5,320 | 32.25625 | 80 | py |
null | ceph-main/qa/tasks/exec_on_cleanup.py | """
Exececute custom commands during unwind/cleanup
"""
import logging
import contextlib
from teuthology import misc as teuthology
log = logging.getLogger(__name__)
@contextlib.contextmanager
def task(ctx, config):
"""
Execute commands on a given role
tasks:
- ceph:
- kclient: [clien... | 1,899 | 29.645161 | 87 | py |
null | ceph-main/qa/tasks/fs.py | """
CephFS sub-tasks.
"""
import logging
import re
from tasks.cephfs.filesystem import Filesystem, MDSCluster
log = logging.getLogger(__name__)
# Everything up to CEPH_MDSMAP_ALLOW_STANDBY_REPLAY
CEPH_MDSMAP_ALLOW_STANDBY_REPLAY = (1<<5)
CEPH_MDSMAP_NOT_JOINABLE = (1 << 0)
CEPH_MDSMAP_LAST = CEPH_MDSMAP_ALLOW_STAND... | 6,260 | 36.267857 | 116 | py |
null | ceph-main/qa/tasks/fwd_scrub.py | """
Thrash mds by simulating failures
"""
import logging
import contextlib
from gevent import sleep, GreenletExit
from gevent.greenlet import Greenlet
from gevent.event import Event
from teuthology import misc as teuthology
from tasks import ceph_manager
from tasks.cephfs.filesystem import MDSCluster, Filesystem
from... | 5,083 | 29.626506 | 95 | py |
null | ceph-main/qa/tasks/immutable_object_cache.py | """
immutable object cache task
"""
import contextlib
import logging
from teuthology import misc as teuthology
from teuthology import contextutil
from teuthology.orchestra import run
log = logging.getLogger(__name__)
@contextlib.contextmanager
def immutable_object_cache(ctx, config):
"""
setup and cleanup im... | 2,333 | 30.972603 | 109 | py |
null | ceph-main/qa/tasks/immutable_object_cache_thrash.py | """
immutable object cache thrash task
"""
import contextlib
import logging
from teuthology import misc as teuthology
from teuthology import contextutil
from teuthology.orchestra import run
DEFAULT_KILL_DAEMON_TIME = 2
DEFAULT_DEAD_TIME = 30
DEFAULT_LIVE_TIME = 120
log = logging.getLogger(__name__)
@contextlib.cont... | 2,473 | 29.925 | 99 | py |
null | ceph-main/qa/tasks/kafka.py | """
Deploy and configure Kafka for Teuthology
"""
import contextlib
import logging
import time
from teuthology import misc as teuthology
from teuthology import contextutil
from teuthology.orchestra import run
log = logging.getLogger(__name__)
def get_kafka_version(config):
for client, client_config in config.ite... | 6,757 | 31.965854 | 117 | py |
null | ceph-main/qa/tasks/kclient.py | """
Mount/unmount a ``kernel`` client.
"""
import contextlib
import logging
from teuthology.misc import deep_merge
from teuthology.exceptions import CommandFailedError
from teuthology import misc
from teuthology.contextutil import MaxWhileTries
from tasks.cephfs.kernel_mount import KernelMount
log = logging.getLogger... | 4,672 | 31.227586 | 121 | py |
null | ceph-main/qa/tasks/keycloak.py | """
Deploy and configure Keycloak for Teuthology
"""
import contextlib
import logging
import os
from teuthology import misc as teuthology
from teuthology import contextutil
from teuthology.orchestra import run
from teuthology.exceptions import ConfigError
log = logging.getLogger(__name__)
def get_keycloak_version(co... | 16,012 | 33.142857 | 175 | py |
null | ceph-main/qa/tasks/keystone.py | """
Deploy and configure Keystone for Teuthology
"""
import argparse
import contextlib
import logging
# still need this for python3.6
from collections import OrderedDict
from itertools import chain
from teuthology import misc as teuthology
from teuthology import contextutil
from teuthology.orchestra import run
from t... | 16,727 | 33.705394 | 108 | py |
null | ceph-main/qa/tasks/kubeadm.py | """
Kubernetes cluster task, deployed via kubeadm
"""
import argparse
import contextlib
import ipaddress
import json
import logging
import random
import yaml
from io import BytesIO
from teuthology import misc as teuthology
from teuthology import contextutil
from teuthology.config import config as teuth_config
from teu... | 19,665 | 33.868794 | 183 | py |
null | ceph-main/qa/tasks/locktest.py | """
locktests
"""
import logging
from teuthology.orchestra import run
from teuthology import misc as teuthology
log = logging.getLogger(__name__)
def task(ctx, config):
"""
Run locktests, from the xfstests suite, on the given
clients. Whether the clients are ceph-fuse or kernel does not
matter, and t... | 4,936 | 35.57037 | 95 | py |
null | ceph-main/qa/tasks/lost_unfound.py | """
Lost_unfound
"""
import logging
import time
from tasks import ceph_manager
from tasks.util.rados import rados
from teuthology import misc as teuthology
from teuthology.orchestra import run
log = logging.getLogger(__name__)
def task(ctx, config):
"""
Test handling of lost objects.
A pretty rigid clust... | 5,993 | 32.116022 | 80 | py |
null | ceph-main/qa/tasks/manypools.py | """
Force pg creation on all osds
"""
from teuthology import misc as teuthology
from teuthology.orchestra import run
import logging
log = logging.getLogger(__name__)
def task(ctx, config):
"""
Create the specified number of pools and write 16 objects to them (thereby forcing
the PG creation on each OSD). ... | 2,680 | 35.22973 | 91 | py |
null | ceph-main/qa/tasks/mds_creation_failure.py | # FIXME: this file has many undefined vars which are accessed!
# flake8: noqa
import logging
import contextlib
import time
from tasks import ceph_manager
from teuthology import misc
from teuthology.exceptions import CommandFailedError
from teuthology.orchestra.run import Raw
log = logging.getLogger(__name__)
@contex... | 2,606 | 35.71831 | 113 | py |
null | ceph-main/qa/tasks/mds_pre_upgrade.py | """
Prepare MDS cluster for upgrade.
"""
import logging
from tasks.cephfs.filesystem import Filesystem
log = logging.getLogger(__name__)
def task(ctx, config):
"""
Prepare MDS cluster for upgrade.
This task reduces ranks to 1 and stops all standbys.
"""
if config is None:
config = {}
... | 563 | 19.142857 | 65 | py |
null | ceph-main/qa/tasks/mds_thrash.py | """
Thrash mds by simulating failures
"""
import logging
import contextlib
import itertools
import random
import time
from gevent import sleep
from gevent.greenlet import Greenlet
from gevent.event import Event
from teuthology import misc as teuthology
from tasks import ceph_manager
from tasks.cephfs.filesystem impor... | 17,999 | 40.37931 | 182 | py |
null | ceph-main/qa/tasks/metadata.yaml | instance-id: test
local-hostname: test
| 39 | 12.333333 | 20 | yaml |
null | ceph-main/qa/tasks/mon_clock_skew_check.py | """
Handle clock skews in monitors.
"""
import logging
import time
from tasks import ceph_manager
from teuthology import misc as teuthology
log = logging.getLogger(__name__)
class ClockSkewCheck:
"""
Check if there are any clock skews among the monitors in the
quorum.
This task accepts the following ... | 2,165 | 28.27027 | 79 | py |
null | ceph-main/qa/tasks/mon_recovery.py | """
Monitor recovery
"""
import logging
from tasks import ceph_manager
from teuthology import misc as teuthology
log = logging.getLogger(__name__)
def task(ctx, config):
"""
Test monitor recovery.
"""
if config is None:
config = {}
assert isinstance(config, dict), \
'task only acc... | 2,281 | 27.17284 | 80 | py |
null | ceph-main/qa/tasks/mon_thrash.py | """
Monitor thrash
"""
import logging
import contextlib
import random
import time
import gevent
import json
import math
from teuthology import misc as teuthology
from teuthology.contextutil import safe_while
from tasks import ceph_manager
from tasks.cephfs.filesystem import MDSCluster
from tasks.thrasher import Thrashe... | 15,102 | 34.874109 | 103 | py |
null | ceph-main/qa/tasks/multibench.py | """
Multibench testing
"""
import contextlib
import logging
import time
import copy
import gevent
from tasks import radosbench
log = logging.getLogger(__name__)
@contextlib.contextmanager
def task(ctx, config):
"""
Run multibench
The config should be as follows:
multibench:
time: <seconds t... | 1,511 | 23.387097 | 77 | py |
null | ceph-main/qa/tasks/netem.py | """
Task to run tests with network delay between two remotes using tc and netem.
Reference:https://wiki.linuxfoundation.org/networking/netem.
"""
import logging
import contextlib
from paramiko import SSHException
import socket
import time
import gevent
import argparse
log = logging.getLogger(__name__)
def set_prio... | 8,338 | 30 | 103 | py |
null | ceph-main/qa/tasks/netsplit.py | """
Functions to netsplit test machines.
At present, you must specify monitors to disconnect, and it
drops those IP pairs. This means OSDs etc on the hosts which use
the same IP will also be blocked! If you are using multiple IPs on the
same host within the cluster, daemons on those other IPs will get
through.
"""
imp... | 2,437 | 31.945946 | 74 | py |
null | ceph-main/qa/tasks/notification_tests.py | """
Run a set of bucket notification tests on rgw.
"""
from io import BytesIO
from configobj import ConfigObj
import base64
import contextlib
import logging
import os
import random
import string
from teuthology import misc as teuthology
from teuthology import contextutil
from teuthology.orchestra import run
log = log... | 11,466 | 34.722741 | 211 | py |
null | ceph-main/qa/tasks/nvme_loop.py | import contextlib
import logging
from io import StringIO
from teuthology import misc as teuthology
from teuthology import contextutil
from teuthology.orchestra import run
log = logging.getLogger(__name__)
@contextlib.contextmanager
def task(ctx, config):
log.info('Setting up nvme_loop on scratch devices...')
... | 3,908 | 35.53271 | 89 | py |
null | ceph-main/qa/tasks/object_source_down.py | """
Test Object locations going down
"""
import logging
import time
from teuthology import misc as teuthology
from tasks import ceph_manager
from tasks.util.rados import rados
log = logging.getLogger(__name__)
def task(ctx, config):
"""
Test handling of object location going down
"""
if config is None... | 2,900 | 27.441176 | 81 | py |
null | ceph-main/qa/tasks/omapbench.py | """
Run omapbench executable within teuthology
"""
import contextlib
import logging
from teuthology.orchestra import run
from teuthology import misc as teuthology
log = logging.getLogger(__name__)
@contextlib.contextmanager
def task(ctx, config):
"""
Run omapbench
The config should be as follows::
... | 2,603 | 30 | 77 | py |
null | ceph-main/qa/tasks/openssl_keys.py | """
Generates and installs a signed SSL certificate.
"""
import argparse
import logging
import os
from teuthology import misc
from teuthology.exceptions import ConfigError
from teuthology.orchestra import run
from teuthology.task import Task
log = logging.getLogger(__name__)
class OpenSSLKeys(Task):
name = 'open... | 9,344 | 36.987805 | 105 | py |
null | ceph-main/qa/tasks/osd_backfill.py | """
Osd backfill test
"""
import logging
import time
from tasks import ceph_manager
from teuthology import misc as teuthology
log = logging.getLogger(__name__)
def rados_start(ctx, remote, cmd):
"""
Run a remote rados command (currently used to only write data)
"""
log.info("rados %s" % ' '.join(cmd... | 2,599 | 23.761905 | 81 | py |
null | ceph-main/qa/tasks/osd_failsafe_enospc.py | """
Handle osdfailsafe configuration settings (nearfull ratio and full ratio)
"""
from io import StringIO
import logging
import time
from teuthology.orchestra import run
from tasks.util.rados import rados
from teuthology import misc as teuthology
log = logging.getLogger(__name__)
def task(ctx, config):
"""
T... | 7,082 | 31.342466 | 109 | py |
null | ceph-main/qa/tasks/osd_max_pg_per_osd.py | import logging
import random
log = logging.getLogger(__name__)
def pg_num_in_all_states(pgs, *states):
return sum(1 for state in pgs.values()
if all(s in state for s in states))
def pg_num_in_any_state(pgs, *states):
return sum(1 for state in pgs.values()
if any(s in state fo... | 4,571 | 35 | 79 | py |
null | ceph-main/qa/tasks/osd_recovery.py | """
osd recovery
"""
import logging
import time
from tasks import ceph_manager
from teuthology import misc as teuthology
log = logging.getLogger(__name__)
def rados_start(testdir, remote, cmd):
"""
Run a remote rados command (currently used to only write data)
"""
log.info("rados %s" % ' '.join(cmd)... | 5,337 | 26.515464 | 86 | py |
null | ceph-main/qa/tasks/peer.py | """
Peer test (Single test, not much configurable here)
"""
import logging
import json
import time
from tasks import ceph_manager
from tasks.util.rados import rados
from teuthology import misc as teuthology
log = logging.getLogger(__name__)
def task(ctx, config):
"""
Test peering.
"""
if config is No... | 2,457 | 26.010989 | 66 | py |
null | ceph-main/qa/tasks/peering_speed_test.py | """
Remotely run peering tests.
"""
import logging
import time
log = logging.getLogger(__name__)
from teuthology.task.args import argify
POOLNAME = "POOLNAME"
ARGS = [
('num_pgs', 'number of pgs to create', 256, int),
('max_time', 'seconds to complete peering', 0, int),
('runs', 'trials to run', 10, int)... | 2,303 | 25.181818 | 74 | py |
null | ceph-main/qa/tasks/populate_rbd_pool.py | """
Populate rbd pools
"""
import contextlib
import logging
log = logging.getLogger(__name__)
@contextlib.contextmanager
def task(ctx, config):
"""
Populate <num_pools> pools with prefix <pool_prefix> with <num_images>
rbd images at <num_snaps> snaps
The config could be as follows::
populate... | 2,753 | 32.180723 | 81 | py |
null | ceph-main/qa/tasks/pykmip.py | """
Deploy and configure PyKMIP for Teuthology
"""
import argparse
import contextlib
import logging
import time
import tempfile
import json
import os
from io import BytesIO
from teuthology.orchestra.daemon import DaemonGroup
from teuthology.orchestra.remote import Remote
import pprint
from teuthology import misc as t... | 14,989 | 31.167382 | 99 | py |
null | ceph-main/qa/tasks/python.py | import logging
from teuthology import misc as teuthology
from tasks.vip import subst_vip
log = logging.getLogger(__name__)
def task(ctx, config):
"""
Execute some python code.
tasks:
- python:
host.a: |
import boto3
c = boto3.resource(...)
The provided dic... | 1,122 | 23.413043 | 75 | py |
null | ceph-main/qa/tasks/qemu.py | """
Qemu task
"""
import contextlib
import logging
import os
import yaml
import time
from tasks import rbd
from tasks.util.workunit import get_refspec_after_overrides
from teuthology import contextutil
from teuthology import misc as teuthology
from teuthology.config import config as teuth_config
from teuthology.orche... | 26,167 | 35.64986 | 115 | py |
null | ceph-main/qa/tasks/rabbitmq.py | """
Deploy and configure RabbitMQ for Teuthology
"""
import contextlib
import logging
from teuthology import misc as teuthology
from teuthology import contextutil
from teuthology.orchestra import run
log = logging.getLogger(__name__)
@contextlib.contextmanager
def install_rabbitmq(ctx, config):
"""
Download... | 3,650 | 26.870229 | 101 | py |
null | ceph-main/qa/tasks/rados.py | """
Rados modle-based integration tests
"""
import contextlib
import logging
import gevent
from teuthology import misc as teuthology
from teuthology.orchestra import run
log = logging.getLogger(__name__)
@contextlib.contextmanager
def task(ctx, config):
"""
Run RadosModel-based integration tests.
The c... | 9,629 | 32.554007 | 111 | py |
null | ceph-main/qa/tasks/radosbench.py | """
Rados benchmarking
"""
import contextlib
import logging
from teuthology.orchestra import run
from teuthology import misc as teuthology
log = logging.getLogger(__name__)
@contextlib.contextmanager
def task(ctx, config):
"""
Run radosbench
The config should be as follows:
radosbench:
cli... | 4,728 | 31.613793 | 99 | py |
null | ceph-main/qa/tasks/radosbenchsweep.py | """
Rados benchmarking sweep
"""
import contextlib
import logging
import re
from io import BytesIO
from itertools import product
from teuthology.orchestra import run
from teuthology import misc as teuthology
log = logging.getLogger(__name__)
@contextlib.contextmanager
def task(ctx, config):
"""
Execute a ... | 7,667 | 33.38565 | 80 | py |
null | ceph-main/qa/tasks/radosgw_admin.py | """
Rgw admin testing against a running instance
"""
# The test cases in this file have been annotated for inventory.
# To extract the inventory (in csv format) use the command:
#
# grep '^ *# TESTCASE' | sed 's/^ *# TESTCASE //'
#
# to run this standalone:
# python qa/tasks/radosgw_admin.py [--user=uid] --host=host ... | 43,078 | 36.492602 | 157 | py |
null | ceph-main/qa/tasks/radosgw_admin_rest.py | """
Run a series of rgw admin commands through the rest interface.
The test cases in this file have been annotated for inventory.
To extract the inventory (in csv format) use the command:
grep '^ *# TESTCASE' | sed 's/^ *# TESTCASE //'
"""
import logging
import boto.exception
import boto.s3.connection
import bo... | 31,822 | 38.046626 | 173 | py |
null | ceph-main/qa/tasks/ragweed.py | """
Run a set of s3 tests on rgw.
"""
from io import BytesIO
from configobj import ConfigObj
import base64
import contextlib
import logging
import os
import random
import string
from teuthology import misc as teuthology
from teuthology import contextutil
from teuthology.config import config as teuth_config
from teutho... | 12,875 | 33.520107 | 117 | py |
null | ceph-main/qa/tasks/rbd.py | """
Rbd testing task
"""
import contextlib
import logging
import os
import tempfile
import sys
from io import StringIO
from teuthology.orchestra import run
from teuthology import misc as teuthology
from teuthology import contextutil
from teuthology.parallel import parallel
from teuthology.task.common_fs_utils import g... | 25,715 | 33.379679 | 132 | py |
null | ceph-main/qa/tasks/rbd_fio.py | """
Long running fio tests on rbd mapped devices for format/features provided in config
Many fio parameters can be configured so that this task can be used along with thrash/power-cut tests
and exercise IO on full disk for all format/features
- This test should not be run on VM due to heavy use of resource
"""
im... | 9,543 | 41.230088 | 132 | py |
null | ceph-main/qa/tasks/rbd_fsx.py | """
Run fsx on an rbd image
"""
import contextlib
import logging
from teuthology.exceptions import ConfigError
from teuthology.parallel import parallel
from teuthology import misc as teuthology
from tasks.ceph_manager import get_valgrind_args
log = logging.getLogger(__name__)
@contextlib.contextmanager
def task(ctx,... | 3,591 | 29.965517 | 72 | py |
null | ceph-main/qa/tasks/rbd_mirror.py | """
Task for running rbd mirroring daemons and configuring mirroring
"""
import logging
from teuthology.orchestra import run
from teuthology import misc
from teuthology.exceptions import ConfigError
from teuthology.task import Task
from tasks.ceph_manager import get_valgrind_args
from tasks.util import get_remote_for... | 3,719 | 29.743802 | 79 | py |
null | ceph-main/qa/tasks/rbd_mirror_thrash.py | """
Task for thrashing rbd-mirror daemons
"""
import contextlib
import logging
import random
import signal
import socket
import time
from gevent import sleep
from gevent.greenlet import Greenlet
from gevent.event import Event
from teuthology.exceptions import CommandFailedError
from teuthology.orchestra import run
f... | 7,125 | 31.538813 | 101 | py |
null | ceph-main/qa/tasks/rbd_pwl_cache_recovery.py | """
persistent write log cache recovery task
"""
import contextlib
import logging
import random
import json
import time
from teuthology import misc as teuthology
from teuthology import contextutil
DEFAULT_NUM_ITERATIONS = 20
IO_PATTERNS = ("full-seq", "rand")
IO_SIZES = ('4K', '16K', '128K', '1024K')
log = logging.g... | 3,188 | 31.876289 | 86 | py |
null | ceph-main/qa/tasks/rebuild_mondb.py | """
Test that we can rebuild the mon RocksDB from OSD data if all mon DBs are
corrupted or lost
"""
import logging
import os.path
import shutil
import tempfile
from tasks import ceph_manager
from teuthology import misc as teuthology
log = logging.getLogger(__name__)
def _push_directory(path, remote, remote_dir):
... | 8,550 | 36.340611 | 86 | py |
null | ceph-main/qa/tasks/reg11184.py | """
Special regression test for tracker #11184
Synopsis: osd/SnapMapper.cc: 282: FAILED assert(check(oid))
This is accomplished by moving a pg that wasn't part of split and still include
divergent priors.
"""
import logging
import time
from teuthology.exceptions import CommandFailedError
from teuthology.orchestra im... | 7,953 | 31.73251 | 99 | py |
null | ceph-main/qa/tasks/rep_lost_unfound_delete.py | """
Lost_unfound
"""
import logging
import time
from tasks import ceph_manager
from tasks.util.rados import rados
from teuthology import misc as teuthology
from teuthology.orchestra import run
log = logging.getLogger(__name__)
def task(ctx, config):
"""
Test handling of lost objects.
A pretty rigid clus... | 5,837 | 31.433333 | 80 | py |
null | ceph-main/qa/tasks/repair_test.py | """
Test pool repairing after objects are damaged.
"""
import logging
import time
log = logging.getLogger(__name__)
def choose_primary(manager, pool, num):
"""
Return primary to test on.
"""
log.info("Choosing primary")
return manager.get_pg_primary(pool, num)
def choose_replica(manager, pool, ... | 9,443 | 30.065789 | 75 | py |
null | ceph-main/qa/tasks/resolve_stuck_peering.py | """
Resolve stuck peering
"""
import logging
import time
from teuthology import misc as teuthology
from tasks.util.rados import rados
log = logging.getLogger(__name__)
def task(ctx, config):
"""
Test handling resolve stuck peering
requires 3 osds on a single test node
"""
if config is None:
... | 2,881 | 24.504425 | 75 | py |
null | ceph-main/qa/tasks/rgw.py | """
rgw routines
"""
import argparse
import contextlib
import logging
from teuthology.orchestra import run
from teuthology import misc as teuthology
from teuthology import contextutil
from teuthology.exceptions import ConfigError
from tasks.ceph_manager import get_valgrind_args
from tasks.util import get_remote_for_ro... | 19,140 | 39.381857 | 137 | py |
null | ceph-main/qa/tasks/rgw_cloudtier.py | """
rgw_cloudtier configuration routines
"""
import argparse
import logging
from teuthology import misc as teuthology
from teuthology.exceptions import ConfigError
from tasks.util.rgw import rgwadmin, wait_for_radosgw
from teuthology.task import Task
log = logging.getLogger(__name__)
class RGWCloudTier(Task):
""... | 5,081 | 40.317073 | 110 | py |
null | ceph-main/qa/tasks/rgw_logsocket.py | """
rgw s3tests logging wrappers
"""
from io import BytesIO
from configobj import ConfigObj
import contextlib
import logging
from tasks import s3tests
from teuthology import misc as teuthology
from teuthology import contextutil
log = logging.getLogger(__name__)
@contextlib.contextmanager
def download(ctx, config):
... | 4,733 | 27.518072 | 105 | py |
null | ceph-main/qa/tasks/rgw_module.py | import logging
import yaml
from teuthology import misc as teuthology
log = logging.getLogger(__name__)
def _shell(ctx, cluster_name, remote, args, extra_cephadm_args=[], **kwargs):
teuthology.get_testdir(ctx)
return remote.run(
args=[
'sudo',
ctx.cephadm,
'--imag... | 1,375 | 24.481481 | 77 | py |
null | ceph-main/qa/tasks/rgw_multisite.py | """
rgw multisite configuration routines
"""
import argparse
import logging
import random
import string
from copy import deepcopy
from tasks.util.rgw import rgwadmin, wait_for_radosgw
from tasks.util.rados import create_ec_pool, create_replicated_pool
from tasks.rgw_multi import multisite
from tasks.rgw_multi.zone_rado... | 16,450 | 37.347319 | 117 | py |
null | ceph-main/qa/tasks/rgw_multisite_tests.py | """
rgw multisite testing
"""
import importlib.util
import logging
import nose.core
import nose.config
import sys
from nose.plugins.manager import DefaultPluginManager
from teuthology.config import config as teuth_config
from teuthology.exceptions import ConfigError
from teuthology.repo_utils import fetch_repo
from te... | 4,238 | 34.033058 | 101 | py |
null | ceph-main/qa/tasks/rook.py | """
Rook cluster task
"""
import argparse
import configobj
import contextlib
import json
import logging
import os
import yaml
from io import BytesIO
from tarfile import ReadError
from tasks.ceph_manager import CephManager
from teuthology import misc as teuthology
from teuthology.config import config as teuth_config
fr... | 21,645 | 31.747352 | 95 | py |
null | ceph-main/qa/tasks/s3a_hadoop.py | import contextlib
import logging
from teuthology import misc
from teuthology.orchestra import run
log = logging.getLogger(__name__)
@contextlib.contextmanager
def task(ctx, config):
"""
Run Hadoop S3A tests using Ceph
usage:
-tasks:
ceph-ansible:
s3a-hadoop:
maven-ver... | 8,766 | 29.653846 | 125 | py |
null | ceph-main/qa/tasks/s3tests.py | """
Run a set of s3 tests on rgw.
"""
from io import BytesIO
from configobj import ConfigObj
import base64
import contextlib
import logging
import os
import random
import string
from teuthology import misc as teuthology
from teuthology import contextutil
from teuthology.config import config as teuth_config
from teutho... | 26,492 | 39.758462 | 164 | py |
null | ceph-main/qa/tasks/s3tests_java.py | """
Task for running RGW S3 tests with the AWS Java SDK
"""
from io import BytesIO
import logging
import base64
import os
import random
import string
import yaml
import getpass
from teuthology import misc as teuthology
from teuthology.task import Task
from teuthology.orchestra import run
log = logging.getLogger(__na... | 16,628 | 40.263027 | 115 | py |
null | ceph-main/qa/tasks/samba.py | """
Samba
"""
import contextlib
import logging
import time
from teuthology import misc as teuthology
from teuthology.orchestra import run
from teuthology.orchestra.daemon import DaemonGroup
log = logging.getLogger(__name__)
def get_sambas(ctx, roles):
"""
Scan for roles that are samba. Yield the id of the ... | 7,830 | 30.963265 | 107 | py |
null | ceph-main/qa/tasks/scrub.py | """
Scrub osds
"""
import contextlib
import gevent
import logging
import random
import time
from tasks import ceph_manager
from teuthology import misc as teuthology
log = logging.getLogger(__name__)
@contextlib.contextmanager
def task(ctx, config):
"""
Run scrub periodically. Randomly chooses an OSD to scrub... | 2,662 | 21.567797 | 67 | py |
null | ceph-main/qa/tasks/scrub_test.py | """Scrub testing"""
import contextlib
import json
import logging
import os
import time
import tempfile
from tasks import ceph_manager
from teuthology import misc as teuthology
log = logging.getLogger(__name__)
def wait_for_victim_pg(manager, poolid):
"""Return a PG with some data and its acting set"""
# wa... | 14,841 | 34.850242 | 91 | py |
null | ceph-main/qa/tasks/systemd.py | """
Systemd test
"""
import contextlib
import logging
import re
import time
from teuthology.orchestra import run
from teuthology.misc import reconnect, get_first_mon, wait_until_healthy
log = logging.getLogger(__name__)
def _remote_service_status(remote, service):
status = remote.sh('sudo systemctl status %s' % ... | 5,784 | 41.536765 | 78 | py |
null | ceph-main/qa/tasks/tempest.py | """
Deploy and configure Tempest for Teuthology
"""
import configparser
import contextlib
import logging
from teuthology import misc as teuthology
from teuthology import contextutil
from teuthology.exceptions import ConfigError
from teuthology.orchestra import run
log = logging.getLogger(__name__)
def get_tempest_d... | 8,991 | 33.060606 | 82 | py |
null | ceph-main/qa/tasks/teuthology_integration.py | import logging
from teuthology import misc
from teuthology.task import Task
log = logging.getLogger(__name__)
class TeuthologyIntegration(Task):
def begin(self):
misc.sh("""
set -x
pip install tox
tox
# tox -e py27-integration
tox -e openstack-integration
... | 355 | 16.8 | 36 | py |
null | ceph-main/qa/tasks/tgt.py | """
Task to handle tgt
Assumptions made:
The ceph-extras tgt package may need to get installed.
The open-iscsi package needs to get installed.
"""
import logging
import contextlib
from teuthology import misc as teuthology
from teuthology import contextutil
log = logging.getLogger(__name__)
@contextlib.cont... | 5,001 | 27.101124 | 75 | py |
null | ceph-main/qa/tasks/thrash_pool_snaps.py | """
Thrash -- Simulate random osd failures.
"""
import contextlib
import logging
import gevent
import time
import random
log = logging.getLogger(__name__)
@contextlib.contextmanager
def task(ctx, config):
"""
"Thrash" snap creation and removal on the listed pools
Example:
thrash_pool_snaps:
p... | 1,617 | 25.096774 | 71 | py |
null | ceph-main/qa/tasks/thrasher.py | """
Thrasher base class
"""
class Thrasher(object):
def __init__(self):
super(Thrasher, self).__init__()
self._exception = None
@property
def exception(self):
return self._exception
def set_thrasher_exception(self, e):
self._exception = e
| 290 | 17.1875 | 40 | py |
null | ceph-main/qa/tasks/thrashosds-health.yaml | overrides:
ceph:
conf:
osd:
osd max markdown count: 1000
osd blocked scrub grace period: 3600
log-ignorelist:
- overall HEALTH_
- \(OSDMAP_FLAGS\)
- \(OSD_
- \(PG_
- \(POOL_
- \(CACHE_POOL_
- \(SMALLER_PGP_NUM\)
- \(OBJECT_
- \(SLOW_O... | 452 | 19.590909 | 44 | yaml |