Skip to content

Commit f92b4f5

Browse files
authored
Merge pull request ceph#58507 from idryomov/wip-66886
qa: account for rbd_trash object in krbd_data_pool.sh + related ceph{,adm} task fixes Reviewed-by: Ramana Raja <[email protected]> Reviewed-by: Adam King <[email protected]> Reviewed-by: N Balachandran <[email protected]>
2 parents 384acde + 26cee25 commit f92b4f5

File tree

3 files changed

+11
-27
lines changed

3 files changed

+11
-27
lines changed

qa/tasks/ceph.py

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -472,12 +472,7 @@ def create_rbd_pool(ctx, config):
472472
args=['sudo', 'ceph', '--cluster', cluster_name,
473473
'osd', 'pool', 'create', 'rbd', '8'])
474474
mon_remote.run(
475-
args=[
476-
'sudo', 'ceph', '--cluster', cluster_name,
477-
'osd', 'pool', 'application', 'enable',
478-
'rbd', 'rbd', '--yes-i-really-mean-it'
479-
],
480-
check_status=False)
475+
args=['rbd', '--cluster', cluster_name, 'pool', 'init', 'rbd'])
481476
yield
482477

483478
@contextlib.contextmanager

qa/tasks/cephadm.py

Lines changed: 2 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1808,22 +1808,11 @@ def conf_epoch(ctx, config):
18081808
def create_rbd_pool(ctx, config):
18091809
if config.get('create_rbd_pool', False):
18101810
cluster_name = config['cluster']
1811-
log.info('Waiting for OSDs to come up')
1812-
teuthology.wait_until_osds_up(
1813-
ctx,
1814-
cluster=ctx.cluster,
1815-
remote=ctx.ceph[cluster_name].bootstrap_remote,
1816-
ceph_cluster=cluster_name,
1817-
)
18181811
log.info('Creating RBD pool')
18191812
_shell(ctx, cluster_name, ctx.ceph[cluster_name].bootstrap_remote,
1820-
args=['sudo', 'ceph', '--cluster', cluster_name,
1821-
'osd', 'pool', 'create', 'rbd', '8'])
1813+
args=['ceph', 'osd', 'pool', 'create', 'rbd', '8'])
18221814
_shell(ctx, cluster_name, ctx.ceph[cluster_name].bootstrap_remote,
1823-
args=['sudo', 'ceph', '--cluster', cluster_name,
1824-
'osd', 'pool', 'application', 'enable',
1825-
'rbd', 'rbd', '--yes-i-really-mean-it'
1826-
])
1815+
args=['rbd', 'pool', 'init', 'rbd'])
18271816
yield
18281817

18291818

qa/workunits/rbd/krbd_data_pool.sh

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -146,14 +146,14 @@ for pool in rbd rbdnonzero; do
146146
done
147147
done
148148

149-
# rbd_directory, rbd_children, rbd_info + img0 header + ...
150-
NUM_META_RBDS=$((3 + 1 + 3 * (1*2 + 3*2)))
151-
# rbd_directory, rbd_children, rbd_info + ...
152-
NUM_META_CLONESONLY=$((3 + 2 * 3 * (3*2)))
149+
# rbd_directory, rbd_children, rbd_info + rbd_trash + img0 header + ...
150+
NUM_META_RBDS=$((4 + 1 + 3 * (1*2 + 3*2)))
151+
# rbd_directory, rbd_children, rbd_info + rbd_trash + ...
152+
NUM_META_CLONESONLY=$((4 + 2 * 3 * (3*2)))
153153

154154
[[ $(rados -p rbd ls | wc -l) -eq $((NUM_META_RBDS + 5 * NUM_OBJECTS)) ]]
155-
[[ $(rados -p repdata ls | wc -l) -eq $((1 + 14 * NUM_OBJECTS)) ]]
156-
[[ $(rados -p ecdata ls | wc -l) -eq $((1 + 14 * NUM_OBJECTS)) ]]
155+
[[ $(rados -p repdata ls | wc -l) -eq $((2 + 14 * NUM_OBJECTS)) ]]
156+
[[ $(rados -p ecdata ls | wc -l) -eq $((2 + 14 * NUM_OBJECTS)) ]]
157157
[[ $(rados -p rbdnonzero ls | wc -l) -eq $((NUM_META_RBDS + 5 * NUM_OBJECTS)) ]]
158158
[[ $(rados -p clonesonly ls | wc -l) -eq $((NUM_META_CLONESONLY + 6 * NUM_OBJECTS)) ]]
159159

@@ -192,8 +192,8 @@ done
192192

193193
# mkfs_and_mount should discard some objects everywhere but in clonesonly
194194
[[ $(list_HEADs rbd | wc -l) -lt $((NUM_META_RBDS + 5 * NUM_OBJECTS)) ]]
195-
[[ $(list_HEADs repdata | wc -l) -lt $((1 + 14 * NUM_OBJECTS)) ]]
196-
[[ $(list_HEADs ecdata | wc -l) -lt $((1 + 14 * NUM_OBJECTS)) ]]
195+
[[ $(list_HEADs repdata | wc -l) -lt $((2 + 14 * NUM_OBJECTS)) ]]
196+
[[ $(list_HEADs ecdata | wc -l) -lt $((2 + 14 * NUM_OBJECTS)) ]]
197197
[[ $(list_HEADs rbdnonzero | wc -l) -lt $((NUM_META_RBDS + 5 * NUM_OBJECTS)) ]]
198198
[[ $(list_HEADs clonesonly | wc -l) -eq $((NUM_META_CLONESONLY + 6 * NUM_OBJECTS)) ]]
199199

0 commit comments

Comments
 (0)