aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDmitry Tantsur <divius.inside@gmail.com>2017-10-26 12:01:46 +0000
committerBryn M. Reeves <bmr@redhat.com>2018-03-09 15:11:00 +0000
commitff2b26dfe74e67ff969796b4f60bd5291a535277 (patch)
treecea48d5620f90655848b6bca64a76e043ee02727
parent9d9af248d85b576abad1f5fdb9112bafdbbc913a (diff)
downloadsos-ff2b26dfe74e67ff969796b4f60bd5291a535277.tar.gz
[openstack_ironic] collect information about ironic-inspector
ironic-discoverd was renamed to ironic-inspector in the Liberty release. This change adds support for the new name. Signed-off-by: Dmitry Tantsur <divius.inside@gmail.com>
-rw-r--r--sos/plugins/openstack_ironic.py24
1 files changed, 23 insertions, 1 deletions
diff --git a/sos/plugins/openstack_ironic.py b/sos/plugins/openstack_ironic.py
index b25bf81b..123d4b7c 100644
--- a/sos/plugins/openstack_ironic.py
+++ b/sos/plugins/openstack_ironic.py
@@ -77,7 +77,9 @@ class OpenStackIronic(Plugin):
vars_any = [p in os.environ for p in [
'OS_TENANT_NAME', 'OS_PROJECT_NAME']]
- if not (all(vars_all) and any(vars_any)):
+ self.osc_available = all(vars_all) and any(vars_any)
+
+ if not self.osc_available:
self.soslog.warning("Not all environment variables set. Source "
"the environment file for the user intended "
"to connect to the OpenStack environment.")
@@ -137,4 +139,24 @@ class RedHatIronic(OpenStackIronic, RedHatPlugin):
self.add_journal(units="openstack-ironic-discoverd")
self.add_journal(units="openstack-ironic-discoverd-dnsmasq")
+ # ironic-discoverd was renamed to ironic-inspector in Liberty
+ self.conf_list.append('/etc/ironic-inspector/*')
+ self.conf_list.append(self.var_puppet_gen + '/etc/ironic-inspector/*')
+ self.add_copy_spec('/etc/ironic-inspector/')
+ self.add_copy_spec(self.var_puppet_gen + '/etc/ironic-inspector/')
+ self.add_copy_spec('/var/lib/ironic-inspector/')
+ if self.get_option("all_logs"):
+ self.add_copy_spec('/var/log/ironic-inspector/')
+ self.add_copy_spec('/var/log/containers/ironic-inspector/')
+ else:
+ self.add_copy_spec('/var/log/ironic-inspector/*.log')
+ self.add_copy_spec('/var/log/ironic-inspector/ramdisk/')
+ self.add_copy_spec('/var/log/containers/ironic-inspector/*.log')
+ self.add_copy_spec('/var/log/containers/ironic-inspector/ramdisk/')
+
+ self.add_journal(units="openstack-ironic-inspector-dnsmasq")
+
+ if self.osc_available:
+ self.add_cmd_output("openstack baremetal introspection list")
+
# vim: set et ts=4 sw=4 :