-
Notifications
You must be signed in to change notification settings - Fork 135
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
base: develop
Are you sure you want to change the base?
Conversation
|
||
kafo.config.store(answers) | ||
kafo.send(:store_params) |
There was a problem hiding this comment.
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.
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. |
Some notes: it was introduced in e28a519 and we shouldn't store I'm now debating options, but can't think of any right now. I'll get back to this. |
[test foreman-installer] |
@ekohl This is still a pretty ugly problem that it can cause, do you have any additional thoughts or review? |
…th --certs-regenerate
@ekohl Do you have any additional ideas or can we move forward with this change to prevent this issue as-is for users? |
My issue with the current implementation is that I'm looking at https://github.com/theforeman/kafo/blob/master/doc/kafo_run.png and I'm wondering if we should take a different approach:
I don't know what the best mechanism is to store data between hooks. Our |
None of this worked. And you are correct -- the current implementation saves the answers and that is why it's not working entirely correctly. I tried a variety of ideas using the The approach I have proposed here modifies this to only reset the single parameter back to false rather than resetting all the answers back. Ideally we get rid of the |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's at least respect the --noop
and --dont-save-answers
flags and avoid storing the answers then. Then I think this is OK to merge.
Co-authored-by: Ewoud Kohl van Wijngaarden <ewoud@kohlvanwijngaarden.nl>
Accepted your update |
@ekohl Are you good with this updated form? |
@ekohl I would still like to get this localized fix in to prevent this issue for users and deal with the larger re-factor design issues as a follow up. |
…th --certs-regenerate
Problem:
The installer will see and run as if the
state
value was changed to Texas, regenerating certificates. However, becausekafo.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.