-
Notifications
You must be signed in to change notification settings - Fork 97
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
🐛 Incorrect merging of cloud-config files with same stages #1341
Comments
this looks bad, however merging was introduced recently - but I guess this is problematic as you didn't had merges before, and now we have unpredictable results. Is this blocking you ? I've just pushed it to the next release, but if this is impacting you a lot we will need to catch a patch release |
I can confirm that I can reproduce. The issue comes from the mergo merge here kairos/pkg/config/collector/collector.go Line 68 in 3980bf1
Which seems to be known issue :/ darccio/mergo#204 |
fixes #1341 Signed-off-by: Mauro Morales <[email protected]>
fixes #1341 Signed-off-by: Mauro Morales <[email protected]>
The issue is in since we introduced mergo, so could be around 1.6.1 if I'm not mistaken, or otherwise just the v2 releases. The fix has been merged, and 2.0.3 should be out soon. @venkatnsrinivasan thanks for bringing this to our attention |
Kairos version:
CPU architecture, OS, and Version:
Linux localhost 5.15.0-69-generic #76~20.04.1-Ubuntu SMP Mon Mar 20 15:54:19 UTC 2023 x86_64 x86_64 x86_64 GNU/Linux
Describe the bug
Two config files with same stages dont get merged correctly.
To Reproduce
1 . Boot the kairos-ubuntu-20-lts-v2.0.2.iso in manual mode
2. Create two files under /oem with the following entries
10_config.yaml
20_config.yaml
Expected behavior
Both the user entries should be present in the target . Instead the merged config file looks like this
cat /tmp/xxxx2698469135
It does not matter if the stages contain the same steps. e.g. one file can contain initramfs->commands and other contains initramfs->users and only one is present in the result. if we change one of the files to "initramfs.after" it merges correctly
The text was updated successfully, but these errors were encountered: