-
Notifications
You must be signed in to change notification settings - Fork 99
install: Fix firstboot-args being lost when using --config-file #1699
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
Conversation
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.
Code Review
This pull request fixes an issue where --firstboot-args were lost when a --config-file was also used. The change from #[serde(skip)] to #[serde(skip_serializing_if = "is_default")] correctly ensures the firstboot_args field is serialized when it has a value. However, as noted in the specific comment, this change is redundant. Simply removing the #[serde(skip)] attribute would be a cleaner solution. Additionally, the unit tests need to be updated to reflect this change in behavior, as the serialize_full_install_config test will now fail. It would also be beneficial to add a new test case that specifically verifies the fix for the reported bug.
444ef6b to
6afa835
Compare
bbd6e3b to
251e0f7
Compare
|
I still thinking what is the best approach. There is other more complex solution such changing the Any insights? |
|
Hmm, yeah this seems more complex than I expected. I think it was by design that I think probably the simplest thing is to just have |
251e0f7 to
1bf5896
Compare
3ae23cb to
875919c
Compare
875919c to
26094bf
Compare
|
Hey @jlebon, thanks for your review! I was not aware about how the args are used and if the user had to handle it directly. I fixed it following your comment and also add a unit test to be sure that it will work. Can you take a look and tell me what you think about it now? Thanks :) |
dustymabe
left a comment
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.
LGTM. I did a local test and it seems to fix the problem.
BUGS:
[coreos/coreos-installer] Args passed via
--firstboot-argsare lost if also using--config-fileWhen you use both a config file and -
-firstboot-args, the firstboot arguments disappear.Cannot use auto-forward kargs (like ip=) with coreos-installer (iso|pxe) customize
When customizing PXE/ISO images, networking arguments that should be automatically forwarded don't work.
FIX:
Checks if
firstboot_argsis defined and manually adds--firstboot-argsto the arguments list.