Visitar URL original
mount/manager: check lease bucket in rollback by samuelkarp · Pull Request #14553 · containerd/containerd · GitHub
Skip to content

mount/manager: check lease bucket in rollback - #14553

Open
samuelkarp wants to merge 1 commit into
containerd:mainfrom
samuelkarp:fix/mount-manager-nil-lease-bucket
Open

samuelkarp wants to merge 1 commit into
containerd:mainfrom
samuelkarp:fix/mount-manager-nil-lease-bucket

Conversation

@samuelkarp

Copy link
Copy Markdown
Member

The rollback of a failed Activate assumed its lease bucket still exists. A client of the mounts gRPC service can get the bucket deleted while the activation is running:

  1. Activate(A) under lease L adds A to L's bucket and starts mounting.
  2. Deactivate(A) removes A from L's bucket and leaves it empty.
  3. Activate(B) under L fails. Its rollback deletes the empty bucket.
  4. Activate(A) fails. Its rollback panics on the nil bucket.

Assisted-by: Claude Code:claude-opus-5-5

The rollback of a failed Activate assumed its lease bucket still
exists. A client of the mounts gRPC service can get the bucket deleted
while the activation is running:

1. Activate(A) under lease L adds A to L's bucket and starts mounting.
2. Deactivate(A) removes A from L's bucket and leaves it empty.
3. Activate(B) under L fails. Its rollback deletes the empty bucket.
4. Activate(A) fails. Its rollback panics on the nil bucket.

Assisted-by: Claude Code:claude-opus-5-5
Signed-off-by: Samuel Karp <me@samuelkarp.com>
Copilot AI balanced review requested due to automatic review settings November 11, 2026 08:11
@github-project-automation github-project-automation Bot moved this to Needs Triage in Pull Request Review Nov 11, 2026

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🟢 Approval recommended

No active review issues are reported for the lease-bucket rollback cleanup change.

No open issues 🎉

What changed in this PR

This PR prevents a panic during failed mount activation when concurrent operations have already deleted the associated lease bucket.

Changes:

  • Keep the empty-bucket check and deletion inside the existing nil guard.
  • Add a regression test that reproduces the rollback sequence using coordinated mount failures.
File Description
core/​mount/​manager/​manager.go Guard rollback cleanup against an already-deleted lease bucket.
core/​mount/​manager/​manager_test.go Verify that rollback returns an error without panicking after lease-bucket deletion.

Review effort: Balanced

@samuelkarp
samuelkarp requested a review from dmcgowan November 11, 2026 08:13

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

Status: Needs Triage

Development

Successfully merging this pull request may close these issues.

2 participants