Jelajahi Sumber

CTS: make the status command more accurate

Signed-off-by: Angus Salkeld <asalkeld@redhat.com>
Reviewed-by: Fabio M. Di Nitto <fdinitto@redhat.com>
Angus Salkeld 14 tahun lalu
induk
melakukan
2c242d92b6
1 mengubah file dengan 2 tambahan dan 1 penghapusan
  1. 2 1
      cts/corosync.py

+ 2 - 1
cts/corosync.py

@@ -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')