Skip to content

Commit

Permalink
Merge branch 'master' into log-message
Browse files Browse the repository at this point in the history
  • Loading branch information
innobead authored Jul 16, 2023
2 parents 25d5ccf + c59efbf commit 9914ab0
Show file tree
Hide file tree
Showing 3 changed files with 584 additions and 452 deletions.
3 changes: 2 additions & 1 deletion controller/snapshot_controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -335,7 +335,8 @@ func (sc *SnapshotController) reconcile(snapshotName string) (err error) {
}
}()

if _, ok := snapshot.Status.Children["volume-head"]; ok && snapshot.Status.MarkRemoved {
_, snapshotExistInEngineCR := engine.Status.Snapshots[snapshot.Name]
if _, hasVolumeHeadChild := snapshot.Status.Children["volume-head"]; snapshotExistInEngineCR && hasVolumeHeadChild && snapshot.Status.MarkRemoved {
// This snapshot is the parent of volume-head, so it cannot be purged immediately.
// We do not want to keep the volume stuck in attached state.
return sc.handleAttachmentTicketDeletion(snapshot)
Expand Down
Loading

0 comments on commit 9914ab0

Please sign in to comment.