ansible-role-collect-logs role - Ansible role for aggregating logs from different nodes. Upstream url: https://opendev.org/openstack/ansible-role-collect-logs RDO Packaging bug: https://bugzilla.redhat.com/show_bug.cgi?id=1897394 and patches for spec: https://review.rdoproject.org/r/#/q/topic:add-ansible-role-collect-logs+(status:open+OR+status:merged) Goal: Currently sosreport is used to collect logs from different openstack deployed nodes. In Upstream and infrared CI, we use the ansible-role-collect-logs ansible role to collect logs from different node and then visualize it by publishing on a file server. In order to provider the same user experience for user and developers, we want to integrate collect-logs role with sosreport and then let sosreport calls the collect-logs role and run on different nodes. Here is the implementation code: ++++++++++++++++++++++++++++++ diff --git a/sos/plugins/openstack_tripleo.py b/sos/plugins/openstack_tripleo.py index 652d132f..858e8e2f 100644 --- a/sos/plugins/openstack_tripleo.py +++ b/sos/plugins/openstack_tripleo.py @@ -23,11 +23,9 @@ class OpenStackTripleO(Plugin, RedHatPlugin, DebianPlugin, UbuntuPlugin): def setup(self): # Notes: recursion is max 2 for container-puppet and tripleo-config # Those directories are present on all OpenStack nodes + self.add_cmd_output(["""ansible -m include_role -a 'name=collect-logs' -e "artcl_collect_dir=/home/cloud-user/MY_LOGS" -e "undercloud_user='$(whoami)'" localhost"""]) self.add_copy_spec([ - '/var/log/paunch.log', - '/var/lib/container-puppet/', - '/var/lib/tripleo-config/', - '/etc/puppet/hieradata/' + '/home/cloud-user/MY_LOGS' ]) def postproc(self): @@ -38,9 +36,7 @@ class OpenStackTripleO(Plugin, RedHatPlugin, DebianPlugin, UbuntuPlugin): r'([":\s]+)(.*[^"])([",]+)' rgxp = re.compile(secrets, re.IGNORECASE) - self.do_path_regex_sub('/var/lib/tripleo-config/', - rgxp, r'\1\3*********\5') - self.do_path_regex_sub('/etc/puppet/hieradata/', + self.do_path_regex_sub('/home/cloud-user/MY_LOGS', rgxp, r'\1\3*********\5') +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ It is an RFE, once the package is available, we will couple it with sosreport and ship it to customers from RHOS-16.2 onwards.
That would be great to add oslo-config-validator [1] within the scope of this playbook. [1] https://docs.openstack.org/oslo.config/latest/cli/validator.html#comparing-configuration-with-the-default-configuration
build included in beta content
Since the problem described in this bug report should be resolved in a recent advisory, it has been closed with a resolution of ERRATA. For information on the advisory (Release of components for Red Hat OpenStack Platform 17.0 (Wallaby)), and where to find the updated files, follow the link below. If the solution does not work for you, open a new bug report. https://access.redhat.com/errata/RHEA-2022:6543