]> git.proxmox.com Git - mirror_corosync.git/commitdiff
CTS: make the status command more accurate
authorAngus Salkeld <asalkeld@redhat.com>
Fri, 27 Jan 2012 02:49:56 +0000 (13:49 +1100)
committerAngus Salkeld <asalkeld@redhat.com>
Fri, 27 Jan 2012 09:59:22 +0000 (20:59 +1100)
Signed-off-by: Angus Salkeld <asalkeld@redhat.com>
Reviewed-by: Fabio M. Di Nitto <fdinitto@redhat.com>
cts/corosync.py

index b91843a8a35b0f55400831ac7dbed8c2f65bfd7b..9ab9fe362cd2eb242865303cb487c13cfa69d0ee 100644 (file)
@@ -262,7 +262,8 @@ class corosync_needle(ClusterManager):
         out = str(lines)
 
         if 'systemctl' in out:
-                ret= (string.find(out, 'inactive (dead)') == -1)
+            is_running = ('active (running)' in out)
+            ret = (rc is 0 and is_running is 0)
         else:
             is_stopped = string.find(out, 'stopped')
             is_dead = string.find(out, 'dead')