mirror of
https://github.com/ceph/ceph
synced 2025-03-06 16:28:28 +00:00
test: cephfs-mirror teuthology task and test yamls
Signed-off-by: Venky Shankar <vshankar@redhat.com>
This commit is contained in:
parent
f81e8f1e88
commit
3478b2a062
@ -7,10 +7,12 @@ tasks:
|
||||
rpm:
|
||||
- python3-cephfs
|
||||
- cephfs-top
|
||||
- cephfs-mirror
|
||||
deb:
|
||||
- python3-cephfs
|
||||
- cephfs-shell
|
||||
- cephfs-top
|
||||
- cephfs-mirror
|
||||
# For kernel_untar_build workunit
|
||||
extra_system_packages:
|
||||
deb:
|
||||
|
0
qa/suites/fs/mirror/%
Normal file
0
qa/suites/fs/mirror/%
Normal file
1
qa/suites/fs/mirror/.qa
Symbolic link
1
qa/suites/fs/mirror/.qa
Symbolic link
@ -0,0 +1 @@
|
||||
../.qa
|
1
qa/suites/fs/mirror/begin.yaml
Symbolic link
1
qa/suites/fs/mirror/begin.yaml
Symbolic link
@ -0,0 +1 @@
|
||||
.qa/cephfs/begin.yaml
|
0
qa/suites/fs/mirror/cephfs-mirror/+
Normal file
0
qa/suites/fs/mirror/cephfs-mirror/+
Normal file
5
qa/suites/fs/mirror/cephfs-mirror/one-per-cluster.yaml
Normal file
5
qa/suites/fs/mirror/cephfs-mirror/one-per-cluster.yaml
Normal file
@ -0,0 +1,5 @@
|
||||
meta:
|
||||
- desc: run one cephfs-mirror daemon on primary cluster
|
||||
tasks:
|
||||
- cephfs-mirror:
|
||||
client: client.mirror
|
0
qa/suites/fs/mirror/clients/+
Normal file
0
qa/suites/fs/mirror/clients/+
Normal file
1
qa/suites/fs/mirror/clients/.qa
Symbolic link
1
qa/suites/fs/mirror/clients/.qa
Symbolic link
@ -0,0 +1 @@
|
||||
../.qa
|
18
qa/suites/fs/mirror/clients/mirror.yaml
Normal file
18
qa/suites/fs/mirror/clients/mirror.yaml
Normal file
@ -0,0 +1,18 @@
|
||||
meta:
|
||||
- desc: configure the permissions for client.mirror
|
||||
overrides:
|
||||
ceph:
|
||||
conf:
|
||||
client:
|
||||
debug cephfs_mirror: 20
|
||||
log to stderr: false
|
||||
# make these predictable
|
||||
client.mirror:
|
||||
admin socket: /var/run/ceph/cephfs-mirror.asok
|
||||
pid file: /var/run/ceph/cephfs-mirror.pid
|
||||
tasks:
|
||||
- exec:
|
||||
client.mirror:
|
||||
- "sudo ceph auth caps client.mirror mon 'allow r' mds 'allow r' osd 'allow rw tag cephfs metadata=*, allow r tag cephfs data=*' mgr 'allow r'"
|
||||
client.mirror_remote:
|
||||
- "sudo ceph auth caps client.mirror_remote mon 'allow r' mds 'allow rwps' osd 'allow rw tag cephfs *=*' mgr 'allow r'"
|
0
qa/suites/fs/mirror/cluster/+
Normal file
0
qa/suites/fs/mirror/cluster/+
Normal file
17
qa/suites/fs/mirror/cluster/1-node.yaml
Normal file
17
qa/suites/fs/mirror/cluster/1-node.yaml
Normal file
@ -0,0 +1,17 @@
|
||||
meta:
|
||||
- desc: 1 ceph cluster with 1 mon, 1 mgr, 3 osds, 5 mdss
|
||||
roles:
|
||||
- - mon.a
|
||||
- mgr.x
|
||||
- mds.a
|
||||
- mds.b
|
||||
- mds.c
|
||||
- mds.d
|
||||
- mds.e
|
||||
- osd.0
|
||||
- osd.1
|
||||
- osd.2
|
||||
- client.0
|
||||
- client.1
|
||||
- client.mirror
|
||||
- client.mirror_remote
|
1
qa/suites/fs/mirror/mount/.qa
Symbolic link
1
qa/suites/fs/mirror/mount/.qa
Symbolic link
@ -0,0 +1 @@
|
||||
../.qa
|
2
qa/suites/fs/mirror/mount/fuse.yaml
Normal file
2
qa/suites/fs/mirror/mount/fuse.yaml
Normal file
@ -0,0 +1,2 @@
|
||||
tasks:
|
||||
- ceph-fuse: [client.0, client.1]
|
1
qa/suites/fs/mirror/objectstore/.qa
Symbolic link
1
qa/suites/fs/mirror/objectstore/.qa
Symbolic link
@ -0,0 +1 @@
|
||||
../.qa
|
1
qa/suites/fs/mirror/objectstore/bluestore-bitmap.yaml
Symbolic link
1
qa/suites/fs/mirror/objectstore/bluestore-bitmap.yaml
Symbolic link
@ -0,0 +1 @@
|
||||
.qa/objectstore/bluestore-bitmap.yaml
|
0
qa/suites/fs/mirror/overrides/+
Normal file
0
qa/suites/fs/mirror/overrides/+
Normal file
1
qa/suites/fs/mirror/overrides/.qa
Symbolic link
1
qa/suites/fs/mirror/overrides/.qa
Symbolic link
@ -0,0 +1 @@
|
||||
../.qa
|
1
qa/suites/fs/mirror/overrides/whitelist_health.yaml
Symbolic link
1
qa/suites/fs/mirror/overrides/whitelist_health.yaml
Symbolic link
@ -0,0 +1 @@
|
||||
./.qa/cephfs/overrides/whitelist_health.yaml
|
1
qa/suites/fs/mirror/supported-random-distros$
Symbolic link
1
qa/suites/fs/mirror/supported-random-distros$
Symbolic link
@ -0,0 +1 @@
|
||||
.qa/distros/supported-random-distro$
|
1
qa/suites/fs/mirror/tasks/.qa
Symbolic link
1
qa/suites/fs/mirror/tasks/.qa
Symbolic link
@ -0,0 +1 @@
|
||||
../.qa
|
10
qa/suites/fs/mirror/tasks/mirror.yaml
Normal file
10
qa/suites/fs/mirror/tasks/mirror.yaml
Normal file
@ -0,0 +1,10 @@
|
||||
overrides:
|
||||
ceph:
|
||||
conf:
|
||||
mgr:
|
||||
debug client: 10
|
||||
|
||||
tasks:
|
||||
- cephfs_test_runner:
|
||||
modules:
|
||||
- tasks.cephfs.test_mirroring
|
63
qa/tasks/cephfs_mirror.py
Normal file
63
qa/tasks/cephfs_mirror.py
Normal file
@ -0,0 +1,63 @@
|
||||
"""
|
||||
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.util import get_remote_for_role
|
||||
|
||||
log = logging.getLogger(__name__)
|
||||
|
||||
class CephFSMirror(Task):
|
||||
def __init__(self, ctx, config):
|
||||
super(CephFSMirror, self).__init__(ctx, config)
|
||||
self.log = log
|
||||
|
||||
def setup(self):
|
||||
super(CephFSMirror, self).setup()
|
||||
try:
|
||||
self.client = self.config['client']
|
||||
except KeyError:
|
||||
raise ConfigError('cephfs-mirror requires a client to connect')
|
||||
|
||||
self.cluster_name, type_, self.client_id = misc.split_role(self.client)
|
||||
if not type_ == 'client':
|
||||
raise ConfigError(f'client role {self.client} must be a client')
|
||||
self.remote = get_remote_for_role(self.ctx, self.client)
|
||||
|
||||
def begin(self):
|
||||
super(CephFSMirror, self).begin()
|
||||
testdir = misc.get_testdir(self.ctx)
|
||||
|
||||
args = [
|
||||
'adjust-ulimits',
|
||||
'ceph-coverage',
|
||||
'{tdir}/archive/coverage'.format(tdir=testdir),
|
||||
'daemon-helper',
|
||||
'term',
|
||||
]
|
||||
|
||||
args.extend([
|
||||
'cephfs-mirror',
|
||||
'--id',
|
||||
self.client_id,
|
||||
])
|
||||
|
||||
self.ctx.daemons.add_daemon(
|
||||
self.remote, 'cephfs-mirror', self.client,
|
||||
args=args,
|
||||
logger=self.log.getChild(self.client),
|
||||
stdin=run.PIPE,
|
||||
wait=False,
|
||||
)
|
||||
|
||||
def end(self):
|
||||
mirror_daemon = self.ctx.daemons.get_daemon('cephfs-mirror', self.client)
|
||||
mirror_daemon.stop()
|
||||
super(CephFSMirror, self).end()
|
||||
|
||||
task = CephFSMirror
|
Loading…
Reference in New Issue
Block a user