From 5506e19bfd6735eadbc1fbf01be6208184f945ac Mon Sep 17 00:00:00 2001 From: Jake Hunsaker Date: Fri, 19 Dec 2014 17:12:39 -0500 Subject: [libvirt] Collect XML files from /var/run/libvirt oVirt and OpenStack drop XML files under /var/run/libvirt/ not /etc/libvirt. The libvirt plugin should collect the XML files dropped there as well, not just /etc/libvirt. Signed-off-by: Jake Hunsaker Signed-off-by: Adam Stokes --- sos/plugins/libvirt.py | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/sos/plugins/libvirt.py b/sos/plugins/libvirt.py index 9ff8a561..8d5dcfc0 100644 --- a/sos/plugins/libvirt.py +++ b/sos/plugins/libvirt.py @@ -37,6 +37,7 @@ class Libvirt(Plugin, RedHatPlugin, UbuntuPlugin, DebianPlugin): "/etc/libvirt/lxc.conf", "/etc/libvirt/nwfilter/*.xml", "/etc/libvirt/qemu/*.xml", + "/var/run/libvirt/qemu/*.xml", "/etc/libvirt/qemu/networks/*.xml", "/etc/libvirt/qemu/networks/autostart/*.xml", "/etc/libvirt/storage/*.xml", @@ -59,11 +60,12 @@ class Libvirt(Plugin, RedHatPlugin, UbuntuPlugin, DebianPlugin): self.add_cmd_output("klist -ket %s" % libvirt_keytab) def postproc(self): - for xmlfile in glob.glob("/etc/libvirt/qemu/*.xml"): - self.do_file_sub( - xmlfile, - r"(\s*passwd=\s*')([^']*)('.*)", - r"\1******\3" - ) + for loc in ["/etc/", "/var/run/"]: + for xmlfile in glob.glob(loc + "libvirt/qemu/*.xml"): + self.do_file_sub( + xmlfile, + r"(\s*passwd=\s*')([^']*)('.*)", + r"\1******\3" + ) # vim: et ts=4 sw=4 -- cgit