Skip to content

Commit a3daaaf

Browse files
committed
Wait loop added for volume creation
1 parent 605022b commit a3daaaf

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

pkg/cloud/powervs.go

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -250,6 +250,11 @@ func (p *powerVSCloud) CreateDisk(volumeName string, diskOptions *DiskOptions) (
250250
return nil, err
251251
}
252252

253+
err = p.WaitForAttachmentState(*v.VolumeID, VolumeAvailableState)
254+
if err != nil {
255+
return nil, err
256+
}
257+
253258
return &Disk{CapacityGiB: capacityGiB, VolumeID: *v.VolumeID, DiskType: v.DiskType, WWN: strings.ToLower(v.Wwn)}, nil
254259
}
255260

0 commit comments

Comments
 (0)