Stop merging config when symlink points to same file

This can result in duplicated configuration options.

Change-Id: I4dd6ffae027345b8c1cc217a63e85f8af7fc9746
Closes-Bug: #2042689
This commit is contained in:
Will Szumski 2023-11-03 17:42:35 +00:00
parent 9836fa7e6c
commit 2f4b45cd17
2 changed files with 9 additions and 0 deletions

View File

@ -119,6 +119,9 @@ class ConfigCollector(object):
if not rule:
continue
sources = map(os.path.realpath, sources)
sources = _dedup(sources)
if rule["strategy"] == 'copy':
copy = {
"src": sources[-1],

View File

@ -0,0 +1,6 @@
---
fixes:
- |
Stop merging config when a symlink points to the same file. This
was a common pattern before the merging of kolla config was introduced
and results in duplicated config options.