Skip to content

Conversation

cgwalters
Copy link
Collaborator

@cgwalters cgwalters commented Sep 12, 2025

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

@bootc-bot bootc-bot bot requested a review from jeckersb September 12, 2025 17:15
Copy link
Contributor

@gemini-code-assist gemini-code-assist bot left a 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 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.

@cgwalters cgwalters marked this pull request as draft September 12, 2025 17:17
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 <[email protected]>
@cgwalters cgwalters force-pushed the bootc-publish-condition branch from 349f9c4 to e3f216d Compare September 12, 2025 21:42
@cgwalters cgwalters changed the title bootc-publish-rhsm-facts: Add ConditionPathExists=/run/ostree-booted generator: Conditinally enable bootc-status units Sep 12, 2025
@cgwalters cgwalters marked this pull request as ready for review September 12, 2025 21:45
@cgwalters
Copy link
Collaborator Author

OK I reworked this more deeply.

@cgwalters cgwalters changed the title generator: Conditinally enable bootc-status units generator: Conditionally enable bootc-status units Sep 15, 2025
@cgwalters cgwalters marked this pull request as draft September 22, 2025 18:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant