-
Notifications
You must be signed in to change notification settings - Fork 291
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
Remove ostree= as a hard dependancy from the systemd perspective #3190
Conversation
We've been working on re-enabling our Android Boot builds since composefs integration. This problem reared it's head again. The Android Boot images don't use the "ostree=" karg at all (they alternatively use the androidboot.slot_suffix= karg to determine what OSTree to boot into). We've been working around this by faking an ostree= argument of sorts in hacky ways. Ideally we could do a ostree= or androidboot.slot_suffix= karg check but systemd doesn't support that. Checks for ostree= or androidboot.slot_suffix= are already contained in binaries such as ostree-prepare-root, etc. So there are still checks, the systemd check is too limited. Signed-off-by: Eric Curtin <ecurtin@redhat.com>
cef630b
to
40bf5a8
Compare
This scares me a bit, I am not sure if doing this would affect systems with ostree installed because they use flatpaks. Like if we remove this conditional the services could trigger on cases like that? Also not sure of the historical reasons this is here. |
Flatpaks are pretty orthogonal to this change, they don't use systemd |
What this inclusion basically does: ConditionKernelCommandLine=ostree is cause things to fail early, but in our Android Boot Images we don't use this karg, we were faking it... We still fail when we exclude this option, just at a slightly later point. |
Using ostree via flatpak does not automatically trigger the inclusion of an ostree= karg it's worth pointing out explicitly also. |
What I mean is, if I am running packaged based Fedora and install ostree because of flatpaks or development or anything I am doing. Does systemd is now aware of these services or we only get them if a deployment is made. |
Yeah, I don't think this is a good idea as is. It will mean these services are started on boot on any system with the ostree package installed. That is not good, these are only meant to be started when the system is booted using ostree. |
Ok, lets fix this downstream, I'll just place a blank
or something like this, just to satisfy this.... |
You can create an OR of the conditions like:
However, it's not quite expressive enough if you want to add other triggering conditions like in Another obvious option would be a generator that can do a more thorough investigation of the environment and enable the units when needed. I also think that allowing the services to run and deferring the checks is entirely reasonable, but the programs would have to exit successfully so the service doesn't fail. For example, One thing I notice is that everything except |
Thanks @dbnicholson I can go back to this if ostree=true doesn't work out... The next problem is ostree-system-generator fstab generator expects that very specific ostree= karg (which we were hackily faking in the past)... But... We were talking about removing /etc/fstab entirely in our Automotive distro, so I'm gonna take the opportunity to try and not execute the fstab generation stuff altogether somehow (just for Automotive to start) |
I think a reasonable fix would be:
|
Looks like that was just changed to exit gracefully in 15ec339. |
Yeah it was... If we get this in: https://github.com/ostreedev/ostree/pull/3192/files The Android Boot environment matches the UEFI one as close as we possibly can, I've worked around this in the past by using downstream hacks. The above fixes a lot of these hacks... |
Yep, I think this would be a generally good idea to reduce our dependency on the |
We've been working on re-enabling our Android Boot builds since composefs integration. This problem reared it's head again. The Android Boot images don't use the "ostree=" karg at all (they alternatively use the androidboot.slot_suffix= karg to determine what OSTree to boot into). We've been working around this by faking an ostree= argument of sorts in hacky ways. Ideally we could do a ostree= or androidboot.slot_suffix= karg check but systemd doesn't support that. Checks for ostree= or androidboot.slot_suffix= are already contained in binaries such as ostree-prepare-root, etc. So there are still checks, the systemd check is too limited.