azure: restore volumes with zone (#1298)
Signed-off-by: Sylvain Rabot <sylvain@abstraction.fr>pull/1407/head
parent
dda76b05a8
commit
011db15f1c
|
@ -0,0 +1 @@
|
|||
azure: restore volumes in the original region's zone
|
|
@ -162,6 +162,12 @@ func (b *VolumeSnapshotter) CreateVolumeFromSnapshot(snapshotID, volumeType, vol
|
|||
Tags: snapshotInfo.Tags,
|
||||
}
|
||||
|
||||
// Restore the disk in the correct zone
|
||||
regionParts := strings.Split(volumeAZ, "-")
|
||||
if len(regionParts) >= 2 {
|
||||
disk.Zones = &[]string{regionParts[len(regionParts)-1]}
|
||||
}
|
||||
|
||||
ctx, cancel := context.WithTimeout(context.Background(), b.apiTimeout)
|
||||
defer cancel()
|
||||
|
||||
|
|
Loading…
Reference in New Issue