From 73c7d14eab03b60d425822fe04180f4002e8182e Mon Sep 17 00:00:00 2001 From: Patrick Donnelly Date: Wed, 21 Aug 2019 21:13:37 -0700 Subject: [PATCH] qa: fix broken ceph.restart marking of OSDs down Sage noticed `osd down` was not being performed. Bug was that the role format had changed so splitting no longer worked correctly. Fixes: https://tracker.ceph.com/issues/40773 Signed-off-by: Patrick Donnelly --- qa/tasks/ceph.py | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/qa/tasks/ceph.py b/qa/tasks/ceph.py index 65383282f89..0feee57cc3e 100644 --- a/qa/tasks/ceph.py +++ b/qa/tasks/ceph.py @@ -1634,14 +1634,10 @@ def restart(ctx, config): ctx.daemons.get_daemon(type_, id_, cluster).restart() clusters.add(cluster) - for cluster in clusters: - manager = ctx.managers[cluster] - for dmon in daemons: - if '.' in dmon: - dm_parts = dmon.split('.') - if dm_parts[1].isdigit(): - if dm_parts[0] == 'osd': - manager.mark_down_osd(int(dm_parts[1])) + for role in daemons: + cluster, type_, id_ = teuthology.split_role(role) + if type_ == 'osd': + ctx.managers[cluster].mark_down_osd(id_) if config.get('wait-for-healthy', True): for cluster in clusters: -- 2.39.5