Skip to content

Commit

Permalink
Add some logging to kubelet probes
Browse files Browse the repository at this point in the history
  • Loading branch information
sdodson committed Mar 30, 2015
1 parent 795cd38 commit 7661a42
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions pkg/kubelet/probe.go
Original file line number Diff line number Diff line change
Expand Up @@ -115,6 +115,7 @@ func (kl *Kubelet) runProbeWithRetries(p *api.Probe, pod *api.Pod, status api.Po
func (kl *Kubelet) runProbe(p *api.Probe, pod *api.Pod, status api.PodStatus, container api.Container) (probe.Result, error) {
timeout := time.Duration(p.TimeoutSeconds) * time.Second
if p.Exec != nil {
glog.V(4).Infof("Exec-Probe Pod: %v, Container: %v", pod, container)
return kl.prober.exec.Probe(kl.newExecInContainer(pod, container))
}
if p.HTTPGet != nil {
Expand All @@ -123,13 +124,15 @@ func (kl *Kubelet) runProbe(p *api.Probe, pod *api.Pod, status api.PodStatus, co
return probe.Unknown, err
}
host, port, path := extractGetParams(p.HTTPGet, status, port)
glog.V(4).Infof("HTTP-Probe Host: %v, Port: %v, Path: %v", host, port, path)
return kl.prober.http.Probe(host, port, path, timeout)
}
if p.TCPSocket != nil {
port, err := extractPort(p.TCPSocket.Port, container)
if err != nil {
return probe.Unknown, err
}
glog.V(4).Infof("TCP-Probe PodIP: %v, Port: %v, Timeout: %v", status.PodIP, port, timeout)
return kl.prober.tcp.Probe(status.PodIP, port, timeout)
}
glog.Warningf("Failed to find probe builder for %s %+v", container.Name, container.LivenessProbe)
Expand Down

0 comments on commit 7661a42

Please sign in to comment.