-
Notifications
You must be signed in to change notification settings - Fork 88
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
saved_entry grub options not getting applied on boot after upgrading kairos from 2.0.3 to 2.1.0 #1460
Comments
I verified what @venkatnsrinivasan also noted in Slack, that on core
results in this file to be created:
The problem lies either in the upgrade process or in the way the config is passed through the handler. |
There isnt an upgrade process, i think the upgrade in the ticket means , when using 2.0.3 vs 2.1.0. I tried creating a config yaml similar to above except the grub_options are set via our provider when kairos-agent sends the install event .It generates the 90_custom.yaml with the grub options but the grubenv isnt getting generated. |
I think I know what's going on. The result from the provider is merged back to the object we pass to |
Not only this but the This also means, that the Maybe it's better if we fix this as part of this: kairos-io/kairos-agent#32 which is already changing this part of the code, fixing some other bugs. |
This is ugly and hackish. We merge back the provider's config into `r["cc"]` because that's what RunInstall only uses as a cloud config. Ideally, we should consolidate all those configurations and the RunInstall should only take one argument which will be a struct that holds all the information on how to perform the installation. This refactoring will happen separately. This is just a quick fix for the bug. kairos-io/kairos#1460 Signed-off-by: Dimitris Karakasilis <dimitris@karakasilis.me>
We discussed this and proper fix requires a heavy refactoring. We will try to provider a quick fix first and do the refactoring separately. I created a possible quick fix here: kairos-io/kairos-agent@1672683 but I need a provider mock that sends back a cloud config, in order to try it out. I will try to create one and test. |
I created a simple provider here: https://github.com/jimmykarily/kairos-provider-mock . I'll try to test it now. |
This is ugly and hackish. We pass the provider's cloud config to the collector so that it's is included in the `r["cc"]` that we pass to the `RunInstall` method. That's what is uses as a cloud config. Ideally, we should consolidate all those configurations and the RunInstall should only take one argument which will be a struct that holds all the information on how to perform the installation. This refactoring will happen separately. This is just a quick fix for the bug. kairos-io/kairos#1460 Signed-off-by: Dimitris Karakasilis <dimitris@karakasilis.me>
This is ugly and hackish. We pass the provider's cloud config to the collector so that it's is included in the `r["cc"]` that we pass to the `RunInstall` method. That's what is uses as a cloud config. Ideally, we should consolidate all those configurations and the RunInstall should only take one argument which will be a struct that holds all the information on how to perform the installation. This refactoring will happen separately. This is just a quick fix for the bug. kairos-io/kairos#1460 Signed-off-by: Dimitris Karakasilis <dimitris@karakasilis.me>
I amended the fix here: kairos-io/kairos-agent@a53d8a0 I tested it like this:
to be able to login after installation
Installation went through and I can see this in the installed system:
So everything has worked except that there is still no |
My fix is invalid. I was looking at the In the meantime, setting |
but reboot happens some lines above: https://github.com/kairos-io/kairos-agent/blob/5fe8eb8cc2617e96e609da282d1079a95ba06e0c/internal/agent/install.go#L340 (when |
otherwise grub is not configured (among other things skipped) Fixes kairos-io/kairos#1460 Signed-off-by: Dimitris Karakasilis <dimitris@karakasilis.me>
This seems to work: kairos-io/kairos-agent#36 Of course, passing yet another config to the |
because the Lifecycle hook will do that Fixes kairos-io/kairos#1460 Signed-off-by: Dimitris Karakasilis <dimitris@karakasilis.me>
@Itxaka found the real reason it was failing and we adapted the PR. Will merge soon and prepare to include in the upcoming release. |
Kairos version:
CPU architecture, OS, and Version:
Describe the bug
We are adding
saved_entry
grub_options as part of the elemental install config through kairos pkggithub.com/kairos-io/kairos/pkg/config
. These options get passed to the install config through a handler which gets executed byagent.install
plugin event.This is from 90_custom.yaml just after elemental install:
Here, setting the
saved_entry
flag to the registration grub. But after elemental installation is done, the next boot is not going to this grub instead it is going to the first entry in the grub menu. This has started to happen from v2.1.0.Pasting my grubmenu.cfg here:
One more thing I noticed is that in v2.1.0 after elemental installation, there is no
grubenv
file getting created in/oem
.In v2.0.3
In v2.1.0
Expected behavior
Expected to boot into proper grub menu entry. Here, in this case, it should boot into
menuentry "Palette eXtended Kubernetes Edge Registration" --id registration
. It was working fine till v2.0.3.The text was updated successfully, but these errors were encountered: