Skip to content

LBIs for ComposeFS backend - #2679

Merged
cgwalters merged 6 commits into
bootc-dev:mainfrom
Johan-Liebert1:composefs-lbi
Nov 25, 2026
Merged

cgwalters merged 6 commits into
bootc-dev:mainfrom
Johan-Liebert1:composefs-lbi

Conversation

@Johan-Liebert1

@Johan-Liebert1 Johan-Liebert1 commented Nov 23, 2026 •

Copy link
Copy Markdown
Member

Requires: #2693

store: Create non booted composefs store

Similar to what we have for ostree, introduce new_composefs_from_state
which creates a composefs store during installations. This is in prep
for pulling logically bound images into bootc owned containers storage


cfs: Pull logically bound images

Remove the restriction on LBIs with composefs backend making sure to
pull any LBIs found in the container image. Similar to what the ostree
backend does, selabel the bootc owned container storage with accordance
to labels found in /var/lib/containers/storage

Ref: #2540


cfs/lbi: Pull LBIs on update/switch

Closes: #2540

Similar to what we have for ostree, introduce `new_composefs_from_state`
which creates a composefs store during installations. This is in prep
for pulling logically bound images into bootc owned containers storage

Signed-off-by: Pragyan Poudyal <pragyanpoudyal41999@gmail.com>
@Johan-Liebert1
Johan-Liebert1 requested review from cgwalters and a balanced review from Copilot November 23, 2026 05:48

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has insufficient remaining quota. Try requesting a review at a lower effort level.

@github-actions github-actions Bot added the area/install Issues related to `bootc install` label Nov 23, 2026
@bootc-bot
bootc-bot Bot requested a review from gursewak1997 November 23, 2026 05:48
@Johan-Liebert1
Johan-Liebert1 force-pushed the composefs-lbi branch 2 times, most recently from af69507 to 26324f9 Compare November 23, 2026 09:44
@Johan-Liebert1

Copy link
Copy Markdown
Member Author

ping @jmarrero

@Johan-Liebert1

Copy link
Copy Markdown
Member Author

Had missed UKI testing for LBIs. Fixed

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 Changes recommended

Critical SELinux labeling gaps can leave bound images inaccessible or incorrectly labeled, while missing retained-image references can abort upgrade/switch cleanup.

3 open issues

Review effort: Balanced

Comment thread crates/lib/src/install.rs Resolved
Comment thread crates/lib/src/podstorage.rs Resolved

@cgwalters cgwalters left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks sane overall

Comment thread crates/lib/src/install.rs Resolved
Comment thread crates/lib/src/podstorage.rs Resolved
{ "bound": true, "image": "registry.access.redhat.com/ubi9/ubi-minimal:9.4", "name": "ubi-minimal" },
# Don't use a fully qualified path to test https://github.com/bootc-dev/bootc/issues/2640
# NOTE: Not using a tagged image here as that could lead to flakes
{ "bound": true, "image": "nginx:1.31.9-alpine-slim", "name": "nginx" },

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah okay but why not have the test as part of the prior commit?

This particular image feels kind of...random. It seems more reliable to use...really any image via shorname which could just be e.g. fedora or ubuntu or busybox?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done in #2693. Combined the two commits and using busybox now.

tracing::debug!("bound_images: {images:?}");
live_bound_images.extend(images.iter().map(|i| i.image.clone()));
}
// This is so ugly, but some aboot tests run without initializing a repo

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Shouldn't we just fix those tests?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Unfortunately it's not an integration test, just a normal one, and it does require EROFS images. Fixing the tests would require pulling in an entire repo

Remove the restriction on LBIs with composefs backend making sure to
pull any LBIs found in the container image. Similar to what the ostree
backend does, selabel the bootc owned container storage with accordance
to labels found in `/var/lib/containers/storage`

Ref: bootc-dev#2540

Signed-off-by: Pragyan Poudyal <pragyanpoudyal41999@gmail.com>
Go through all live deployments and make sure we add all found bound
images in live images so that they're not garbage collected

Signed-off-by: Pragyan Poudyal <pragyanpoudyal41999@gmail.com>
Signed-off-by: Pragyan Poudyal <pragyanpoudyal41999@gmail.com>
Signed-off-by: Pragyan Poudyal <pragyanpoudyal41999@gmail.com>
@Johan-Liebert1
Johan-Liebert1 force-pushed the composefs-lbi branch 3 times, most recently from 19a8ef3 to 32f2322 Compare November 25, 2026 08:35
Some aboot GC tests run without ever initializing a repository which
ended up failing during GC where we query LBIs expecting the EROFS image
to exist. Fix by downcasting the error to `ImageNotFound` and simply
continuing if the downcast was successful

Signed-off-by: Pragyan Poudyal <pragyanpoudyal41999@gmail.com>
@cgwalters
cgwalters merged commit 0a55deb into bootc-dev:main Nov 25, 2026
55 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area/install Issues related to `bootc install`

Projects

None yet

Development

Successfully merging this pull request may close these issues.

install: logically bound images are not installed with --composefs-backend

3 participants