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 4c071fcc3a
)
This commit is contained in:
parent
066851b083
commit
cd58db65ea
|
@ -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)
|
||||
|
|
Loading…
Reference in New Issue