Fix uninitalized variable
parent
5bf84cc282
commit
77f97a58f4
|
@ -103,9 +103,13 @@ var statusCmd = &cobra.Command{
|
|||
api, cc := mustload.Partial(cname)
|
||||
|
||||
var st *Status
|
||||
var err error
|
||||
for _, n := range cc.Nodes {
|
||||
glog.Infof("checking status of %s ...", n.Name)
|
||||
machineName := driver.MachineName(*cc, n)
|
||||
st, err := status(api, machineName, n.ControlPlane)
|
||||
st, err = status(api, machineName, n.ControlPlane)
|
||||
glog.Infof("%s status: %+v", machineName, st)
|
||||
|
||||
if err != nil {
|
||||
glog.Errorf("status error: %v", err)
|
||||
}
|
||||
|
@ -127,6 +131,7 @@ var statusCmd = &cobra.Command{
|
|||
}
|
||||
}
|
||||
|
||||
// TODO: Update for multi-node
|
||||
os.Exit(exitCode(st))
|
||||
},
|
||||
}
|
||||
|
|
|
@ -25,6 +25,7 @@ import (
|
|||
"github.com/docker/machine/libmachine"
|
||||
"github.com/docker/machine/libmachine/host"
|
||||
"github.com/docker/machine/libmachine/state"
|
||||
"github.com/golang/glog"
|
||||
"k8s.io/minikube/pkg/drivers/kic/oci"
|
||||
"k8s.io/minikube/pkg/minikube/bootstrapper/bsutil/kverify"
|
||||
"k8s.io/minikube/pkg/minikube/command"
|
||||
|
@ -47,6 +48,7 @@ type ClusterController struct {
|
|||
|
||||
// Partial is a cmd-friendly way to load a cluster which may or may not be running
|
||||
func Partial(name string) (libmachine.API, *config.ClusterConfig) {
|
||||
glog.Infof("Loading cluster: %s", name)
|
||||
api, err := machine.NewAPIClient()
|
||||
if err != nil {
|
||||
exit.WithError("libmachine failed", err)
|
||||
|
|
Loading…
Reference in New Issue