mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-24 20:24:09 +00:00
Revert "Add an event for health check failures."
This commit is contained in:
parent
c112f8f1bb
commit
fc4e711a8c
@ -1063,29 +1063,23 @@ func (kl *Kubelet) syncPod(pod *api.BoundPod, dockerContainers dockertools.Docke
|
|||||||
if live == probe.Success {
|
if live == probe.Success {
|
||||||
ready, _ = kl.probeContainer(container.ReadinessProbe, podFullName, uid, podStatus, container, dockerContainer, probe.Failure)
|
ready, _ = kl.probeContainer(container.ReadinessProbe, podFullName, uid, podStatus, container, dockerContainer, probe.Failure)
|
||||||
}
|
}
|
||||||
if err != nil {
|
|
||||||
glog.V(1).Infof("liveness/readiness probe errored: %v", err)
|
|
||||||
containersToKeep[containerID] = empty{}
|
|
||||||
continue
|
|
||||||
}
|
|
||||||
if ready == probe.Success {
|
if ready == probe.Success {
|
||||||
kl.readiness.set(dockerContainer.ID, true)
|
kl.readiness.set(dockerContainer.ID, true)
|
||||||
} else {
|
} else {
|
||||||
kl.readiness.set(dockerContainer.ID, false)
|
kl.readiness.set(dockerContainer.ID, false)
|
||||||
}
|
}
|
||||||
|
if err != nil {
|
||||||
|
glog.V(1).Infof("health check errored: %v", err)
|
||||||
|
containersToKeep[containerID] = empty{}
|
||||||
|
continue
|
||||||
|
}
|
||||||
if live == probe.Success {
|
if live == probe.Success {
|
||||||
containersToKeep[containerID] = empty{}
|
containersToKeep[containerID] = empty{}
|
||||||
continue
|
continue
|
||||||
}
|
}
|
||||||
ref, ok := kl.getRef(containerID)
|
glog.V(1).Infof("pod %q container %q is unhealthy. Container will be killed and re-created.", podFullName, container.Name, live)
|
||||||
if !ok {
|
|
||||||
glog.Warningf("No ref for pod '%v' - '%v'", containerID, container.Name)
|
|
||||||
} else {
|
} else {
|
||||||
record.Eventf(ref, "unhealthy", "Liveness Probe Failed %v - %v", containerID, container.Name)
|
glog.V(1).Infof("pod %q container %q hash changed (%d vs %d). Container will be killed and re-created.", podFullName, container.Name, hash, expectedHash)
|
||||||
}
|
|
||||||
glog.Infof("pod %q container %q is unhealthy. Container will be killed and re-created.", podFullName, container.Name, live)
|
|
||||||
} else {
|
|
||||||
glog.Infof("pod %q container %q hash changed (%d vs %d). Container will be killed and re-created.", podFullName, container.Name, hash, expectedHash)
|
|
||||||
}
|
}
|
||||||
if err := kl.killContainer(dockerContainer); err != nil {
|
if err := kl.killContainer(dockerContainer); err != nil {
|
||||||
glog.V(1).Infof("Failed to kill container %q: %v", dockerContainer.ID, err)
|
glog.V(1).Infof("Failed to kill container %q: %v", dockerContainer.ID, err)
|
||||||
|
Loading…
Reference in New Issue
Block a user