Skip to content

Commit 3a9df1d

Browse files
committed
Check for nova-compute before running kill
Unconditionally running this can lead to confusing failure output from kill as the pgrep matches nothing when nova-compute isn't yet running. Change-Id: I37cb84fe8e0b393f49b8907af16a3e44f82c46a6
1 parent 99440f9 commit 3a9df1d

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

tools/worlddump.py

+7
Original file line numberDiff line numberDiff line change
@@ -112,6 +112,13 @@ def compute_consoles():
112112

113113
def guru_meditation_report():
114114
_header("nova-compute Guru Meditation Report")
115+
116+
try:
117+
subprocess.check_call(["pgrep","nova-compute"])
118+
except subprocess.CalledProcessError:
119+
print "Skipping as nova-compute does not appear to be running"
120+
return
121+
115122
_dump_cmd("kill -s USR1 `pgrep nova-compute`")
116123
print "guru meditation report in nova-compute log"
117124

0 commit comments

Comments
 (0)