From c4e786c70104c266c4b6c6d7a8ae21508570e90b Mon Sep 17 00:00:00 2001 From: Tomek Kulczynski Date: Mon, 2 Mar 2015 13:32:32 +0100 Subject: [PATCH] Fix waiting for GCE Operations --- pkg/cloudprovider/gce/gce.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/pkg/cloudprovider/gce/gce.go b/pkg/cloudprovider/gce/gce.go index 529c810643e..afdbb7aa35f 100644 --- a/pkg/cloudprovider/gce/gce.go +++ b/pkg/cloudprovider/gce/gce.go @@ -17,6 +17,7 @@ limitations under the License. package gce_cloud import ( + "errors" "fmt" "io" "io/ioutil" @@ -192,6 +193,9 @@ func (gce *GCECloud) waitForRegionOp(op *compute.Operation, region string) error return err } } + if pollOp.Error != nil && len(pollOp.Error.Errors) > 0 { + return errors.New(pollOp.Error.Errors[0].Message) + } return nil }