Merge "worlddump: request Guru Mediation reports for neutron agents"
diff --git a/tools/worlddump.py b/tools/worlddump.py
index 8c053e0..238a23d 100755
--- a/tools/worlddump.py
+++ b/tools/worlddump.py
@@ -27,6 +27,16 @@
import sys
+GMR_PROCESSES = (
+ 'nova-compute',
+ 'neutron-dhcp-agent',
+ 'neutron-l3-agent',
+ 'neutron-linuxbridge-agent',
+ 'neutron-metadata-agent',
+ 'neutron-openvswitch-agent',
+)
+
+
def get_options():
parser = argparse.ArgumentParser(
description='Dump world state for debugging')
@@ -191,17 +201,18 @@
_dump_cmd("sudo cat %s" % fullpath)
-def guru_meditation_report():
- _header("nova-compute Guru Meditation Report")
+def guru_meditation_reports():
+ for service in GMR_PROCESSES:
+ _header("%s Guru Meditation Report" % service)
- try:
- subprocess.check_call(["pgrep","nova-compute"])
- except subprocess.CalledProcessError:
- print("Skipping as nova-compute does not appear to be running")
- return
+ try:
+ subprocess.check_call(['pgrep', '-f', service])
+ except subprocess.CalledProcessError:
+ print("Skipping as %s does not appear to be running" % service)
+ continue
- _dump_cmd("kill -s USR2 `pgrep nova-compute`")
- print("guru meditation report in nova-compute log")
+ _dump_cmd("killall -e -USR2 %s" % service)
+ print("guru meditation report in %s log" % service)
def main():
@@ -218,7 +229,7 @@
iptables_dump()
ebtables_dump()
compute_consoles()
- guru_meditation_report()
+ guru_meditation_reports()
if __name__ == '__main__':