4
0
Эх сурвалжийг харах

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 жил өмнө
parent
commit
2c242d92b6
1 өөрчлөгдсөн 2 нэмэгдсэн , 1 устгасан
  1. 2 1
      cts/corosync.py

+ 2 - 1
cts/corosync.py

@@ -262,7 +262,8 @@ class corosync_needle(ClusterManager):
         out = str(lines)
         out = str(lines)
 
 
         if 'systemctl' in out:
         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:
         else:
             is_stopped = string.find(out, 'stopped')
             is_stopped = string.find(out, 'stopped')
             is_dead = string.find(out, 'dead')
             is_dead = string.find(out, 'dead')