Skip to content

Redeploy bug fix - #1264

Merged
cgwalters merged 2 commits into
bootc-dev:mainfrom
ckyrouac:redeploy-bug-fix
Apr 11, 2025
Merged

cgwalters merged 2 commits into
bootc-dev:mainfrom
ckyrouac:redeploy-bug-fix

Conversation

@ckyrouac

Copy link
Copy Markdown
Collaborator

see commit messages. This is to fix the bug where running install to-existing-root continually fails after an initial failure due to low disk space.

Prior to this, get_ensure_imgstore would fail when run from a non-bootc
system. Instead, in an attempt to make this function idempotent, let's
fallback to the container root sepolicy instead of failing. This should
only happen when running cleanup() during a to-existing install (i.e.
there is not yet a bootc system).

Signed-off-by: ckyrouac <[email protected]>
@ckyrouac
ckyrouac requested a review from Copilot April 10, 2025 18:21
@github-actions github-actions Bot added the area/install Issues related to `bootc install` label Apr 10, 2025

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 reviewed 3 out of 3 changed files in this pull request and generated 1 comment.

Comments suppressed due to low confidence (2)

lib/src/deploy.rs:516

  • Consider adding tests to verify that leftover deployment directories are correctly removed during cleanup.
            // Remove leftover deployment directories created during failed installs

lib/src/install.rs:692

  • Since the pre-check for the existence of a stateroot is removed in favor of a booted deployment check, ensure that the cleanup block effectively resets state to avoid conflicts with remnants of previous failed deployments.
    if let Some(booted) = sysroot.booted_deployment() {

Comment thread lib/src/deploy.rs Resolved
Comment thread lib/src/install.rs Resolved
This modifies the existing check for an extant stateroot dir to check if
the pending stateroot is the same as the booted deployment. Also only
run init_osname if there is not an existing stateroot dir.

fixes bootc-dev#1246

Signed-off-by: ckyrouac <[email protected]>
@cgwalters
cgwalters enabled auto-merge April 11, 2025 13:18
@cgwalters

Copy link
Copy Markdown
Member

Not blocking for this but I think we could test this via:

  • Add support for something like fail points
  • Add a failpoint around this case of post-stateroot init, pre-pull
  • Add a test case into tests-integration/src/install.rs

@cgwalters

Copy link
Copy Markdown
Member

Here's a PR I did related to this coreos/rpm-ostree#4259

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.

3 participants