From 5629b5aad950ca3542658f7c2ffb5269f415e1ae Mon Sep 17 00:00:00 2001 From: Mark Goddard Date: Wed, 20 Mar 2019 18:59:28 +0000 Subject: [PATCH] Fix swift reconfigure Reconfiguring Swift currently fails to restart containers if configuration changes. This is because kolla_set_configs is executed in the containers as the default swift user, which does not have permission to access all necessary files. This change uses the root user to execute the command instead, which allows it to exit with the correct status of 1 if the config files differ. Change-Id: I2a2363c71430a7173bb5253662412ae5dba09654 --- ansible/roles/swift/tasks/reconfigure.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ansible/roles/swift/tasks/reconfigure.yml b/ansible/roles/swift/tasks/reconfigure.yml index 5b5ef0aece..09442fd962 100644 --- a/ansible/roles/swift/tasks/reconfigure.yml +++ b/ansible/roles/swift/tasks/reconfigure.yml @@ -32,7 +32,7 @@ - include_tasks: config.yml - name: Check the configs - command: docker exec {{ item.name }} /usr/local/bin/kolla_set_configs --check + command: docker exec -u root {{ item.name }} /usr/local/bin/kolla_set_configs --check changed_when: false failed_when: false register: check_results