-
Notifications
You must be signed in to change notification settings - Fork 97
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
Use a different source for our os-release vars #2907
Comments
requires changes to:
|
Ideally we would not need to to keep a lot of the fallback in place for the following.
For this is necessary:
|
blocked until patch release for 3.2.x is done |
This one is full of os-release logic too: https://github.com/kairos-io/kairos-sdk/blob/main/versioneer/versioneer.go |
I see we changed some things here but we may have to rename some functions to not imply |
yes, there is a lot of changes needed, and most of them at the same time. For example, kairos needs the latest agent with the patches os-release to work wit the changtes done to it, but agent needs the latest sdk with the os-release changes :D So its mostly wait for patch release, then sdk, grub, packages, agent with new sdk, enki with new sdk and patch, then osbuilder with new enki then finally kairos with new agent, grub packages, enki, and osbuilder. changes are really small but the bringing everything together is the bad part :D |
all patches merged! |
Kairos version:
latest, ubuntu
CPU architecture, OS, and Version:
all
Describe the bug
if someone creates a derivative version and upgrade the system, there is a possibility of the upgrade overwriting the os-release file, which makes it lose our variables, thus breaking the system in several places.
One example of this is a base ubuntu 24.04.01 which was upgraded to 24.04.02 and then it didnt boot anymore as the upgrade overwrote the os-release file to update the versions
This affects EFI systems only as we run a workaround for Ubuntu EFI and we need to identify the system as being ubuntu.
To Reproduce
Get a base ubuntu 24.04.01 kairos image, run apt-get upgrade and build/upgrade to that image. It wont boot anymore
Expected behavior
If vars are not available on os-release, we have a backup file to read them for.
Logs
Additional context
The idea here would be to have 2 files.
Then make everything that reads os-release to get info, read first /etc/kairos/info first, then fallback into os-release
And with time, deprecate writing to os-release as much as possible as its owned by the OS/Distro
We could even during the transition time, just on initramfs check if the info its on /etc/os-release and if its not, fill it with the info from the info file so we can keep the same behaviour as before, but not be vulnerable to changes from the OS. So have it filled on runtime, but actual info is in a different place.
Then we can deprecate havint he info in there if we want or keep it that way.
Reported on community slack, real case.
The text was updated successfully, but these errors were encountered: