From feef6e73b9f753786e85ade4aef3ff0dde877c46 Mon Sep 17 00:00:00 2001 From: Carlos Camacho Date: Fri, 22 Jun 2018 14:32:09 +0200 Subject: [PATCH] Include --xattrs when creating the undercloud backup. We need to use --xattrs when running the backup, otherwise swift objects after the restore won't be accesible. (cherry picked from commit bd11ebccfe21f4c0a1833b6afb2c2bc040f6696f) Change-Id: I62e5488c78c95368f6b6b967a5504ff3478f1fce Closes-Bug: 1778215 --- tripleo_common/actions/undercloud.py | 2 +- tripleo_common/tests/actions/test_undercloud.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/tripleo_common/actions/undercloud.py b/tripleo_common/actions/undercloud.py index 339a702bf..ee5547293 100644 --- a/tripleo_common/actions/undercloud.py +++ b/tripleo_common/actions/undercloud.py @@ -156,7 +156,7 @@ class CreateFileSystemBackup(base.Action): script = """ #!/bin/bash - sudo tar --ignore-failed-read -C / -cf %s %s + sudo tar --xattrs --ignore-failed-read -C / -cf %s %s sudo chown mistral. %s """ % (self.outfile, separated_string, self.outfile) diff --git a/tripleo_common/tests/actions/test_undercloud.py b/tripleo_common/tests/actions/test_undercloud.py index ece06f40b..143b821ca 100644 --- a/tripleo_common/tests/actions/test_undercloud.py +++ b/tripleo_common/tests/actions/test_undercloud.py @@ -114,7 +114,7 @@ class CreateFileSystemBackupTest(base.TestCase): self.fsback.logger = mock.Mock() self.fsback.run(mock_get_object_client) assert_string = ('\n #!/bin/bash\n ' - 'sudo tar --ignore-failed-read -C / ' + 'sudo tar --xattrs --ignore-failed-read -C / ' '-cf ' + self.fsback.outfile + ' /home/stack/ /etc/hosts\n '