From 0c8adca8ec03ff048109c8ed375663abaf8bc593 Mon Sep 17 00:00:00 2001 From: Emilien Macchi Date: Fri, 4 May 2018 11:40:13 -0700 Subject: [openstack_instack] add support for containerized undercloud 1) Do the copy in one call with variables, so it's more efficient. 2) Collect the config tarball It'll be very useful to collect the config tarball which containers TripleO Heat Templates used to deploy the undercloud and the Ansible playbooks generated by config-download as well. Both of them are archived and compressed in /home/stack/undercloud-install-*.tar.bzip2 files everytime install/upgrade commands are run. 3) Collect ephemeral Heat logs /var/log/heat-launcher is a new directory that contains the heat-installer sqlite, logs and configuration. The content is small because it's only used once and it's ephemeral (purged everytime an operator install or upgrade an undercloud). However, collecting these files will be useful to help customers. 4) Collect new logfile When containerizing the undercloud, we're moving install-undercloud.log into $HOME which makes it more accessible for the users, while we're removing instack(-undercloud) bits over time. This patch add $HOME/install-undercloud.log file and document why we're doing this. Note that we still collect old file for previous releases. Resolves: #1279 Signed-off-by: Emilien Macchi Signed-off-by: Bryn M. Reeves --- sos/plugins/openstack_instack.py | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) diff --git a/sos/plugins/openstack_instack.py b/sos/plugins/openstack_instack.py index 900f51da..f6f6c6f6 100644 --- a/sos/plugins/openstack_instack.py +++ b/sos/plugins/openstack_instack.py @@ -13,6 +13,18 @@ from sos.plugins import Plugin, RedHatPlugin import os +NON_CONTAINERIZED_DEPLOY = [ + '/home/stack/.instack/install-undercloud.log', + '/home/stack/instackenv.json', + '/home/stack/undercloud.conf' +] +CONTAINERIZED_DEPLOY = [ + '/var/log/heat-launcher/', + '/home/stack/install-undercloud.log', + '/home/stack/undercloud-install-*.tar.bzip2' +] + + class OpenStackInstack(Plugin): """OpenStack Instack """ @@ -20,9 +32,7 @@ class OpenStackInstack(Plugin): profiles = ('openstack', 'openstack_undercloud') def setup(self): - self.add_copy_spec("/home/stack/.instack/install-undercloud.log") - self.add_copy_spec("/home/stack/instackenv.json") - self.add_copy_spec("/home/stack/undercloud.conf") + self.add_copy_spec(NON_CONTAINERIZED_DEPLOY + CONTAINERIZED_DEPLOY) if self.get_option("verify"): self.add_cmd_output("rpm -V %s" % ' '.join(self.packages)) -- cgit