Skip to content

Conversation

jeckersb
Copy link
Collaborator

@jeckersb jeckersb commented Oct 2, 2025

If the system has a swap partition (or any other volume which is not
currently mounted) the findmnt command will (expectedly) fail to
find it. Don't early exit in this case, instead just ignore that
volume. If it wasn't mounted in the first place, we don't need to
warn about it being unmounted after the reinstall operation is
complete.

Signed-off-by: John Eckersberg jeckersb@redhat.com
Closes: #1659

@github-actions github-actions bot added the area/system-reinstall-bootc Issues related to system-reinstall-botoc label Oct 2, 2025
@bootc-bot bootc-bot bot requested a review from henrywang October 2, 2025 20:55
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 failures when encountering unmounted LVM volumes by ignoring errors from findmnt. My review includes a suggestion to improve robustness by logging these errors at a debug level instead of silently swallowing them. This helps in diagnosing unexpected issues without altering the intended behavior for unmounted volumes.

@henrywang henrywang force-pushed the s-r-b-ignore-unmounted branch from 34e8b5f to 28cf283 Compare October 3, 2025 01:38
@henrywang
Copy link
Collaborator

henrywang commented Oct 3, 2025

Thanks @jeckersb working no this issue! I made a rebase to include #1642 for testing this fix.

@henrywang
Copy link
Collaborator

henrywang commented Oct 3, 2025

Just ignore CS10, fedora 42 and 43 testing-farm: failures. PR #1664 fixed the failure.

Looks CS9 still has issue:

02:11:53             out: Image localhost/bootc-integration is already present locally, skipping pull.
02:11:53             out: 
02:11:53             out: Found only one user (root) with 1 SSH authorized keys.
02:11:53             out: Would you like to import its SSH authorized keys
02:11:53             out: into the root user on the new bootc system?
02:11:53             out:
                Then you can login as root@ using those keys. [Y/n] 
                Found only one user (root) with 1 SSH authorized keys.
02:11:53             out: Would you like to import its SSH authorized keys
02:11:53             out: into the root user on the new bootc system?
02:11:53             out: Then you can login as root@ using those keys. yes
02:11:53             out: error: No such file or directory (os error 2)

@jeckersb
Copy link
Collaborator Author

jeckersb commented Oct 3, 2025

Just ignore CS10, fedora 42 and 43 testing-farm: failures. PR #1664 fixed the failure.

Looks CS9 still has issue:

02:11:53             out: Image localhost/bootc-integration is already present locally, skipping pull.
02:11:53             out: 
02:11:53             out: Found only one user (root) with 1 SSH authorized keys.
02:11:53             out: Would you like to import its SSH authorized keys
02:11:53             out: into the root user on the new bootc system?
02:11:53             out:
                Then you can login as root@ using those keys. [Y/n] 
                Found only one user (root) with 1 SSH authorized keys.
02:11:53             out: Would you like to import its SSH authorized keys
02:11:53             out: into the root user on the new bootc system?
02:11:53             out: Then you can login as root@ using those keys. yes
02:11:53             out: error: No such file or directory (os error 2)

I'll clean up my uncommitted local changes that add a bunch of #[context()] all over the place and push it, hopefully should help narrow down where it's breaking for you.

@jeckersb
Copy link
Collaborator Author

jeckersb commented Oct 6, 2025

I'll clean up my uncommitted local changes that add a bunch of #[context()] all over the place and push it, hopefully should help narrow down where it's breaking for you.

Well I accidentally threw that away somewhere but easy enough to regenerate with claude, I just told it to add context annotations to every function in system-reinstall-bootc that returns a Result. @henrywang that should help narrow it down where it's breaking for you.

jeckersb and others added 2 commits October 6, 2025 12:51
If the system has a swap partition (or any other volume which is not
currently mounted) the `findmnt` command will (expectedly) fail to
find it.  Don't early exit in this case, instead just ignore that
volume.  If it wasn't mounted in the first place, we don't need to
warn about it being unmounted after the reinstall operation is
complete.

Signed-off-by: John Eckersberg <jeckersb@redhat.com>
Closes: bootc-dev#1659
…unctions

Add #[context()] attribute macro to all functions that return Result
to improve error reporting. This includes adding the fn-error-context
dependency and importing the context macro in all relevant modules.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
Signed-off-by: John Eckersberg <jeckersb@redhat.com>
@jeckersb jeckersb force-pushed the s-r-b-ignore-unmounted branch from 8c11f90 to 36328eb Compare October 6, 2025 16:52
@henrywang
Copy link
Collaborator

henrywang commented Oct 7, 2025

We got error: run: mount_warning: check_root_siblings: parse_volumes: No such file or directory (os error 2) log.

Feel free to add findmnt or any debug command in

just before the last provision script.

@jeckersb
Copy link
Collaborator Author

jeckersb commented Oct 7, 2025

We got error: run: mount_warning: check_root_siblings: parse_volumes: No such file or directory (os error 2) log.

Ahh I suspect the lvs binary isn't available. It looks like there's a bug at:

if which::which("podman").is_err() {
tracing::debug!("lvs binary not found. Skipping logical volume check.");

It's checking for the podman binary but really it should be checking for lvs instead. I suspect inside of the integration environment on c9s for some reason (it works ok on my laptop using c9s... 🤷) that lvs is absent so it's failing trying to run it. I'll push another commit to fix that and see if things start working...

Signed-off-by: John Eckersberg <jeckersb@redhat.com>
@cgwalters
Copy link
Collaborator

Note that lvs is just a symlink to lvm which is what we should probably be using.

.collect())
}

#[context("check_root_siblings")]
Copy link
Collaborator

Choose a reason for hiding this comment

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

These strings are intended to be somewhat human readable. Not a blocker but how about "Looking at root sibling mounts" or something?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Yeah I just had claude generate context for all of the Result-returning functions in the crate so we would at least have some idea where to look for the problem. Not great but at least more useful than No such file or directory with absolutely no context at all.

@cgwalters cgwalters merged commit 0f688f3 into bootc-dev:main Oct 7, 2025
34 of 35 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/system-reinstall-bootc Issues related to system-reinstall-botoc
Projects
None yet
Development

Successfully merging this pull request may close these issues.

system-reinstall-bootc failled on CS9
3 participants