Skip to content

Commit 99a3559

Browse files
authored
fix(instance): wait for snapshots refs during image deletion (#4397)
1 parent 7b0cee6 commit 99a3559

File tree

3 files changed

+991
-1197
lines changed

3 files changed

+991
-1197
lines changed

internal/namespaces/instance/v1/custom_image.go

+4-2
Original file line numberDiff line numberDiff line change
@@ -296,9 +296,11 @@ func imageDeleteBuilder(c *core.Command) *core.Command {
296296
}
297297
for _, snapshot := range snapshots {
298298
if snapshot.Type == instance.VolumeVolumeTypeSbsSnapshot {
299+
terminalStatus := block.SnapshotStatusAvailable
299300
_, err := blockAPI.WaitForSnapshot(&block.WaitForSnapshotRequest{
300-
SnapshotID: snapshot.ID,
301-
Zone: args.Zone,
301+
SnapshotID: snapshot.ID,
302+
Zone: args.Zone,
303+
TerminalStatus: &terminalStatus,
302304
})
303305
if err != nil {
304306
return nil, err

0 commit comments

Comments
 (0)