|
|
5baea9 |
From 1b9c2032149488a2372d188a8ed3251e364f41cf Mon Sep 17 00:00:00 2001
|
|
|
5baea9 |
From: Emilien Macchi <emilien@redhat.com>
|
|
|
5baea9 |
Date: Wed, 24 Apr 2019 20:54:05 -0400
|
|
|
5baea9 |
Subject: [PATCH] [openstack_instack] add ansible.log
|
|
|
5baea9 |
|
|
|
5baea9 |
Collect /var/lib/mistral/config-download-latest/ansible.log which is an
|
|
|
5baea9 |
important log to be able to debug issues with Ansible playbooks.
|
|
|
5baea9 |
|
|
|
5baea9 |
/var/lib/mistral/config-download-latest is a directory that exists
|
|
|
5baea9 |
anyway on the undercloud and is the place where the ansible logs is
|
|
|
5baea9 |
stored.
|
|
|
5baea9 |
|
|
|
5baea9 |
Note: we don't want to collect the whole /var/lib/mistral because it
|
|
|
5baea9 |
contains sensitive informations like username/passwords/endpoints.
|
|
|
5baea9 |
|
|
|
5baea9 |
rhbz#1702806
|
|
|
5baea9 |
rhbz#1702802
|
|
|
5baea9 |
|
|
|
5baea9 |
Resolves: #1661
|
|
|
5baea9 |
|
|
|
5baea9 |
Signed-off-by: Emilien Macchi <emilien@redhat.com>
|
|
|
5baea9 |
Signed-off-by: Bryn M. Reeves <bmr@redhat.com>
|
|
|
5baea9 |
---
|
|
|
5baea9 |
sos/plugins/openstack_instack.py | 3 ++-
|
|
|
5baea9 |
1 file changed, 2 insertions(+), 1 deletion(-)
|
|
|
5baea9 |
|
|
|
5baea9 |
diff --git a/sos/plugins/openstack_instack.py b/sos/plugins/openstack_instack.py
|
|
|
5baea9 |
index e3470f5a..15e6c384 100644
|
|
|
5baea9 |
--- a/sos/plugins/openstack_instack.py
|
|
|
5baea9 |
+++ b/sos/plugins/openstack_instack.py
|
|
|
5baea9 |
@@ -22,7 +22,8 @@ NON_CONTAINERIZED_DEPLOY = [
|
|
|
5baea9 |
CONTAINERIZED_DEPLOY = [
|
|
|
5baea9 |
'/var/log/heat-launcher/',
|
|
|
5baea9 |
'/home/stack/install-undercloud.log',
|
|
|
5baea9 |
- '/home/stack/undercloud-install-*.tar.bzip2'
|
|
|
5baea9 |
+ '/home/stack/undercloud-install-*.tar.bzip2',
|
|
|
5baea9 |
+ '/var/lib/mistral/config-download-latest/ansible.log'
|
|
|
5baea9 |
]
|
|
|
5baea9 |
|
|
|
5baea9 |
|
|
|
5baea9 |
--
|
|
|
5baea9 |
2.17.2
|
|
|
5baea9 |
|
|
|
5baea9 |
From ba77701624dccf3ba98fee6e9cdb9b9d804068c2 Mon Sep 17 00:00:00 2001
|
|
|
5baea9 |
From: Pavel Moravec <pmoravec@redhat.com>
|
|
|
5baea9 |
Date: Tue, 9 Jul 2019 13:23:37 +0200
|
|
|
5baea9 |
Subject: [PATCH] [archive] convert absolute symlink targets to relative
|
|
|
5baea9 |
|
|
|
5baea9 |
Calling _make_leading_paths for a symlink with absolute symlink target
|
|
|
5baea9 |
must create the symlink relative to the source. This will prevent
|
|
|
5baea9 |
creating symlinks outside sosreport build dir.
|
|
|
5baea9 |
|
|
|
5baea9 |
Resolves: #1710
|
|
|
5baea9 |
|
|
|
5baea9 |
Signed-off-by: Pavel Moravec <pmoravec@redhat.com>
|
|
|
5baea9 |
---
|
|
|
5baea9 |
sos/archive.py | 5 +++++
|
|
|
5baea9 |
1 file changed, 5 insertions(+)
|
|
|
5baea9 |
|
|
|
5baea9 |
diff --git a/sos/archive.py b/sos/archive.py
|
|
|
5baea9 |
index 9e19426c5..dcd6908d1 100644
|
|
|
5baea9 |
--- a/sos/archive.py
|
|
|
5baea9 |
+++ b/sos/archive.py
|
|
|
5baea9 |
@@ -232,6 +232,11 @@ def in_archive(path):
|
|
|
5baea9 |
dest = self._make_leading_paths(target_src, mode=mode)
|
|
|
5baea9 |
dest = os.path.normpath(dest)
|
|
|
5baea9 |
|
|
|
5baea9 |
+ # In case symlink target is an absolute path, make it
|
|
|
5baea9 |
+ # relative to the directory with symlink source
|
|
|
5baea9 |
+ if os.path.isabs(target):
|
|
|
5baea9 |
+ target = os.path.relpath(target, target_dir)
|
|
|
5baea9 |
+
|
|
|
5baea9 |
self.log_debug("Making symlink '%s' -> '%s'" %
|
|
|
5baea9 |
(abs_path, target))
|
|
|
5baea9 |
os.symlink(target, abs_path)
|