Skip to content

Conversation

@mantissahz
Copy link
Contributor

@mantissahz mantissahz commented Jan 13, 2026

during upgrading the engine.

longhorn/longhorn 10274

Signed-off-by: James Lu <[email protected]>
@mantissahz mantissahz self-assigned this Jan 13, 2026
@coderabbitai
Copy link

coderabbitai bot commented Jan 13, 2026

Important

Review skipped

Auto reviews are disabled on this repository.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR addresses issue longhorn/longhorn#10274 by preventing snapshot deletion operations from proceeding while the volume engine is upgrading. The change ensures that snapshot deletion is delayed until the engine upgrade completes, preventing potential issues during the upgrade process.

Changes:

  • Added a check for engine upgrade status during snapshot deletion that delays the operation by re-enqueueing the snapshot after 3 seconds
  • Sets an informative error message indicating why the deletion is delayed

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

sc.enqueueSnapshotAfter(snapshot, 3*time.Second)
return nil
}

Copy link

Copilot AI Jan 13, 2026

Choose a reason for hiding this comment

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

The Status.Error field is set when the engine is upgrading but is not explicitly cleared when the engine finishes upgrading and deletion proceeds. Unlike the snapshot creation path where syncSnapshotWithSnapshotInfo clears the error when ReadyToUse becomes true (line 723), during deletion the DeletionTimestamp prevents error clearing. This means the "snapshot deletion delayed" message may persist in the status until the snapshot is fully removed, potentially causing confusion for users monitoring the snapshot status. Consider adding snapshot.Status.Error = "" after the isEngineUpgrading check to clear the error when deletion can proceed.

Suggested change
// Clear any previous snapshot deletion delay error now that the engine is no longer upgrading
snapshot.Status.Error = ""

Copilot uses AI. Check for mistakes.
@derekbit derekbit merged commit 5b215be into longhorn:master Jan 13, 2026
19 of 20 checks passed
@derekbit
Copy link
Member

@mergify backport v1.11.x

@mergify
Copy link

mergify bot commented Jan 13, 2026

backport v1.11.x

✅ Backports have been created

Details

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