Skip to content

Commit 48db64c

Browse files
Merge pull request ceph#56743 from NitzanMordhai/wip-nitzan-backword-forword-dencoder-tests
suites: adding dencoder test multi versions
2 parents 999ca78 + 3f26a96 commit 48db64c

File tree

8 files changed

+512
-0
lines changed

8 files changed

+512
-0
lines changed

qa/suites/rados/encoder/%

Whitespace-only changes.

qa/suites/rados/encoder/.qa

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
../.qa/
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
roles:
2+
- - mon.a
3+
- mgr.x
4+
- osd.0
5+
- client.0
6+
openstack:
7+
- volumes: # attached to each instance
8+
count: 4
9+
size: 10 # GB
Lines changed: 57 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,57 @@
1+
tasks:
2+
- print: "**** install version -2 (quincy) ****"
3+
- install:
4+
branch: quincy
5+
exclude_packages:
6+
- ceph-volume
7+
- print: "**** done install task..."
8+
9+
- print: "**** start installing quincy cephadm ..."
10+
- cephadm:
11+
image: quay.ceph.io/ceph-ci/ceph:quincy
12+
compiled_cephadm_branch: quincy
13+
conf:
14+
osd:
15+
#set config option for which cls modules are allowed to be loaded / used
16+
osd_class_load_list: "*"
17+
osd_class_default_list: "*"
18+
- print: "**** done end installing quincy cephadm ..."
19+
20+
- print: "**** done start cephadm.shell ceph config set mgr..."
21+
- cephadm.shell:
22+
mon.a:
23+
- ceph config set mgr mgr/cephadm/use_repo_digest true --force
24+
- print: "**** done cephadm.shell ceph config set mgr..."
25+
26+
- print: "**** start dencoder quincy... ****"
27+
- workunit:
28+
clients:
29+
client.0:
30+
- dencoder/test-dencoder.sh
31+
- print: "**** done end dencoder quincy... ****"
32+
33+
- print: "**** installing N-1 version (reef) ****"
34+
- install:
35+
branch: reef
36+
exclude_packages:
37+
- ceph-volume
38+
- print: "**** done end installing task..."
39+
40+
- print: "**** start dencoder reef... ****"
41+
- workunit:
42+
clients:
43+
client.0:
44+
- dencoder/test-dencoder.sh
45+
- print: "**** done end dencoder reef... ****"
46+
- print: "**** installing N version (squid) ****"
47+
- install:
48+
branch: squid
49+
exclude_packages:
50+
- ceph-volume
51+
- print: "**** done end installing task..."
52+
- print: "**** start dencoder squid... ****"
53+
- workunit:
54+
clients:
55+
client.0:
56+
- dencoder/test-dencoder.sh
57+
- print: "**** done end dencoder squid... ****"
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
.qa/distros/supported-random-distro$

qa/tasks/dencoder.py

Lines changed: 94 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,94 @@
1+
import logging
2+
3+
4+
from teuthology import misc
5+
from teuthology.orchestra import run
6+
from teuthology.task import Task
7+
8+
log = logging.getLogger(__name__)
9+
10+
class DENcoder(Task):
11+
"""
12+
This task is used to test dencoder on the data on the given device.
13+
The task is expected to be run on a remote host.
14+
The task will run the DENcoder binary on the remote host
15+
"""
16+
17+
def __init__(self, ctx, config):
18+
super(DENcoder, self).__init__(ctx, config)
19+
self.ctx = ctx
20+
self.config = config
21+
self.testdir = misc.get_testdir(ctx)
22+
self.branch_N = config.get('branch_N', 'main')
23+
self.branch_N_2 = config.get('branch_N-2', 'quincy')
24+
self.log = log
25+
self.log.info('Starting DENcoder task...')
26+
27+
def setup(self):
28+
"""
29+
cloning the ceph repository on the remote host
30+
and submodules including the ceph-object-corpus
31+
that way we will have the readable.sh script available
32+
"""
33+
super(DENcoder, self).setup()
34+
self.first_mon = next(iter(self.ctx.cluster.only(misc.get_first_mon(self.ctx, self.config)).remotes.keys()))
35+
self.first_mon.run(
36+
args=[
37+
'git', 'clone', '-b', self.branch_N,
38+
'https://github.com/ceph/ceph.git',
39+
'{tdir}/ceph'.format(tdir=self.testdir)
40+
]
41+
)
42+
self.ceph_dir = '{tdir}/ceph'.format(tdir=self.testdir)
43+
44+
self.first_mon.run(
45+
args=[
46+
'cd', '{tdir}/ceph'.format(tdir=self.testdir),
47+
run.Raw('&&'),
48+
'git', 'submodule', 'update', '--init', '--recursive'
49+
]
50+
)
51+
self.corpus_dir = '{ceph_dir}/ceph-object-corpus'.format(ceph_dir=self.ceph_dir)
52+
53+
def begin(self):
54+
"""
55+
Run the dencoder readable.sh script on the remote host
56+
find any errors in the output
57+
"""
58+
super(DENcoder, self).begin()
59+
self.log.info('Running DENcoder task...')
60+
self.log.info('Running DENcoder on the remote host...')
61+
# print ceph-dencoder version
62+
self.first_mon.run(
63+
args=[
64+
'cd', self.ceph_dir,
65+
run.Raw('&&'),
66+
'ceph-dencoder', 'version'
67+
]
68+
)
69+
# run first check for type ceph-dencoder type MonMap
70+
self.first_mon.run(
71+
args=[
72+
'ceph-dencoder', 'type', 'MonMap'
73+
]
74+
)
75+
76+
# run the readable.sh script
77+
self.first_mon.run(
78+
args=[
79+
'CEPH_ROOT={ceph_dir}'.format(ceph_dir=self.ceph_dir),
80+
'CEPH_BUILD_DIR={ceph_dir}'.format(ceph_dir=self.ceph_dir),
81+
'CEPH_BIN=/usr/bin',
82+
'CEPH_LIB=/usr/lib',
83+
'src/test/encoding/readable.sh','ceph-dencoder'
84+
]
85+
)
86+
# check for errors in the output
87+
88+
self.log.info('DENcoder task completed...')
89+
90+
def end(self):
91+
super(DENcoder, self).end()
92+
self.log.info('DENcoder task ended...')
93+
94+
task = DENcoder
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
#!/usr/bin/env bash
2+
set -ex
3+
CEPH_ARGS=""
4+
mydir=`dirname $0`
5+
ceph-dencoder version
6+
7+
# clone the corpus repository on the host
8+
git clone -b master https://github.com/ceph/ceph-object-corpus.git $CEPH_MNT/client.0/tmp/ceph-object-corpus-master
9+
10+
$mydir/test_readable.py $CEPH_MNT/client.0/tmp/ceph-object-corpus-master
11+
12+
echo $0 OK

0 commit comments

Comments
 (0)