Skip to content
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

Prevent overwriting of existing feature config files on elemental init #2063

Open
anmazzotti opened this issue May 3, 2024 · 0 comments
Open
Labels
area/init kind/enhancement New feature or request

Comments

@anmazzotti
Copy link
Contributor

anmazzotti commented May 3, 2024

Is your feature request related to a problem? Please describe.

When invoking elemental init, any existing feature config file on the system will be overwritten.
For example:

COPY my/custom/04_accounting.yaml /system/oem/04_accounting.yaml
RUN elemental init --force cloud-config-defaults

The 04_accounting.yaml coming with the cloud-config-defaults feature will overwrite the custom one I copied before.
There is no clear indication of the overwriting, so this is prone to mistakes when customizing a derivative image.

Describe the solution you'd like

I would like a warning to highlight which files are going to be overwritten.
Ideally I would like elemental init and my image build to fail due to file conflicts, rather than just emitting a warning.

Describe alternatives you've considered

Simply copying the custom file after running elemental init solves the problem.
The only trouble I have with this is that it's a bit counter-intuitive, as a user I'd expect to fully customize my derivative image before invoking elemental init, so that init will be the last step.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/init kind/enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants