hawtio / hawtio-kubernetes

hawtio plugin for working with kubernetes
Apache License 2.0
24 stars 14 forks source link

show better error messages for failed RCs / pods #37

Open jstrachan opened 9 years ago

jstrachan commented 9 years ago

e.g. via the command line:

$ oc describe rc jenkins
Name:       jenkins
Image(s):   fabric8/jenkins
Selector:   component=jenkins,provider=fabric8
Labels:     component=jenkins,provider=fabric8
Replicas:   0 current / 1 desired
Pods Status:    0 Running / 0 Waiting / 0 Succeeded / 0 Failed
Events:
  FirstSeen             LastSeen            Count   From                SubobjectPath   Reason      Message
  Wed, 17 Jun 2015 16:11:39 +0100   Wed, 17 Jun 2015 16:21:33 +0100 22  {replication-controller }           failedCreate    Error creating: Pod "jenkins-" is forbidden: Volume with secret.secretName="openshift-cert-secrets" is not allowed because service account default does not reference that secret

whereas from the UI the RC looked fine

gashcrumb commented 9 years ago

Weird how the pod status shows 0 succeeded but also 0 failed :-) I guess perhaps the status field isn't updated properly.

jstrachan commented 9 years ago

yeah - in this particular case - there's no pods created ever; nor can I see any kind of status on the RC

jstrachan commented 9 years ago

actually the data thats available from oc describe pod foo is pretty nice; we should include it into hawtio-kubernetes somewhere:

jstrachan:/workspace/java/$ oc describe pod letschat-sqmi9
Name:               letschat-sqmi9
Image(s):           mongo,fabric8/lets-chat:latest
Host:               fabric8-master.vagrant.local/
Labels:             name=letschat
Status:             Pending
IP:
Replication Controllers:    letschat (1/1 replicas created)
Containers:
Events:
  FirstSeen             LastSeen            Count   From                    SubobjectPath               Reason      Message
  Fri, 19 Jun 2015 10:31:06 +0100   Fri, 19 Jun 2015 10:31:06 +0100 1   {scheduler }                                    scheduled   Successfully assigned letschat-sqmi9 to fabric8-master.vagrant.local
  Fri, 19 Jun 2015 10:31:06 +0100   Fri, 19 Jun 2015 10:31:06 +0100 1   {kubelet fabric8-master.vagrant.local}  implicitly required container POD   pulled      Successfully pulled image "openshift/origin-pod:v0.6.2"
  Fri, 19 Jun 2015 10:31:07 +0100   Fri, 19 Jun 2015 10:31:07 +0100 1   {kubelet fabric8-master.vagrant.local}  implicitly required container POD   created     Created with docker id dea22b9e3c302a09714514e645bdfd0b2a1afe37121df45f29c26449a57ba66c
  Fri, 19 Jun 2015 10:31:07 +0100   Fri, 19 Jun 2015 10:31:07 +0100 1   {kubelet fabric8-master.vagrant.local}  implicitly required container POD   started     Started with docker id dea22b9e3c302a09714514e645bdfd0b2a1afe37121df45f29c26449a57ba66c
  Fri, 19 Jun 2015 10:35:34 +0100   Fri, 19 Jun 2015 10:35:34 +0100 1   {kubelet fabric8-master.vagrant.local}  spec.containers{letschat-mongodb}   pulled      Successfully pulled image "mongo"
  Fri, 19 Jun 2015 10:35:35 +0100   Fri, 19 Jun 2015 10:35:35 +0100 1   {kubelet fabric8-master.vagrant.local}  spec.containers{letschat-mongodb}   created     Created with docker id 05a866f43b59ab2cb2600a6c18e4f417da7a3a2d0a7ddae491792e1ac798c09e
  Fri, 19 Jun 2015 10:35:35 +0100   Fri, 19 Jun 2015 10:35:35 +0100 1   {kubelet fabric8-master.vagrant.local}  spec.containers{letschat-mongodb}   started     Started with docker id 05a866f43b59ab2cb2600a6c18e4f417da7a3a2d0a7ddae491792e1ac798c09e