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

Fixes #36809 - Do not clobber answers provided on the command line wi… #891

Open
wants to merge 1 commit into
base: develop
Choose a base branch
from

Conversation

ehelms
Copy link
Member

@ehelms ehelms commented Oct 6, 2023

…th --certs-regenerate

Problem:

foreman-installer --certs-state Texas --certs-regenerate True

The installer will see and run as if the state value was changed to Texas, regenerating certificates. However, because kafo.config.app.answers returns the answers file and not the compiled params, what gets written back to the answers file is the original answers at runtime. Thus the answers file now have the previous value (e.g. North Carolina) and the next installer run will trigger a certificate update under the hood.


kafo.config.store(answers)
kafo.send(:store_params)
Copy link
Member Author

@ehelms ehelms Oct 6, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I agree this is a bit ugly, calling into a private method. My goal here is to patch the problem first with a fix that can be cherry picked cleanly backward. The alternative is to add methods to kafo and then release a patch release and also a patch to the installer for older releases.

@ehelms
Copy link
Member Author

ehelms commented Oct 6, 2023

This is intended to be a patch that fixes the issue, and I think what needs to follow is a real fix to the way we regenerate certificates which is now possible that we have gotten rid of the RPM part.

@ekohl
Copy link
Member

ekohl commented Oct 12, 2023

Some notes: it was introduced in e28a519 and we shouldn't store --certs-regenerate but it should be passed to Puppet.

I'm now debating options, but can't think of any right now. I'll get back to this.

@ehelms
Copy link
Member Author

ehelms commented Dec 15, 2023

[test foreman-installer]

@ehelms
Copy link
Member Author

ehelms commented Jan 16, 2024

@ekohl This is still a pretty ugly problem that it can cause, do you have any additional thoughts or review?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
2 participants