Skip to content

cli: Initialize bootc storage before upgrade --check#2118

Open
cgwalters wants to merge 1 commit intobootc-dev:mainfrom
cgwalters:init-storage-earlier
Open

cli: Initialize bootc storage before upgrade --check#2118
cgwalters wants to merge 1 commit intobootc-dev:mainfrom
cgwalters:init-storage-earlier

Conversation

@cgwalters
Copy link
Copy Markdown
Collaborator

We had a report of bootc upgrade --check failing after a new install - this was using Anaconda with the legacy ostreecontainer verb that only knows about ostree.

Hoist the image_exists_in_unified_storage() call (which ensures the bootc storage directory exists via get_ensure_imgstore()) above the opts.check branch so it runs for both --check and full upgrade paths.

Relates: https://issues.redhat.com/browse/RHEL-153671

Assisted-by: OpenCode (Claude Opus 4)

@bootc-bot bootc-bot bot requested a review from jmarrero April 2, 2026 17:35
Copy link
Copy Markdown
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 refactors the upgrade function in crates/lib/src/cli.rs by moving the initialization of the bootc storage directory and the detection of unified storage usage earlier in the process. This ensures that the storage is correctly initialized for both the --check path and the standard upgrade path. I have no feedback to provide as there were no review comments.

jeckersb
jeckersb previously approved these changes Apr 2, 2026
Copy link
Copy Markdown
Collaborator

@jeckersb jeckersb left a comment

Choose a reason for hiding this comment

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

Tangential to this, it occurs that none of the mtime-triggered stuff like rhsm fact generation works correctly for the composefs backend. I'll file an issue for that.

We had a report of `bootc upgrade --check` failing after
a new install - this was using Anaconda with the legacy
`ostreecontainer` verb that only knows about ostree.

Hoist the image_exists_in_unified_storage() call (which ensures the
bootc storage directory exists via get_ensure_imgstore()) above the
opts.check branch so it runs for both --check and full upgrade paths.

Relates: https://issues.redhat.com/browse/RHEL-153671

Assisted-by: OpenCode (Claude Opus 4)
Signed-off-by: Colin Walters <walters@verbum.org>
@jeckersb
Copy link
Copy Markdown
Collaborator

jeckersb commented Apr 3, 2026

     Running `target/debug/bootc internals dump-cli-json`
error: reading /proc/1/ns/ipc: Permission denied (os error 13)
error: Generating manpages: Syncing man pages: Extracting CLI: Running CLI JSON dump command: command exited with non-zero code `cargo run --features=docgen -- internals dump-cli-json`: 1

🤔

@cgwalters
Copy link
Copy Markdown
Collaborator Author

@jeckersb fix for that is in #2117

@jeckersb
Copy link
Copy Markdown
Collaborator

jeckersb commented Apr 3, 2026

@jeckersb fix for that is in #2117

Ok merged that, this should hopefully be good after a rebase

@cgwalters cgwalters enabled auto-merge (rebase) April 3, 2026 18:05
@cgwalters
Copy link
Copy Markdown
Collaborator Author

None of the RPM jobs are currently blocking in the merge queue

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.

2 participants