Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions controller/snapshot_controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -442,6 +442,13 @@ func (sc *SnapshotController) reconcile(snapshotName string) (err error) {
return err
}

if isEngineUpgrading(engine) {
// requeue the snapshot to wait for upgrading engine after 3 seconds
snapshot.Status.Error = fmt.Sprintf("snapshot deletion delayed: volume engine %v is upgrading from image %v to %v", engine.Name, engine.Status.CurrentImage, engine.Spec.Image)
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.
defer func() {
engine, err = sc.ds.GetEngineRO(engine.Name)
if err != nil {
Expand Down
Loading