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
| ... | ... |
@@ -112,6 +112,13 @@ def compute_consoles(): |
| 112 | 112 |
|
| 113 | 113 |
def guru_meditation_report(): |
| 114 | 114 |
_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 |
+ |
|
| 115 | 122 |
_dump_cmd("kill -s USR1 `pgrep nova-compute`")
|
| 116 | 123 |
print "guru meditation report in nova-compute log" |
| 117 | 124 |
|