aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJake Hunsaker <jhunsake@redhat.com>2017-07-16 16:39:48 -0400
committerBryn M. Reeves <bmr@redhat.com>2018-03-28 16:24:52 +0100
commit697ff365be872fb594a1eb3e695d45f717116d6b (patch)
treea47fa89db3092c220da57a19b2296fea06475715
parent9f15f71eecac0b9314756de8612b302f24096437 (diff)
downloadsos-697ff365be872fb594a1eb3e695d45f717116d6b.tar.gz
[ovirt] Capture domain information for v4 and resolve #947
In ovirt 4.x, the engine-manage-domains tool is no longer used, being replaced by ovirt-aaa-jdbc-tool. This patch uses the correct utility based on which is available on the ovirt manager. Additionally, the jbosstrace option will now only work where ovirt-engine is installed (instead of just dwh), resolving #947. Resolves: #947 Closes: #1063 Signed-off-by: Jake Hunsaker <jhunsake@redhat.com> Signed-off-by: Bryn M. Reeves <bmr@redhat.com>
-rw-r--r--sos/plugins/ovirt.py24
1 files changed, 22 insertions, 2 deletions
diff --git a/sos/plugins/ovirt.py b/sos/plugins/ovirt.py
index c85ce7d8..630bc6e1 100644
--- a/sos/plugins/ovirt.py
+++ b/sos/plugins/ovirt.py
@@ -22,6 +22,7 @@ import signal
from sos.plugins import Plugin, RedHatPlugin
+from sos.utilities import is_executable
# Class name must be the same as file name and method names must not change
@@ -66,7 +67,7 @@ class Ovirt(Plugin, RedHatPlugin):
]
def setup(self):
- if self.get_option('jbosstrace'):
+ if self.get_option('jbosstrace') and self.is_installed('ovirt-engine'):
engine_pattern = "^ovirt-engine\ -server.*jboss-modules.jar"
pgrep = "pgrep -f '%s'" % engine_pattern
lines = self.call_ext_prog(pgrep)['output'].splitlines()
@@ -85,7 +86,26 @@ class Ovirt(Plugin, RedHatPlugin):
self.add_forbidden_path('/etc/rhevm/.pgpass')
# Copy all engine tunables and domain information
self.add_cmd_output("engine-config --all")
- self.add_cmd_output("engine-manage-domains list")
+
+ # 3.x line uses engine-manage-domains, 4.x uses ovirt-aaa-jdbc-tool
+ if is_executable('engine-manage-domains'):
+ self.add_cmd_output('engine-manage-domains list')
+ if is_executable('ovirt-engine-extensions-tool'):
+ self.add_cmd_output(
+ 'ovirt-engine-extensions-tool info list-extensions'
+ )
+ if is_executable('ovirt-aaa-jdbc-tool'):
+ cmd = 'ovirt-aaa-jdbc-tool'
+ subcmds = [
+ 'query --what=user',
+ 'query --what=group',
+ 'settings show'
+ ]
+
+ self.add_cmd_output([
+ '%s %s' % (cmd, sub) for sub in subcmds
+ ])
+
# Copy engine config files.
self.add_copy_spec([
"/etc/ovirt-engine",