Skip to content

Commit

Permalink
make linter happy
Browse files Browse the repository at this point in the history
  • Loading branch information
ccamel committed Aug 6, 2020
1 parent 403ee26 commit bb25a7d
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 7 deletions.
6 changes: 0 additions & 6 deletions cmd/cluster_instance_orchestration.go
Original file line number Diff line number Diff line change
Expand Up @@ -36,12 +36,6 @@ func orchestrateInstances(systemStatus *SystemStatus, kubeconfig *KubeConfig) {
return
}

if err != nil {
log.WithError(err).Fatalln("cannot get current containers")
orchestrationRoundErrors += 1
return
}

// Manage an instance for each cluster
for _, cluster := range discoveredClusters {
log.WithFields(log.Fields{"cluster": cluster.Name, "endpoint": cluster.APIEndpoint}).Debugln("processing new cluster")
Expand Down
6 changes: 5 additions & 1 deletion cmd/provider_gke.go
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,11 @@ func updateGKEClusters() {
} else {
log.WithField("cluster", cluster.Name).Debugln("added/updated GKE cluster credentials")
}
cmd.Wait()

err = cmd.Wait()
if err != nil {
log.WithField("cluster", cluster.Name).WithError(err).Errorln("failed to execute command:", string(cmd.String()))
}
}
}

Expand Down

2 comments on commit bb25a7d

@rchakode
Copy link
Member

Choose a reason for hiding this comment

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

@ccamel,
Thanks to get this out.

The cmd.Wait (and the added error handle block) should be simply removed. My bad, I was trying to figure out why the exec.CombinedOutput leads to not close stream files. Actually the CombinedOutput function already implements the Wait for the command.

@ccamel
Copy link
Member Author

@ccamel ccamel commented on bb25a7d Aug 6, 2020

Choose a reason for hiding this comment

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

@rchakode Ok, so let me amend the commit to fix in your way. 👍

Please sign in to comment.