Skip to content

Commit

Permalink
fix(instance): wait for snapshots refs during image deletion (#4397)
Browse files Browse the repository at this point in the history
  • Loading branch information
Codelax authored Jan 2, 2025
1 parent 7b0cee6 commit 99a3559
Show file tree
Hide file tree
Showing 3 changed files with 991 additions and 1,197 deletions.
6 changes: 4 additions & 2 deletions internal/namespaces/instance/v1/custom_image.go
Original file line number Diff line number Diff line change
Expand Up @@ -296,9 +296,11 @@ func imageDeleteBuilder(c *core.Command) *core.Command {
}
for _, snapshot := range snapshots {
if snapshot.Type == instance.VolumeVolumeTypeSbsSnapshot {
terminalStatus := block.SnapshotStatusAvailable
_, err := blockAPI.WaitForSnapshot(&block.WaitForSnapshotRequest{
SnapshotID: snapshot.ID,
Zone: args.Zone,
SnapshotID: snapshot.ID,
Zone: args.Zone,
TerminalStatus: &terminalStatus,
})
if err != nil {
return nil, err
Expand Down
Loading

0 comments on commit 99a3559

Please sign in to comment.