Merge pull request #2283 from dchen1107/deathrattle

Fixed Eventf with wrong arguments.
This commit is contained in:
Clayton Coleman 2014-11-11 10:41:51 -05:00
commit b5a88a4662

View File

@ -499,7 +499,7 @@ func (kl *Kubelet) runContainer(pod *api.BoundPod, container *api.Container, pod
} else { } else {
// Remember this reference so we can report events about this container // Remember this reference so we can report events about this container
kl.setRef(dockertools.DockerID(dockerContainer.ID), ref) kl.setRef(dockertools.DockerID(dockerContainer.ID), ref)
record.Eventf(ref, "", "running", "started", "Started with docker id %v", dockerContainer.ID) record.Eventf(ref, "running", "started", "Started with docker id %v", dockerContainer.ID)
} }
if container.Lifecycle != nil && container.Lifecycle.PostStart != nil { if container.Lifecycle != nil && container.Lifecycle.PostStart != nil {
@ -529,7 +529,7 @@ func (kl *Kubelet) killContainerByID(ID, name string) error {
glog.Warningf("No ref for pod '%v' - '%v'", ID, name) glog.Warningf("No ref for pod '%v' - '%v'", ID, name)
} else { } else {
// TODO: pass reason down here, and state, or move this call up the stack. // TODO: pass reason down here, and state, or move this call up the stack.
record.Eventf(ref, "", "killing", "Killing %v - %v", ID, name) record.Eventf(ref, "terminated", "killing", "Killing %v - %v", ID, name)
} }
return err return err