summaryrefslogtreecommitdiffstats
path: root/glustolibs-misc
diff options
context:
space:
mode:
authorVitalii Koriakov <vkoriako@redhat.com>2018-06-13 12:28:52 +0300
committerNigel Babu <nigelb@redhat.com>2018-06-13 10:53:50 +0000
commit1fc278d76394b64c4a2b5be8344be1cb25f92430 (patch)
treec37cd079ac22bdb23dab0d470601be2f92d3b55a /glustolibs-misc
parenteca6357a316ea9b1278b6134ad05d26f7847d4f6 (diff)
Fixed a problem, when after rebooting nodes and timeout completion it sad that nodes are online even if nodes are still offline
Change-Id: I57da740fbc8eef2e41d5dfe3bb82a8d487630893 Signed-off-by: Vitalii Koriakov <vkoriako@redhat.com>
Diffstat (limited to 'glustolibs-misc')
-rwxr-xr-xglustolibs-misc/glustolibs/misc/misc_libs.py10
1 files changed, 7 insertions, 3 deletions
diff --git a/glustolibs-misc/glustolibs/misc/misc_libs.py b/glustolibs-misc/glustolibs/misc/misc_libs.py
index e2c1f6c..fe117f1 100755
--- a/glustolibs-misc/glustolibs/misc/misc_libs.py
+++ b/glustolibs-misc/glustolibs/misc/misc_libs.py
@@ -474,11 +474,15 @@ def reboot_nodes_and_wait_to_come_online(nodes, timeout=300):
successfull on node, then result contains True else False.
"""
_rc = reboot_nodes(nodes)
- counter = 0
+ reboot_results = {}
+ if not _rc:
+ return _rc, reboot_results
+ counter = 0
g.log.info("Wait for some seconds for the nodes to come online"
" after reboot")
- reboot_results = {}
+
+ _rc = False
while counter < timeout:
ret, reboot_results = are_nodes_online(nodes)
if not ret:
@@ -495,7 +499,7 @@ def reboot_nodes_and_wait_to_come_online(nodes, timeout=300):
g.log.info("Node %s is online", node)
else:
g.log.error("Node %s is offline even after "
- "%d minutes", node, timeout/60.0)
+ "%d minutes", node, timeout / 60.0)
else:
g.log.info("All nodes %s are up and running", nodes)