mirror of https://github.com/kubernetes/kops.git
Wait for the GCE disk creation operation to finish
This commit is contained in:
parent
3a9e01b8f8
commit
d1449d2f1a
|
@ -119,9 +119,14 @@ func (_ *Disk) RenderGCE(t *gce.GCEAPITarget, a, e, changes *Disk) error {
|
|||
}
|
||||
|
||||
if a == nil {
|
||||
if _, err := cloud.Compute().Disks().Insert(t.Cloud.Project(), *e.Zone, disk); err != nil {
|
||||
op, err := cloud.Compute().Disks().Insert(t.Cloud.Project(), *e.Zone, disk)
|
||||
if err != nil {
|
||||
return fmt.Errorf("error creating Disk: %v", err)
|
||||
}
|
||||
err = cloud.WaitForOp(op)
|
||||
if err != nil {
|
||||
return fmt.Errorf("error during Disk creation: %v", err)
|
||||
}
|
||||
}
|
||||
|
||||
if changes.Labels != nil {
|
||||
|
|
Loading…
Reference in New Issue