generator: Conditionally enable bootc-status units#1610
generator: Conditionally enable bootc-status units#1610jeckersb merged 2 commits intobootc-dev:mainfrom
Conversation
There was a problem hiding this comment.
Code Review
This pull request correctly prevents the bootc-publish-rhsm-facts.service from running on non-bootc systems by adding the ConditionPathExists=/run/ostree-booted check. This will fix failures on systems that have subscription-manager but are not managed by bootc. The change is logical and aligns with how other bootc services are conditioned. I have one suggestion to improve the maintainability of a TODO comment that was added.
349f9c4 to
e3f216d
Compare
|
OK I reworked this more deeply. |
As soon as we went from a single binary to shipping systemd units, we can't just blindly `COPY /new /` as it will leak old files. In the end as the comment says we probably need to go to building packages eventually. Signed-off-by: Colin Walters <walters@verbum.org>
e3f216d to
ff82063
Compare
|
OK, reworked this one even more. It took me a bit of time to figure out of course the reason my changes weren't working was actually just the build leaking state from the old RPM. Per the comment I guess we probably need to build packages in the Dockerfile. |
Right now this service fails in `bcvk run-ephemeral`, but also likely fails in any non-bootc system that has `subscription-manager` installed. A problem is that dependencies of units are started even if the dependee has a condition that disables it. This basically the target and path depend on `/run/ostree-booted` being present (which yes, won't work for composefs...) Tests: Covered by extant `012-test-unit-status.nu` Signed-off-by: Colin Walters <walters@verbum.org>
ff82063 to
f630fd5
Compare
Right now this service fails in
bcvk run-ephemeral, butalso likely fails in any non-bootc system that has
subscription-managerinstalled.
A problem is that dependencies of units are started even
if the dependee has a condition that disables it.
This basically the target and path depend on
/run/ostree-bootedbeing present (which yes, won't work for composefs...)
Tests: Covered by extant
012-test-unit-status.nu