More status logging

pull/6452/head
Thomas Stromberg 2020-01-31 19:00:59 -08:00
parent cee9448fa0
commit 1176aa468f
2 changed files with 8 additions and 0 deletions

View File

@ -138,6 +138,7 @@ func status(api libmachine.API, name string) (*Status, error) {
}
hs, err := cluster.GetHostStatus(api, name)
glog.Infof("%s host status = %q (err=%v)", name, hs, err)
if err != nil {
return st, errors.Wrap(err, "host")
}
@ -162,6 +163,8 @@ func status(api libmachine.API, name string) (*Status, error) {
}
stk, err := kverify.KubeletStatus(cr)
glog.Infof("%s kubelet status = %s (err=%v)", stk, err)
if err != nil {
glog.Warningf("kubelet err: %v", err)
st.Kubelet = state.Error.String()
@ -183,6 +186,8 @@ func status(api libmachine.API, name string) (*Status, error) {
}
sta, err := kverify.APIServerStatus(cr, ip, port)
glog.Infof("%s apiserver status = %s (err=%v)", stk, err)
if err != nil {
glog.Errorln("Error apiserver status:", err)
st.APIServer = state.Error.String()
@ -192,6 +197,8 @@ func status(api libmachine.API, name string) (*Status, error) {
st.Kubeconfig = Misconfigured
ks, err := kubeconfig.IsClusterInConfig(ip, name)
glog.Infof("%s kubeconfig status = %s (err=%v)", ks, err)
if err != nil {
glog.Errorln("Error kubeconfig status:", err)
}

View File

@ -127,6 +127,7 @@ func (d *Driver) GetURL() (string, error) {
// GetState returns the state that the host is in (running, stopped, etc)
func (d *Driver) GetState() (state.State, error) {
glog.Infof("GetState called")
ip, err := d.GetIP()
if err != nil {
return state.Error, err