Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 1 addition & 2 deletions cmd/openshift-install/create.go
Original file line number Diff line number Diff line change
Expand Up @@ -235,8 +235,7 @@ func destroyBootstrap(ctx context.Context, directory string) (err error) {
},
)
if err != nil {
logrus.Error(errors.Wrap(err, "waiting for bootstrap-complete"))
return nil
return errors.Wrap(err, "waiting for bootstrap-complete")
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

to compare it to how the error would have been structured without wrap
fmt.Errorf("failed waiting for bootstrap-complete: %v", err)

I would suggest we keep it errors.Wrap(err, "failed waiting for bootstrap-complete")

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

$ git describe --dirty
v0.4.0-25-gb13b7fa-dirty
$ git diff
diff --git a/cmd/openshift-install/create.go b/cmd/openshift-install/create.go
index 5ba6517..8c95b8c 100644
--- a/cmd/openshift-install/create.go
+++ b/cmd/openshift-install/create.go
@@ -203,8 +203,8 @@ func destroyBootstrap(ctx context.Context, directory string) (err error) {
 				watcher, err := events.Watch(metav1.ListOptions{
 					ResourceVersion: sinceResourceVersion,
 				})
-				if err == nil {
-					return watcher, nil
+				if err == nil || true {
+					return watcher, err
 				}
 				select {
 				case <-eventContext.Done():
$ TAGS=libvirt_destroy hack/build.sh
$ openshift-install --dir=wking create cluster
INFO Fetching OS image...
INFO Using Terraform to create cluster...
INFO Waiting for bootstrap completion...
INFO API v1.11.0+d4cacc0 up
WARNING RetryWatcher - getting event failed! Re-creating the watcher. Last RV: 2214 
FATAL Error executing openshift-install: waiting for bootstrap-complete: watch closed before UntilWithoutRetry timeout 

That line includes both "FATAL" and "Error" already. Personally I think that's enough without also including an additional "failed", but I can add it if you like.

Copy link
Contributor

@abhinavdahiya abhinavdahiya Nov 28, 2018

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

as error returns from this function first one is more clear when looking at the function return (not few levels up).

}

logrus.Info("Destroying the bootstrap resources...")
Expand Down