aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMartin André <m.andre@redhat.com>2017-07-17 09:46:24 +0200
committerMartin André <m.andre@redhat.com>2017-07-17 10:01:38 +0200
commitfc1caced86b80bb171f495a0f09aed3ef867ab01 (patch)
tree8ce5cb01649f6a927a2619c52e2f4e25c9325aee
parent5e07cc1ab4e1d96632ac961f1c11b68bcff6fbdd (diff)
downloadkolla-fc1caced86b80bb171f495a0f09aed3ef867ab01.tar.gz
kolla-fc1caced86b80bb171f495a0f09aed3ef867ab01.zip
Only copy symlinks when merge and preserve_properties are set
The kolla-kubernetes config files live in a ..data directory in the config volume and are symlinked with relative path at the root of the config volume. This naturally breaks with the link copy feature introduce in I92a404b8d301937dc1847d42576e30db43951990. This commit restores the original behavior to copy the target of the link unless both 'merge' and 'preserve_properties' options are set, in which case the link itself is copied. Change-Id: I5d768687208205fb50ef5ab93675f47e98ea6351
-rw-r--r--docker/base/set_configs.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/docker/base/set_configs.py b/docker/base/set_configs.py
index b6c56ca97..65ce210ba 100644
--- a/docker/base/set_configs.py
+++ b/docker/base/set_configs.py
@@ -75,7 +75,7 @@ class ConfigFile(object):
self._delete_path(dest)
# dest endswith / means copy the <source> to <dest> folder
LOG.info('Copying %s to %s', source, dest)
- if os.path.islink(source):
+ if self.merge and self.preserve_properties and os.path.islink(source):
link_target = os.readlink(source)
os.symlink(link_target, dest)
else: