manifest/raw_bootc: support subscription registration on first boot (HMS-10897)#2528
Merged
Merged
Conversation
supakeen
reviewed
Jul 17, 2026
| // insights on boot | ||
| InsightsOnBoot: true, | ||
| UnitPath: osbuild.EtcUnitPath, | ||
| PermissiveRHC: common.ValueOrEmpty(p.OSCustomizations.PermissiveRHC), |
Member
There was a problem hiding this comment.
This isn't actually ever set right? Not a blocker but also just a no-op at the moment.
Contributor
Author
There was a problem hiding this comment.
Correct. I went ahead and added a comment (// no-op for now: manifestForDisk never sets OSCustomizations.PermissiveRHC) but we could probably also wire it up without too much effort.
supakeen
previously approved these changes
Jul 17, 2026
Member
|
Needs linter appeasement otherwise OK. |
lucasgarfield
force-pushed
the
bootc-subscription
branch
from
July 17, 2026 13:45
5f7fb34 to
02f91aa
Compare
brlane-rht
reviewed
Jul 17, 2026
brlane-rht
reviewed
Jul 17, 2026
brlane-rht
reviewed
Jul 17, 2026
Contributor
|
Is there a reason you didn't add this to PXE and ISO types? |
lucasgarfield
force-pushed
the
bootc-subscription
branch
from
July 21, 2026 15:55
02f91aa to
501ac57
Compare
Contributor
Author
I will do so in a follow-up. I’m still quite new to hacking on |
This only takes effect once callers populate OSCustomizations.Subscription; see the follow-up commit. Previously, the only source of inline data was Customizations.Files. Now we also need to create inline sources for files needed for subscription. For the sake of consistency with the OS pipeline in os.go, we add an inlineData field to RawBootcImage. The getInline() method just becomes a getter for the inlineData field. A new helper, genFileStagesAndRecordInlineData(), roughly mirrors (*OS).addStagesForAllFilesAndInlineData. Unlike the OS pipeline, however, there is no fileRefs() implementation here, so the helper returns an error for URI-backed files; previously these silently produced a manifest referencing a source that was never defined. In addition to files, the subscriptionService() function also enables a service, so the subscription code block emits a systemd stage for it. For subscriptionServiceOptions, InsightsOnBoot creates a drop-in that reruns Insights collection on every healthy boot so that after an upgrade the console reflects the new commit hash (see a6ecc32). UnitPath needs to be /etc/ because /usr/ is immutable. For the most part, the tests attempt to mirror the relevant tests for os.go.
Copy the requested subscription options into the image customizations in manifestForDisk, so bootc disk images (qcow2, ami, ...) register on first boot via the machinery added in the previous commit.
TestRawBootcPXE collected mkdir paths by hand. A previous commit added collectMkdirPaths for the same job, so use it here too.
lucasgarfield
force-pushed
the
bootc-subscription
branch
from
July 22, 2026 11:44
501ac57 to
f9dfdc4
Compare
supakeen
approved these changes
Jul 22, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Wire up
customizations.subscriptionfor bootc disk images (qcow2, ami, ...).The shared subscriptionService() machinery now runs in the RawBootcImage
pipeline: it creates the first-boot registration unit in /etc (not /usr, which
is immutable ostree content) and reruns Insights collection on boot so the
console reflects the new commit hash after upgrades — same options the
standalone Subscription pipeline uses for ostree systems.
Only the disk variant is wired for now.
While in there, URI-backed file customizations now return a clear error at
manifest generation time — they were previously silently broken in this
pipeline (missing manifest source).