{"action":"closed","number":24496,"pull_request":{"url":"https://api.github.com/repos/kubernetes/kubernetes/pulls/24496","id":67090253,"html_url":"https://github.com/kubernetes/kubernetes/pull/24496","diff_url":"https://github.com/kubernetes/kubernetes/pull/24496.diff","patch_url":"https://github.com/kubernetes/kubernetes/pull/24496.patch","issue_url":"https://api.github.com/repos/kubernetes/kubernetes/issues/24496","number":24496,"state":"closed","locked":false,"title":"rkt: Return `FinishedAt` for pod","user":{"login":"euank","id":2147649,"avatar_url":"https://avatars.githubusercontent.com/u/2147649?v=3","gravatar_id":"","url":"https://api.github.com/users/euank","html_url":"https://github.com/euank","followers_url":"https://api.github.com/users/euank/followers","following_url":"https://api.github.com/users/euank/following{/other_user}","gists_url":"https://api.github.com/users/euank/gists{/gist_id}","starred_url":"https://api.github.com/users/euank/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/euank/subscriptions","organizations_url":"https://api.github.com/users/euank/orgs","repos_url":"https://api.github.com/users/euank/repos","events_url":"https://api.github.com/users/euank/events{/privacy}","received_events_url":"https://api.github.com/users/euank/received_events","type":"User","site_admin":false},"body":"This is implemented via touching a file on stop as a hook in the systemd\r\nunit. The ctime of this file is then used to get the `finishedAt` time\r\nin the future.\r\nIn addition, this changes the `startedAt` and `createdAt` to use the api\r\nserver's results rather than the annotations it previously used.\r\n\r\nIt's possible we might want to move this into the api in the future.\r\n\r\nFixes #23887\r\n\r\n\r\nI did the following manual testing:\r\n```\r\n$ cat ./examples/output/exit-output.yml \r\napiVersion: v1\r\nkind: Pod\r\nmetadata:\r\n  labels:\r\n    name: exit\r\n  name: exit-output\r\nspec:\r\n  restartPolicy: Never\r\n  containers:\r\n    - name: exit\r\n      image: busybox\r\n      command: [\"sh\", \"-c\", \"echo Exiting in 60; sleep 60; echo goodbye\"]\r\n$ kubectl create -f ./examples/exit/exit-output.yaml\r\n$ # wait\r\n$ kubectl describe pod exit-output | grep State -A 4\r\n    State:\t\tTerminated\r\n      Reason:\t\tCompleted\r\n      Exit Code:\t0\r\n      Started:\t\tTue, 19 Apr 2016 13:23:13 -0700\r\n      Finished:\t\tTue, 19 Apr 2016 13:24:13 -0700\r\n$ kubectl logs exit-output\r\nExiting in 60\r\ngoodbye\r\n```\r\n\r\nI double checked as well that the file at `/var/lib/kubelet/pods/$id/finished-$id` existed and looked as expected.\r\n\r\nThis is related to https://github.com/coreos/rkt/issues/1789#issuecomment-207111814 and follows https://github.com/kubernetes/kubernetes/pull/24367 + https://github.com/coreos/rkt/issues/2445\r\n\r\ncc @jonboulle @iaguis @yifan-gu @kubernetes/sig-node","created_at":"2016-04-19T21:08:55Z","updated_at":"2016-04-24T01:29:08Z","closed_at":"2016-04-24T01:29:08Z","merged_at":"2016-04-24T01:29:08Z","merge_commit_sha":"30891c7f3f1ba48d57cda24ede9ba9f65ab305f8","assignee":{"login":"yifan-gu","id":3278588,"avatar_url":"https://avatars.githubusercontent.com/u/3278588?v=3","gravatar_id":"","url":"https://api.github.com/users/yifan-gu","html_url":"https://github.com/yifan-gu","followers_url":"https://api.github.com/users/yifan-gu/followers","following_url":"https://api.github.com/users/yifan-gu/following{/other_user}","gists_url":"https://api.github.com/users/yifan-gu/gists{/gist_id}","starred_url":"https://api.github.com/users/yifan-gu/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/yifan-gu/subscriptions","organizations_url":"https://api.github.com/users/yifan-gu/orgs","repos_url":"https://api.github.com/users/yifan-gu/repos","events_url":"https://api.github.com/users/yifan-gu/events{/privacy}","received_events_url":"https://api.github.com/users/yifan-gu/received_events","type":"User","site_admin":false},"milestone":{"url":"https://api.github.com/repos/kubernetes/kubernetes/milestones/19","html_url":"https://github.com/kubernetes/kubernetes/milestones/rktnetes-v1.0","labels_url":"https://api.github.com/repos/kubernetes/kubernetes/milestones/19/labels","id":1685452,"number":19,"title":"rktnetes-v1.0","description":"","creator":{"login":"dchen1107","id":7740897,"avatar_url":"https://avatars.githubusercontent.com/u/7740897?v=3","gravatar_id":"","url":"https://api.github.com/users/dchen1107","html_url":"https://github.com/dchen1107","followers_url":"https://api.github.com/users/dchen1107/followers","following_url":"https://api.github.com/users/dchen1107/following{/other_user}","gists_url":"https://api.github.com/users/dchen1107/gists{/gist_id}","starred_url":"https://api.github.com/users/dchen1107/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dchen1107/subscriptions","organizations_url":"https://api.github.com/users/dchen1107/orgs","repos_url":"https://api.github.com/users/dchen1107/repos","events_url":"https://api.github.com/users/dchen1107/events{/privacy}","received_events_url":"https://api.github.com/users/dchen1107/received_events","type":"User","site_admin":false},"open_issues":21,"closed_issues":12,"state":"open","created_at":"2016-04-05T19:02:11Z","updated_at":"2016-04-24T01:29:08Z","due_on":"2016-05-09T07:00:00Z","closed_at":null},"commits_url":"https://api.github.com/repos/kubernetes/kubernetes/pulls/24496/commits","review_comments_url":"https://api.github.com/repos/kubernetes/kubernetes/pulls/24496/comments","review_comment_url":"https://api.github.com/repos/kubernetes/kubernetes/pulls/comments{/number}","comments_url":"https://api.github.com/repos/kubernetes/kubernetes/issues/24496/comments","statuses_url":"https://api.github.com/repos/kubernetes/kubernetes/statuses/a6718f59691d7b3989c4222fb21e8daeb2ff84cc","head":{"label":"euank:rkt-finished-at","ref":"rkt-finished-at","sha":"a6718f59691d7b3989c4222fb21e8daeb2ff84cc","user":{"login":"euank","id":2147649,"avatar_url":"https://avatars.githubusercontent.com/u/2147649?v=3","gravatar_id":"","url":"https://api.github.com/users/euank","html_url":"https://github.com/euank","followers_url":"https://api.github.com/users/euank/followers","following_url":"https://api.github.com/users/euank/following{/other_user}","gists_url":"https://api.github.com/users/euank/gists{/gist_id}","starred_url":"https://api.github.com/users/euank/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/euank/subscriptions","organizations_url":"https://api.github.com/users/euank/orgs","repos_url":"https://api.github.com/users/euank/repos","events_url":"https://api.github.com/users/euank/events{/privacy}","received_events_url":"https://api.github.com/users/euank/received_events","type":"User","site_admin":false},"repo":{"id":55001117,"name":"kubernetes","full_name":"euank/kubernetes","owner":{"login":"euank","id":2147649,"avatar_url":"https://avatars.githubusercontent.com/u/2147649?v=3","gravatar_id":"","url":"https://api.github.com/users/euank","html_url":"https://github.com/euank","followers_url":"https://api.github.com/users/euank/followers","following_url":"https://api.github.com/users/euank/following{/other_user}","gists_url":"https://api.github.com/users/euank/gists{/gist_id}","starred_url":"https://api.github.com/users/euank/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/euank/subscriptions","organizations_url":"https://api.github.com/users/euank/orgs","repos_url":"https://api.github.com/users/euank/repos","events_url":"https://api.github.com/users/euank/events{/privacy}","received_events_url":"https://api.github.com/users/euank/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/euank/kubernetes","description":"Container Cluster Manager from Google","fork":true,"url":"https://api.github.com/repos/euank/kubernetes","forks_url":"https://api.github.com/repos/euank/kubernetes/forks","keys_url":"https://api.github.com/repos/euank/kubernetes/keys{/key_id}","collaborators_url":"https://api.github.com/repos/euank/kubernetes/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/euank/kubernetes/teams","hooks_url":"https://api.github.com/repos/euank/kubernetes/hooks","issue_events_url":"https://api.github.com/repos/euank/kubernetes/issues/events{/number}","events_url":"https://api.github.com/repos/euank/kubernetes/events","assignees_url":"https://api.github.com/repos/euank/kubernetes/assignees{/user}","branches_url":"https://api.github.com/repos/euank/kubernetes/branches{/branch}","tags_url":"https://api.github.com/repos/euank/kubernetes/tags","blobs_url":"https://api.github.com/repos/euank/kubernetes/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/euank/kubernetes/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/euank/kubernetes/git/refs{/sha}","trees_url":"https://api.github.com/repos/euank/kubernetes/git/trees{/sha}","statuses_url":"https://api.github.com/repos/euank/kubernetes/statuses/{sha}","languages_url":"https://api.github.com/repos/euank/kubernetes/languages","stargazers_url":"https://api.github.com/repos/euank/kubernetes/stargazers","contributors_url":"https://api.github.com/repos/euank/kubernetes/contributors","subscribers_url":"https://api.github.com/repos/euank/kubernetes/subscribers","subscription_url":"https://api.github.com/repos/euank/kubernetes/subscription","commits_url":"https://api.github.com/repos/euank/kubernetes/commits{/sha}","git_commits_url":"https://api.github.com/repos/euank/kubernetes/git/commits{/sha}","comments_url":"https://api.github.com/repos/euank/kubernetes/comments{/number}","issue_comment_url":"https://api.github.com/repos/euank/kubernetes/issues/comments{/number}","contents_url":"https://api.github.com/repos/euank/kubernetes/contents/{+path}","compare_url":"https://api.github.com/repos/euank/kubernetes/compare/{base}...{head}","merges_url":"https://api.github.com/repos/euank/kubernetes/merges","archive_url":"https://api.github.com/repos/euank/kubernetes/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/euank/kubernetes/downloads","issues_url":"https://api.github.com/repos/euank/kubernetes/issues{/number}","pulls_url":"https://api.github.com/repos/euank/kubernetes/pulls{/number}","milestones_url":"https://api.github.com/repos/euank/kubernetes/milestones{/number}","notifications_url":"https://api.github.com/repos/euank/kubernetes/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/euank/kubernetes/labels{/name}","releases_url":"https://api.github.com/repos/euank/kubernetes/releases{/id}","deployments_url":"https://api.github.com/repos/euank/kubernetes/deployments","created_at":"2016-03-29T18:39:10Z","updated_at":"2016-03-29T18:39:23Z","pushed_at":"2016-04-22T22:35:25Z","git_url":"git://github.com/euank/kubernetes.git","ssh_url":"git@github.com:euank/kubernetes.git","clone_url":"https://github.com/euank/kubernetes.git","svn_url":"https://github.com/euank/kubernetes","homepage":"http://kubernetes.io","size":186074,"stargazers_count":0,"watchers_count":0,"language":"Go","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"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":"2e9bcb8311d27cb72925c6af33189635ea838a86","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}","deployments_url":"https://api.github.com/repos/kubernetes/kubernetes/deployments","created_at":"2014-06-06T22:56:04Z","updated_at":"2016-04-24T00:13:14Z","pushed_at":"2016-04-24T01:29:08Z","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":380300,"stargazers_count":14020,"watchers_count":14020,"language":"Go","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":4158,"mirror_url":null,"open_issues_count":3465,"forks":4158,"open_issues":3465,"watchers":14020,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/kubernetes/kubernetes/pulls/24496"},"html":{"href":"https://github.com/kubernetes/kubernetes/pull/24496"},"issue":{"href":"https://api.github.com/repos/kubernetes/kubernetes/issues/24496"},"comments":{"href":"https://api.github.com/repos/kubernetes/kubernetes/issues/24496/comments"},"review_comments":{"href":"https://api.github.com/repos/kubernetes/kubernetes/pulls/24496/comments"},"review_comment":{"href":"https://api.github.com/repos/kubernetes/kubernetes/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/kubernetes/kubernetes/pulls/24496/commits"},"statuses":{"href":"https://api.github.com/repos/kubernetes/kubernetes/statuses/a6718f59691d7b3989c4222fb21e8daeb2ff84cc"}},"merged":true,"mergeable":null,"mergeable_state":"unknown","merged_by":{"login":"k8s-merge-robot","id":13653959,"avatar_url":"https://avatars.githubusercontent.com/u/13653959?v=3","gravatar_id":"","url":"https://api.github.com/users/k8s-merge-robot","html_url":"https://github.com/k8s-merge-robot","followers_url":"https://api.github.com/users/k8s-merge-robot/followers","following_url":"https://api.github.com/users/k8s-merge-robot/following{/other_user}","gists_url":"https://api.github.com/users/k8s-merge-robot/gists{/gist_id}","starred_url":"https://api.github.com/users/k8s-merge-robot/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/k8s-merge-robot/subscriptions","organizations_url":"https://api.github.com/users/k8s-merge-robot/orgs","repos_url":"https://api.github.com/users/k8s-merge-robot/repos","events_url":"https://api.github.com/users/k8s-merge-robot/events{/privacy}","received_events_url":"https://api.github.com/users/k8s-merge-robot/received_events","type":"User","site_admin":false},"comments":25,"review_comments":7,"commits":3,"additions":1515,"deletions":181,"changed_files":20}}