aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPavel Moravec <pmoravec@redhat.com>2015-05-15 16:10:41 +0200
committerBryn M. Reeves <bmr@redhat.com>2015-06-30 13:13:01 +0100
commit26fa7d3ae5a6c31030ac045aeaa32452ad888df8 (patch)
tree57520463135b46219a837f1bcd4446f924992209
parent60373759aaa9f0668f0200e000e6c1949334597b (diff)
downloadsos-26fa7d3ae5a6c31030ac045aeaa32452ad888df8.tar.gz
[virsh] make dumpxml calls read-only and set timeout=180
Call virsh dumpxml in read-only mode to bypass authentication and extend the command timeout to 180s. Resolves #544 Signed-off-by: Pavel Moravec <pmoravec@redhat.com>
-rw-r--r--sos/plugins/virsh.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/sos/plugins/virsh.py b/sos/plugins/virsh.py
index 4b6bcc0f..0381b398 100644
--- a/sos/plugins/virsh.py
+++ b/sos/plugins/virsh.py
@@ -41,6 +41,7 @@ class LibvirtClient(Plugin, RedHatPlugin, UbuntuPlugin, DebianPlugin):
if domains_file:
domains_lines = open(domains_file, "r").read().splitlines()[2:]
for domain in filter(lambda x: x, domains_lines):
- self.add_cmd_output("virsh dumpxml %s" % domain.split()[1])
+ self.add_cmd_output("virsh -r dumpxml %s" % domain.split()[1],
+ timeout=180)
# vim: et ts=4 sw=4