From 7b587304a54d9b21041ffdfbc85fad8d87859c49 Mon Sep 17 00:00:00 2001 From: Vasu Kulkarni Date: Wed, 29 Mar 2017 09:27:20 -0700 Subject: [PATCH] Add reboot case for systemd test test systemd units restart after reboot Signed-off-by: Vasu Kulkarni --- qa/tasks/systemd.py | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/qa/tasks/systemd.py b/qa/tasks/systemd.py index 6963a12e2b9c5..21249604cfa4f 100644 --- a/qa/tasks/systemd.py +++ b/qa/tasks/systemd.py @@ -8,6 +8,7 @@ import time from cStringIO import StringIO from teuthology.orchestra import run +from teuthology.misc import reconnect, get_first_mon, wait_until_healthy log = logging.getLogger(__name__) @@ -124,4 +125,18 @@ def task(ctx, config): log.info("Failed to stop ceph mds service") remote.run(args=['sudo', 'systemctl', 'start', mds_name]) time.sleep(4) + + # reboot all nodes and verify the systemd units restart + # workunit that runs would fail if any of the systemd unit doesnt start + ctx.cluster.run(args='sudo reboot', wait=False, check_status=False) + # avoid immediate reconnect + time.sleep(120) + reconnect(ctx, 480) # reconnect all nodes + # for debug info + ctx.cluster.run(args=['sudo', 'ps', '-eaf', run.Raw('|'), + 'grep', 'ceph']) + # wait for HEALTH_OK + mon = get_first_mon(ctx, config) + (mon_remote,) = ctx.cluster.only(mon).remotes.iterkeys() + wait_until_healthy(ctx, mon_remote) yield -- 2.39.5