diff options
author | Jake Hunsaker <jhunsake@redhat.com> | 2014-12-19 17:12:39 -0500 |
---|---|---|
committer | Adam Stokes <adam.stokes@ubuntu.com> | 2015-05-10 20:26:41 -0400 |
commit | 5506e19bfd6735eadbc1fbf01be6208184f945ac (patch) | |
tree | 495814fbd6f0a3a2452c0950c47d4a07e8bc6296 | |
parent | 85d6ea5cdd32cf1b90a10ff0d50a14dcf24902f8 (diff) | |
download | sos-5506e19bfd6735eadbc1fbf01be6208184f945ac.tar.gz |
[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 <jhunsake@redhat.com>
Signed-off-by: Adam Stokes <adam.stokes@ubuntu.com>
-rw-r--r-- | sos/plugins/libvirt.py | 14 |
1 files 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 |