From cd58db65eaf669c31507d66d872d92913adafe6d Mon Sep 17 00:00:00 2001 From: Yamato Tanaka Date: Tue, 29 Mar 2022 11:35:12 +0900 Subject: [PATCH] Emit log when copying file/directory permissions Currently, kolla sets file permissions at _set_properties_from_file() method, but no logs are emitted here. This can make it difficult to investigate the cause of issues which are caused by setting permissions. This patch makes _set_properties_from_file() output a log. Closes-Bug: #1966825 Change-Id: I91116931aa30fd2c5e51ed1ac04663fcfa4a5f36 (cherry picked from commit 4c071fcc3a5efa01240602d6566035029fce2d5b) --- docker/base/set_configs.py | 1 + 1 file changed, 1 insertion(+) diff --git a/docker/base/set_configs.py b/docker/base/set_configs.py index e624f29ba8..1d1fc48aec 100644 --- a/docker/base/set_configs.py +++ b/docker/base/set_configs.py @@ -120,6 +120,7 @@ class ConfigFile(object): self._set_properties_from_conf(dest) def _set_properties_from_file(self, source, dest): + LOG.info('Copying permissions from %s onto %s', source, dest) shutil.copystat(source, dest) stat = os.stat(source) os.chown(dest, stat.st_uid, stat.st_gid)