{"action":"created","comment":{"url":"https://api.github.com/repos/kubernetes/kubernetes/pulls/comments/39977647","id":39977647,"diff_hunk":"@@ -1617,7 +1618,21 @@ func (dm *DockerManager) computePodContainerChanges(pod *api.Pod, runningPod kub\n \t\t\t\t// RestartPolicy::Always, but it's not a big deal.\n \t\t\t\tglog.V(3).Infof(\"Container %+v is dead, but RestartPolicy says that we should restart it.\", container)\n \t\t\t\tcontainersToStart[index] = empty{}\n+\n+\t\t\t}\n+\n+\t\t\t// Trying to get the reference for container,\n+\t\t\t// if failing to get the ref giv the Pod as reference\n+\t\t\tvar containerOrPodRef runtime.Object\n+\t\t\tcontainerOrPodRef = pod // default\n+\t\t\tref, err := kubecontainer.GenerateContainerRef(pod, &container)\n+\t\t\tif ref != nil && err == nil {\n+\t\t\t\tcontainerOrPodRef = ref\n \t\t\t}\n+\n+\t\t\t// sending the event \"died\" weither or not the container should be restarted\n+\t\t\tdm.recorder.Eventf(containerOrPodRef, \"Died\", \"Container \\\"%v\\\" in pod \\\"%v\\\" died.\", container.Name, podFullName)","path":"pkg/kubelet/dockertools/manager.go","position":25,"original_position":25,"commit_id":"186543657f6af8fc0d68ab86940f83949d453459","original_commit_id":"186543657f6af8fc0d68ab86940f83949d453459","user":{"login":"ejemba","id":887400,"avatar_url":"https://avatars.githubusercontent.com/u/887400?v=3","gravatar_id":"","url":"https://api.github.com/users/ejemba","html_url":"https://github.com/ejemba","followers_url":"https://api.github.com/users/ejemba/followers","following_url":"https://api.github.com/users/ejemba/following{/other_user}","gists_url":"https://api.github.com/users/ejemba/gists{/gist_id}","starred_url":"https://api.github.com/users/ejemba/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ejemba/subscriptions","organizations_url":"https://api.github.com/users/ejemba/orgs","repos_url":"https://api.github.com/users/ejemba/repos","events_url":"https://api.github.com/users/ejemba/events{/privacy}","received_events_url":"https://api.github.com/users/ejemba/received_events","type":"User","site_admin":false},"body":"@yujuhong Can't your actual PR https://github.com/kubernetes/kubernetes/pull/13990 add this Died event because it seems to add something similar ?","created_at":"2015-09-21T14:37:15Z","updated_at":"2015-09-21T14:37:15Z","html_url":"https://github.com/kubernetes/kubernetes/pull/14115#discussion_r39977647","pull_request_url":"https://api.github.com/repos/kubernetes/kubernetes/pulls/14115","_links":{"self":{"href":"https://api.github.com/repos/kubernetes/kubernetes/pulls/comments/39977647"},"html":{"href":"https://github.com/kubernetes/kubernetes/pull/14115#discussion_r39977647"},"pull_request":{"href":"https://api.github.com/repos/kubernetes/kubernetes/pulls/14115"}}},"pull_request":{"url":"https://api.github.com/repos/kubernetes/kubernetes/pulls/14115","id":45308533,"html_url":"https://github.com/kubernetes/kubernetes/pull/14115","diff_url":"https://github.com/kubernetes/kubernetes/pull/14115.diff","patch_url":"https://github.com/kubernetes/kubernetes/pull/14115.patch","issue_url":"https://api.github.com/repos/kubernetes/kubernetes/issues/14115","number":14115,"state":"open","locked":false,"title":"Added \"Died\" event on container crash","user":{"login":"ejemba","id":887400,"avatar_url":"https://avatars.githubusercontent.com/u/887400?v=3","gravatar_id":"","url":"https://api.github.com/users/ejemba","html_url":"https://github.com/ejemba","followers_url":"https://api.github.com/users/ejemba/followers","following_url":"https://api.github.com/users/ejemba/following{/other_user}","gists_url":"https://api.github.com/users/ejemba/gists{/gist_id}","starred_url":"https://api.github.com/users/ejemba/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ejemba/subscriptions","organizations_url":"https://api.github.com/users/ejemba/orgs","repos_url":"https://api.github.com/users/ejemba/repos","events_url":"https://api.github.com/users/ejemba/events{/privacy}","received_events_url":"https://api.github.com/users/ejemba/received_events","type":"User","site_admin":false},"body":"I added the \"Died\" event and fix the setup for libvirt-coreos.\r\n\r\nI was not able to add the id of the container, only the name in the message of the event.\r\n\r\n`api.Container` struct does not hold the ID of the container only the Name.\r\n`kubelet.container.Container` has the ID but when fireing the event this one is not available.\r\n\r\nPerhaps update `api.Container` to also hold the ID of the container so we can use it in the Died event.","created_at":"2015-09-17T15:59:45Z","updated_at":"2015-09-21T14:37:15Z","closed_at":null,"merged_at":null,"merge_commit_sha":"578c4a615afb59f8a494eb32dc172fc6dfc63a3a","assignee":{"login":"yujuhong","id":10524058,"avatar_url":"https://avatars.githubusercontent.com/u/10524058?v=3","gravatar_id":"","url":"https://api.github.com/users/yujuhong","html_url":"https://github.com/yujuhong","followers_url":"https://api.github.com/users/yujuhong/followers","following_url":"https://api.github.com/users/yujuhong/following{/other_user}","gists_url":"https://api.github.com/users/yujuhong/gists{/gist_id}","starred_url":"https://api.github.com/users/yujuhong/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/yujuhong/subscriptions","organizations_url":"https://api.github.com/users/yujuhong/orgs","repos_url":"https://api.github.com/users/yujuhong/repos","events_url":"https://api.github.com/users/yujuhong/events{/privacy}","received_events_url":"https://api.github.com/users/yujuhong/received_events","type":"User","site_admin":false},"milestone":null,"commits_url":"https://api.github.com/repos/kubernetes/kubernetes/pulls/14115/commits","review_comments_url":"https://api.github.com/repos/kubernetes/kubernetes/pulls/14115/comments","review_comment_url":"https://api.github.com/repos/kubernetes/kubernetes/pulls/comments{/number}","comments_url":"https://api.github.com/repos/kubernetes/kubernetes/issues/14115/comments","statuses_url":"https://api.github.com/repos/kubernetes/kubernetes/statuses/186543657f6af8fc0d68ab86940f83949d453459","head":{"label":"ejemba:master","ref":"master","sha":"186543657f6af8fc0d68ab86940f83949d453459","user":{"login":"ejemba","id":887400,"avatar_url":"https://avatars.githubusercontent.com/u/887400?v=3","gravatar_id":"","url":"https://api.github.com/users/ejemba","html_url":"https://github.com/ejemba","followers_url":"https://api.github.com/users/ejemba/followers","following_url":"https://api.github.com/users/ejemba/following{/other_user}","gists_url":"https://api.github.com/users/ejemba/gists{/gist_id}","starred_url":"https://api.github.com/users/ejemba/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ejemba/subscriptions","organizations_url":"https://api.github.com/users/ejemba/orgs","repos_url":"https://api.github.com/users/ejemba/repos","events_url":"https://api.github.com/users/ejemba/events{/privacy}","received_events_url":"https://api.github.com/users/ejemba/received_events","type":"User","site_admin":false},"repo":{"id":29524608,"name":"kubernetes","full_name":"ejemba/kubernetes","owner":{"login":"ejemba","id":887400,"avatar_url":"https://avatars.githubusercontent.com/u/887400?v=3","gravatar_id":"","url":"https://api.github.com/users/ejemba","html_url":"https://github.com/ejemba","followers_url":"https://api.github.com/users/ejemba/followers","following_url":"https://api.github.com/users/ejemba/following{/other_user}","gists_url":"https://api.github.com/users/ejemba/gists{/gist_id}","starred_url":"https://api.github.com/users/ejemba/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ejemba/subscriptions","organizations_url":"https://api.github.com/users/ejemba/orgs","repos_url":"https://api.github.com/users/ejemba/repos","events_url":"https://api.github.com/users/ejemba/events{/privacy}","received_events_url":"https://api.github.com/users/ejemba/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/ejemba/kubernetes","description":"Container Cluster Manager","fork":true,"url":"https://api.github.com/repos/ejemba/kubernetes","forks_url":"https://api.github.com/repos/ejemba/kubernetes/forks","keys_url":"https://api.github.com/repos/ejemba/kubernetes/keys{/key_id}","collaborators_url":"https://api.github.com/repos/ejemba/kubernetes/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/ejemba/kubernetes/teams","hooks_url":"https://api.github.com/repos/ejemba/kubernetes/hooks","issue_events_url":"https://api.github.com/repos/ejemba/kubernetes/issues/events{/number}","events_url":"https://api.github.com/repos/ejemba/kubernetes/events","assignees_url":"https://api.github.com/repos/ejemba/kubernetes/assignees{/user}","branches_url":"https://api.github.com/repos/ejemba/kubernetes/branches{/branch}","tags_url":"https://api.github.com/repos/ejemba/kubernetes/tags","blobs_url":"https://api.github.com/repos/ejemba/kubernetes/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/ejemba/kubernetes/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/ejemba/kubernetes/git/refs{/sha}","trees_url":"https://api.github.com/repos/ejemba/kubernetes/git/trees{/sha}","statuses_url":"https://api.github.com/repos/ejemba/kubernetes/statuses/{sha}","languages_url":"https://api.github.com/repos/ejemba/kubernetes/languages","stargazers_url":"https://api.github.com/repos/ejemba/kubernetes/stargazers","contributors_url":"https://api.github.com/repos/ejemba/kubernetes/contributors","subscribers_url":"https://api.github.com/repos/ejemba/kubernetes/subscribers","subscription_url":"https://api.github.com/repos/ejemba/kubernetes/subscription","commits_url":"https://api.github.com/repos/ejemba/kubernetes/commits{/sha}","git_commits_url":"https://api.github.com/repos/ejemba/kubernetes/git/commits{/sha}","comments_url":"https://api.github.com/repos/ejemba/kubernetes/comments{/number}","issue_comment_url":"https://api.github.com/repos/ejemba/kubernetes/issues/comments{/number}","contents_url":"https://api.github.com/repos/ejemba/kubernetes/contents/{+path}","compare_url":"https://api.github.com/repos/ejemba/kubernetes/compare/{base}...{head}","merges_url":"https://api.github.com/repos/ejemba/kubernetes/merges","archive_url":"https://api.github.com/repos/ejemba/kubernetes/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/ejemba/kubernetes/downloads","issues_url":"https://api.github.com/repos/ejemba/kubernetes/issues{/number}","pulls_url":"https://api.github.com/repos/ejemba/kubernetes/pulls{/number}","milestones_url":"https://api.github.com/repos/ejemba/kubernetes/milestones{/number}","notifications_url":"https://api.github.com/repos/ejemba/kubernetes/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/ejemba/kubernetes/labels{/name}","releases_url":"https://api.github.com/repos/ejemba/kubernetes/releases{/id}","created_at":"2015-01-20T10:33:43Z","updated_at":"2015-01-20T10:33:46Z","pushed_at":"2015-09-17T15:43:20Z","git_url":"git://github.com/ejemba/kubernetes.git","ssh_url":"git@github.com:ejemba/kubernetes.git","clone_url":"https://github.com/ejemba/kubernetes.git","svn_url":"https://github.com/ejemba/kubernetes","homepage":"http://kubernetes.io","size":106632,"stargazers_count":0,"watchers_count":0,"language":"Go","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"kubernetes:master","ref":"master","sha":"37c4e2eba38dd3ec92adc50c752cf6365c9a2afd","user":{"login":"kubernetes","id":13629408,"avatar_url":"https://avatars.githubusercontent.com/u/13629408?v=3","gravatar_id":"","url":"https://api.github.com/users/kubernetes","html_url":"https://github.com/kubernetes","followers_url":"https://api.github.com/users/kubernetes/followers","following_url":"https://api.github.com/users/kubernetes/following{/other_user}","gists_url":"https://api.github.com/users/kubernetes/gists{/gist_id}","starred_url":"https://api.github.com/users/kubernetes/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kubernetes/subscriptions","organizations_url":"https://api.github.com/users/kubernetes/orgs","repos_url":"https://api.github.com/users/kubernetes/repos","events_url":"https://api.github.com/users/kubernetes/events{/privacy}","received_events_url":"https://api.github.com/users/kubernetes/received_events","type":"Organization","site_admin":false},"repo":{"id":20580498,"name":"kubernetes","full_name":"kubernetes/kubernetes","owner":{"login":"kubernetes","id":13629408,"avatar_url":"https://avatars.githubusercontent.com/u/13629408?v=3","gravatar_id":"","url":"https://api.github.com/users/kubernetes","html_url":"https://github.com/kubernetes","followers_url":"https://api.github.com/users/kubernetes/followers","following_url":"https://api.github.com/users/kubernetes/following{/other_user}","gists_url":"https://api.github.com/users/kubernetes/gists{/gist_id}","starred_url":"https://api.github.com/users/kubernetes/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kubernetes/subscriptions","organizations_url":"https://api.github.com/users/kubernetes/orgs","repos_url":"https://api.github.com/users/kubernetes/repos","events_url":"https://api.github.com/users/kubernetes/events{/privacy}","received_events_url":"https://api.github.com/users/kubernetes/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/kubernetes/kubernetes","description":"Container Cluster Manager from Google","fork":false,"url":"https://api.github.com/repos/kubernetes/kubernetes","forks_url":"https://api.github.com/repos/kubernetes/kubernetes/forks","keys_url":"https://api.github.com/repos/kubernetes/kubernetes/keys{/key_id}","collaborators_url":"https://api.github.com/repos/kubernetes/kubernetes/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/kubernetes/kubernetes/teams","hooks_url":"https://api.github.com/repos/kubernetes/kubernetes/hooks","issue_events_url":"https://api.github.com/repos/kubernetes/kubernetes/issues/events{/number}","events_url":"https://api.github.com/repos/kubernetes/kubernetes/events","assignees_url":"https://api.github.com/repos/kubernetes/kubernetes/assignees{/user}","branches_url":"https://api.github.com/repos/kubernetes/kubernetes/branches{/branch}","tags_url":"https://api.github.com/repos/kubernetes/kubernetes/tags","blobs_url":"https://api.github.com/repos/kubernetes/kubernetes/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/kubernetes/kubernetes/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/kubernetes/kubernetes/git/refs{/sha}","trees_url":"https://api.github.com/repos/kubernetes/kubernetes/git/trees{/sha}","statuses_url":"https://api.github.com/repos/kubernetes/kubernetes/statuses/{sha}","languages_url":"https://api.github.com/repos/kubernetes/kubernetes/languages","stargazers_url":"https://api.github.com/repos/kubernetes/kubernetes/stargazers","contributors_url":"https://api.github.com/repos/kubernetes/kubernetes/contributors","subscribers_url":"https://api.github.com/repos/kubernetes/kubernetes/subscribers","subscription_url":"https://api.github.com/repos/kubernetes/kubernetes/subscription","commits_url":"https://api.github.com/repos/kubernetes/kubernetes/commits{/sha}","git_commits_url":"https://api.github.com/repos/kubernetes/kubernetes/git/commits{/sha}","comments_url":"https://api.github.com/repos/kubernetes/kubernetes/comments{/number}","issue_comment_url":"https://api.github.com/repos/kubernetes/kubernetes/issues/comments{/number}","contents_url":"https://api.github.com/repos/kubernetes/kubernetes/contents/{+path}","compare_url":"https://api.github.com/repos/kubernetes/kubernetes/compare/{base}...{head}","merges_url":"https://api.github.com/repos/kubernetes/kubernetes/merges","archive_url":"https://api.github.com/repos/kubernetes/kubernetes/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/kubernetes/kubernetes/downloads","issues_url":"https://api.github.com/repos/kubernetes/kubernetes/issues{/number}","pulls_url":"https://api.github.com/repos/kubernetes/kubernetes/pulls{/number}","milestones_url":"https://api.github.com/repos/kubernetes/kubernetes/milestones{/number}","notifications_url":"https://api.github.com/repos/kubernetes/kubernetes/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/kubernetes/kubernetes/labels{/name}","releases_url":"https://api.github.com/repos/kubernetes/kubernetes/releases{/id}","created_at":"2014-06-06T22:56:04Z","updated_at":"2015-09-21T11:58:35Z","pushed_at":"2015-09-21T14:30:56Z","git_url":"git://github.com/kubernetes/kubernetes.git","ssh_url":"git@github.com:kubernetes/kubernetes.git","clone_url":"https://github.com/kubernetes/kubernetes.git","svn_url":"https://github.com/kubernetes/kubernetes","homepage":"http://kubernetes.io","size":420921,"stargazers_count":10348,"watchers_count":10348,"language":"Go","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":2563,"mirror_url":null,"open_issues_count":1805,"forks":2563,"open_issues":1805,"watchers":10348,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/kubernetes/kubernetes/pulls/14115"},"html":{"href":"https://github.com/kubernetes/kubernetes/pull/14115"},"issue":{"href":"https://api.github.com/repos/kubernetes/kubernetes/issues/14115"},"comments":{"href":"https://api.github.com/repos/kubernetes/kubernetes/issues/14115/comments"},"review_comments":{"href":"https://api.github.com/repos/kubernetes/kubernetes/pulls/14115/comments"},"review_comment":{"href":"https://api.github.com/repos/kubernetes/kubernetes/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/kubernetes/kubernetes/pulls/14115/commits"},"statuses":{"href":"https://api.github.com/repos/kubernetes/kubernetes/statuses/186543657f6af8fc0d68ab86940f83949d453459"}}}}