Skip to content

Commit 4ca1320

Browse files
committed
qa/suites/rados/singleton/all: init mon-stretch-pool.yaml
Test the following new Ceph CLI commands: `ceph osd pool stretch set` `ceph osd pool stretch unset` `ceph osd pool stretch show` `qa/workunits/mon/mon-stretch-pool.sh` will create the stretch cluster while performing input validation for the CLI Commands mentioned above. `qa/tasks/stretch_cluster.py` is in charge of setting a pool to stretch cluster and checks whether it prevents PGs from the going active when there is not enough buckets available in the acting set of PGs to go active. Also, test different MON fail over scenarios after setting pool as stretch `qa/suites/rados/singleton/all/mon-stretch-pool.yaml` brings the scripts together. Fixes: https://tracker.ceph.com/issues/64802 Signed-off-by: Kamoltat <[email protected]>
1 parent 661e8e2 commit 4ca1320

File tree

5 files changed

+932
-0
lines changed

5 files changed

+932
-0
lines changed
Lines changed: 67 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,67 @@
1+
roles:
2+
- - mon.a
3+
- mon.b
4+
- mon.c
5+
- osd.0
6+
- osd.1
7+
- osd.2
8+
- mgr.x
9+
- client.0
10+
- mon.d
11+
- mon.e
12+
- mon.f
13+
- osd.3
14+
- osd.4
15+
- osd.5
16+
- mon.g
17+
- mon.h
18+
- mon.i
19+
- osd.6
20+
- osd.7
21+
- osd.8
22+
23+
openstack:
24+
- volumes: # attached to each instance
25+
count: 3
26+
size: 10 # GB
27+
overrides:
28+
ceph:
29+
conf:
30+
global:
31+
mon election default strategy: 3
32+
mon:
33+
client mount timeout: 60
34+
osd pool default size: 6
35+
osd_pool_default_min_size: 3
36+
osd_pool_default_pg_autoscale_mode: off
37+
debug mon: 30
38+
tasks:
39+
- install:
40+
- ceph:
41+
pre-mgr-commands:
42+
- sudo ceph config set mgr mgr_pool false --force
43+
log-ignorelist:
44+
- overall HEALTH_
45+
- \(OSDMAP_FLAGS\)
46+
- \(OSD_
47+
- \(PG_
48+
- \(POOL_
49+
- \(CACHE_POOL_
50+
- \(OBJECT_
51+
- \(SLOW_OPS\)
52+
- \(REQUEST_SLOW\)
53+
- \(TOO_FEW_PGS\)
54+
- slow request
55+
- \(POOL_APP_NOT_ENABLED\)
56+
- overall HEALTH_
57+
- \(MGR_DOWN\)
58+
- \(MON_DOWN\)
59+
- \(PG_AVAILABILITY\)
60+
- \(SLOW_OPS\)
61+
- workunit:
62+
clients:
63+
client.0:
64+
- mon/mon-stretch-pool.sh
65+
- cephfs_test_runner:
66+
modules:
67+
- tasks.stretch_cluster

qa/tasks/ceph_manager.py

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3213,6 +3213,14 @@ def get_mon_quorum(self):
32133213
j = json.loads(out)
32143214
return j['quorum']
32153215

3216+
def get_mon_quorum_names(self):
3217+
"""
3218+
Extract monitor quorum names from the cluster
3219+
"""
3220+
out = self.raw_cluster_cmd('quorum_status')
3221+
j = json.loads(out)
3222+
return j['quorum_names']
3223+
32163224
def wait_for_mon_quorum_size(self, size, timeout=300):
32173225
"""
32183226
Loop until quorum size is reached.

qa/tasks/ceph_test_case.py

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -361,17 +361,31 @@ def wait_until_true_and_hold(cls, condition, timeout, success_hold_time, check_f
361361
else:
362362
break
363363
if success_time_elapsed == success_hold_time:
364+
<<<<<<< HEAD
364365
log.debug("wait_until_true_and_hold: success for {0}s".format(success_hold_time))
366+
=======
367+
log.debug("wait_until_true: success for {0}s".format(success_hold_time))
368+
>>>>>>> b8b8b268706 (qa/suites/rados/singleton/all: init mon-stretch-pool.yaml)
365369
return
366370
else:
367371
if elapsed >= timeout:
368372
if check_fn and check_fn() and retry_count < 5:
369373
elapsed = 0
370374
retry_count += 1
375+
<<<<<<< HEAD
371376
log.debug("wait_until_true_and_hold: making progress, waiting (timeout={0} retry_count={1})...".format(timeout, retry_count))
372377
else:
373378
raise TestTimeoutError("Timed out after {0}s and {1} retries".format(elapsed, retry_count))
374379
else:
375380
log.debug("wait_until_true_and_hold waiting (timeout={0} retry_count={1})...".format(timeout, retry_count))
376381
time.sleep(period)
377382
elapsed += period
383+
=======
384+
log.debug("wait_until_true: making progress, waiting (timeout={0} retry_count={1})...".format(timeout, retry_count))
385+
else:
386+
raise TestTimeoutError("Timed out after {0}s and {1} retries".format(elapsed, retry_count))
387+
else:
388+
log.debug("wait_until_true: waiting (timeout={0} retry_count={1})...".format(timeout, retry_count))
389+
time.sleep(period)
390+
elapsed += period
391+
>>>>>>> b8b8b268706 (qa/suites/rados/singleton/all: init mon-stretch-pool.yaml)

0 commit comments

Comments
 (0)