From 6dae8ec3be6469337d23d019c75e4cfc65d7489d Mon Sep 17 00:00:00 2001 From: Warren Usui Date: Wed, 25 May 2016 16:59:05 -0700 Subject: [PATCH] tasks/ceph.restart osd fix ceph.restart should mark restarted osds down in order to avoid a race condition with ceph_manager.wait_for_clean Fixes: http://tracker.ceph.com/issues/15778 Signed-off-by: Warren Usui (manual cherry pick of 1b7552c9cb331978cb0bfd4d7dc4dcde4186c176) Conflicts: qa/tasks/ceph.py (original commit was in ceph/ceph-qa-suite.git) --- qa/tasks/ceph.py | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/qa/tasks/ceph.py b/qa/tasks/ceph.py index ec86ac8131951..efed134bc7db6 100644 --- a/qa/tasks/ceph.py +++ b/qa/tasks/ceph.py @@ -1248,6 +1248,13 @@ def restart(ctx, config): if config.get('wait-for-osds-up', False): for cluster in clusters: wait_for_osds_up(ctx=ctx, config=dict(cluster=cluster)) + manager = ctx.managers['ceph'] + 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])) yield -- 2.39.5