Azure: fix bug preventing snapshot deletion
Signed-off-by: Steve Kriss <steve@heptio.com>pull/378/head
parent
51c546786e
commit
b2b16b3c85
|
@ -233,12 +233,17 @@ func (b *blockStore) CreateSnapshot(volumeID, volumeAZ string, tags map[string]s
|
|||
}
|
||||
|
||||
func (b *blockStore) DeleteSnapshot(snapshotID string) error {
|
||||
snapshotInfo, err := parseFullSnapshotName(snapshotID)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
ctx, cancel := context.WithTimeout(context.Background(), b.apiTimeout)
|
||||
defer cancel()
|
||||
|
||||
_, errChan := b.snaps.Delete(b.resourceGroup, snapshotID, ctx.Done())
|
||||
_, errChan := b.snaps.Delete(snapshotInfo.resourceGroup, snapshotInfo.name, ctx.Done())
|
||||
|
||||
err := <-errChan
|
||||
err = <-errChan
|
||||
|
||||
return errors.WithStack(err)
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue