{"action":"created","comment":{"url":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/pulls/comments/29985029","id":29985029,"diff_hunk":"@@ -1065,6 +1065,46 @@ func (kl *Kubelet) cleanupOrphanedVolumes(pods []*api.Pod, runningPods []*kubeco\n \treturn nil\n }\n \n+// filterOutPodsExceedRuntimeTtl filters pods that have a container whose startAt time is more\n+// than the specified RunningTtl for the pod.  It records an event that the pod has run longer\n+// than the allocated time, and updates the pod status as failed.  By filtering the pod from\n+// the result set, the Kubelet will kill the pod's containers as part of normal SyncPods workflow","path":"pkg/kubelet/kubelet.go","position":7,"original_position":7,"commit_id":"7c79272c8c7c80d6d688e2eaa0d38f08b9179b64","original_commit_id":"7c79272c8c7c80d6d688e2eaa0d38f08b9179b64","user":{"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},"body":"How this will be interactivate with restart policy -- RestartOnFailure and RestartAlways?","created_at":"2015-05-08T23:31:23Z","updated_at":"2015-05-08T23:31:23Z","html_url":"https://github.com/GoogleCloudPlatform/kubernetes/pull/7868#discussion_r29985029","pull_request_url":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/pulls/7868","_links":{"self":{"href":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/pulls/comments/29985029"},"html":{"href":"https://github.com/GoogleCloudPlatform/kubernetes/pull/7868#discussion_r29985029"},"pull_request":{"href":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/pulls/7868"}}},"pull_request":{"url":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/pulls/7868","id":34871326,"html_url":"https://github.com/GoogleCloudPlatform/kubernetes/pull/7868","diff_url":"https://github.com/GoogleCloudPlatform/kubernetes/pull/7868.diff","patch_url":"https://github.com/GoogleCloudPlatform/kubernetes/pull/7868.patch","issue_url":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/issues/7868","number":7868,"state":"open","locked":false,"title":"WIP: Allow a pod to be actively killed by the kubelet if it runs too long","user":{"login":"derekwaynecarr","id":6233452,"avatar_url":"https://avatars.githubusercontent.com/u/6233452?v=3","gravatar_id":"","url":"https://api.github.com/users/derekwaynecarr","html_url":"https://github.com/derekwaynecarr","followers_url":"https://api.github.com/users/derekwaynecarr/followers","following_url":"https://api.github.com/users/derekwaynecarr/following{/other_user}","gists_url":"https://api.github.com/users/derekwaynecarr/gists{/gist_id}","starred_url":"https://api.github.com/users/derekwaynecarr/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/derekwaynecarr/subscriptions","organizations_url":"https://api.github.com/users/derekwaynecarr/orgs","repos_url":"https://api.github.com/users/derekwaynecarr/repos","events_url":"https://api.github.com/users/derekwaynecarr/events{/privacy}","received_events_url":"https://api.github.com/users/derekwaynecarr/received_events","type":"User","site_admin":false},"body":"Note: Pending agreement on approach, I will add the requisite unit test and validation code.\r\n\r\nChange:\r\nAdd a new optional field to PodSpec, ```RunningTtl```, that sets a time in seconds that a pod is allowed to run before the Kubelet will actively try to fail that pod and subsequently kill its containers.  The \"Running\" concept aligned with the behavior in Kubelet today by enforcing the TTL value relative to the earliest started container in the pod.  The target use case is to let a user basically time-box how long a pod can run without the need to build any additional active monitoring.  It's expected that the graceful termination period for the pod will be respected once its actually properly plumbed through the Kubelet... right now, it looks to default to 10s in all cases.\r\n\r\nThis change affects all pods independent of their RestartPolicy, so a RestartPolicy Always pod will be failed, and if its not managed by a replication controller that will create a new instance of that pod, the pod will basically be done.\r\n\r\n@bgrant0607  - This is the follow-up to discussions we had at the last community meet-up.  Loosely related to #7856 since chosen terminology aligned with the Running pod phase.  I thought about a future use case for WaitingTtl to basically set a limit to how long we are willing to wait for a docker image pull before killing the pod to hopefully schedule to a new host, but that is for another time...\r\n\r\n/cc @abhgupta @smarterclayton ","created_at":"2015-05-06T23:37:20Z","updated_at":"2015-05-08T23:31:23Z","closed_at":null,"merged_at":null,"merge_commit_sha":"f7b95cb479b7fe09767e2c2284f01cafdd729010","assignee":{"login":"bgrant0607","id":7725777,"avatar_url":"https://avatars.githubusercontent.com/u/7725777?v=3","gravatar_id":"","url":"https://api.github.com/users/bgrant0607","html_url":"https://github.com/bgrant0607","followers_url":"https://api.github.com/users/bgrant0607/followers","following_url":"https://api.github.com/users/bgrant0607/following{/other_user}","gists_url":"https://api.github.com/users/bgrant0607/gists{/gist_id}","starred_url":"https://api.github.com/users/bgrant0607/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bgrant0607/subscriptions","organizations_url":"https://api.github.com/users/bgrant0607/orgs","repos_url":"https://api.github.com/users/bgrant0607/repos","events_url":"https://api.github.com/users/bgrant0607/events{/privacy}","received_events_url":"https://api.github.com/users/bgrant0607/received_events","type":"User","site_admin":false},"milestone":null,"commits_url":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/pulls/7868/commits","review_comments_url":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/pulls/7868/comments","review_comment_url":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/pulls/comments{/number}","comments_url":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/issues/7868/comments","statuses_url":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/statuses/7c79272c8c7c80d6d688e2eaa0d38f08b9179b64","head":{"label":"derekwaynecarr:bound_duration","ref":"bound_duration","sha":"7c79272c8c7c80d6d688e2eaa0d38f08b9179b64","user":{"login":"derekwaynecarr","id":6233452,"avatar_url":"https://avatars.githubusercontent.com/u/6233452?v=3","gravatar_id":"","url":"https://api.github.com/users/derekwaynecarr","html_url":"https://github.com/derekwaynecarr","followers_url":"https://api.github.com/users/derekwaynecarr/followers","following_url":"https://api.github.com/users/derekwaynecarr/following{/other_user}","gists_url":"https://api.github.com/users/derekwaynecarr/gists{/gist_id}","starred_url":"https://api.github.com/users/derekwaynecarr/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/derekwaynecarr/subscriptions","organizations_url":"https://api.github.com/users/derekwaynecarr/orgs","repos_url":"https://api.github.com/users/derekwaynecarr/repos","events_url":"https://api.github.com/users/derekwaynecarr/events{/privacy}","received_events_url":"https://api.github.com/users/derekwaynecarr/received_events","type":"User","site_admin":false},"repo":{"id":21397341,"name":"kubernetes","full_name":"derekwaynecarr/kubernetes","owner":{"login":"derekwaynecarr","id":6233452,"avatar_url":"https://avatars.githubusercontent.com/u/6233452?v=3","gravatar_id":"","url":"https://api.github.com/users/derekwaynecarr","html_url":"https://github.com/derekwaynecarr","followers_url":"https://api.github.com/users/derekwaynecarr/followers","following_url":"https://api.github.com/users/derekwaynecarr/following{/other_user}","gists_url":"https://api.github.com/users/derekwaynecarr/gists{/gist_id}","starred_url":"https://api.github.com/users/derekwaynecarr/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/derekwaynecarr/subscriptions","organizations_url":"https://api.github.com/users/derekwaynecarr/orgs","repos_url":"https://api.github.com/users/derekwaynecarr/repos","events_url":"https://api.github.com/users/derekwaynecarr/events{/privacy}","received_events_url":"https://api.github.com/users/derekwaynecarr/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/derekwaynecarr/kubernetes","description":"Container Cluster Manager","fork":true,"url":"https://api.github.com/repos/derekwaynecarr/kubernetes","forks_url":"https://api.github.com/repos/derekwaynecarr/kubernetes/forks","keys_url":"https://api.github.com/repos/derekwaynecarr/kubernetes/keys{/key_id}","collaborators_url":"https://api.github.com/repos/derekwaynecarr/kubernetes/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/derekwaynecarr/kubernetes/teams","hooks_url":"https://api.github.com/repos/derekwaynecarr/kubernetes/hooks","issue_events_url":"https://api.github.com/repos/derekwaynecarr/kubernetes/issues/events{/number}","events_url":"https://api.github.com/repos/derekwaynecarr/kubernetes/events","assignees_url":"https://api.github.com/repos/derekwaynecarr/kubernetes/assignees{/user}","branches_url":"https://api.github.com/repos/derekwaynecarr/kubernetes/branches{/branch}","tags_url":"https://api.github.com/repos/derekwaynecarr/kubernetes/tags","blobs_url":"https://api.github.com/repos/derekwaynecarr/kubernetes/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/derekwaynecarr/kubernetes/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/derekwaynecarr/kubernetes/git/refs{/sha}","trees_url":"https://api.github.com/repos/derekwaynecarr/kubernetes/git/trees{/sha}","statuses_url":"https://api.github.com/repos/derekwaynecarr/kubernetes/statuses/{sha}","languages_url":"https://api.github.com/repos/derekwaynecarr/kubernetes/languages","stargazers_url":"https://api.github.com/repos/derekwaynecarr/kubernetes/stargazers","contributors_url":"https://api.github.com/repos/derekwaynecarr/kubernetes/contributors","subscribers_url":"https://api.github.com/repos/derekwaynecarr/kubernetes/subscribers","subscription_url":"https://api.github.com/repos/derekwaynecarr/kubernetes/subscription","commits_url":"https://api.github.com/repos/derekwaynecarr/kubernetes/commits{/sha}","git_commits_url":"https://api.github.com/repos/derekwaynecarr/kubernetes/git/commits{/sha}","comments_url":"https://api.github.com/repos/derekwaynecarr/kubernetes/comments{/number}","issue_comment_url":"https://api.github.com/repos/derekwaynecarr/kubernetes/issues/comments{/number}","contents_url":"https://api.github.com/repos/derekwaynecarr/kubernetes/contents/{+path}","compare_url":"https://api.github.com/repos/derekwaynecarr/kubernetes/compare/{base}...{head}","merges_url":"https://api.github.com/repos/derekwaynecarr/kubernetes/merges","archive_url":"https://api.github.com/repos/derekwaynecarr/kubernetes/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/derekwaynecarr/kubernetes/downloads","issues_url":"https://api.github.com/repos/derekwaynecarr/kubernetes/issues{/number}","pulls_url":"https://api.github.com/repos/derekwaynecarr/kubernetes/pulls{/number}","milestones_url":"https://api.github.com/repos/derekwaynecarr/kubernetes/milestones{/number}","notifications_url":"https://api.github.com/repos/derekwaynecarr/kubernetes/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/derekwaynecarr/kubernetes/labels{/name}","releases_url":"https://api.github.com/repos/derekwaynecarr/kubernetes/releases{/id}","created_at":"2014-07-01T17:56:58Z","updated_at":"2015-04-17T17:54:40Z","pushed_at":"2015-05-06T23:23:37Z","git_url":"git://github.com/derekwaynecarr/kubernetes.git","ssh_url":"git@github.com:derekwaynecarr/kubernetes.git","clone_url":"https://github.com/derekwaynecarr/kubernetes.git","svn_url":"https://github.com/derekwaynecarr/kubernetes","homepage":null,"size":52987,"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":"GoogleCloudPlatform:master","ref":"master","sha":"9939f9273127a48120b92ab20f345895b5a77229","user":{"login":"GoogleCloudPlatform","id":2810941,"avatar_url":"https://avatars.githubusercontent.com/u/2810941?v=3","gravatar_id":"","url":"https://api.github.com/users/GoogleCloudPlatform","html_url":"https://github.com/GoogleCloudPlatform","followers_url":"https://api.github.com/users/GoogleCloudPlatform/followers","following_url":"https://api.github.com/users/GoogleCloudPlatform/following{/other_user}","gists_url":"https://api.github.com/users/GoogleCloudPlatform/gists{/gist_id}","starred_url":"https://api.github.com/users/GoogleCloudPlatform/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/GoogleCloudPlatform/subscriptions","organizations_url":"https://api.github.com/users/GoogleCloudPlatform/orgs","repos_url":"https://api.github.com/users/GoogleCloudPlatform/repos","events_url":"https://api.github.com/users/GoogleCloudPlatform/events{/privacy}","received_events_url":"https://api.github.com/users/GoogleCloudPlatform/received_events","type":"Organization","site_admin":false},"repo":{"id":20580498,"name":"kubernetes","full_name":"GoogleCloudPlatform/kubernetes","owner":{"login":"GoogleCloudPlatform","id":2810941,"avatar_url":"https://avatars.githubusercontent.com/u/2810941?v=3","gravatar_id":"","url":"https://api.github.com/users/GoogleCloudPlatform","html_url":"https://github.com/GoogleCloudPlatform","followers_url":"https://api.github.com/users/GoogleCloudPlatform/followers","following_url":"https://api.github.com/users/GoogleCloudPlatform/following{/other_user}","gists_url":"https://api.github.com/users/GoogleCloudPlatform/gists{/gist_id}","starred_url":"https://api.github.com/users/GoogleCloudPlatform/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/GoogleCloudPlatform/subscriptions","organizations_url":"https://api.github.com/users/GoogleCloudPlatform/orgs","repos_url":"https://api.github.com/users/GoogleCloudPlatform/repos","events_url":"https://api.github.com/users/GoogleCloudPlatform/events{/privacy}","received_events_url":"https://api.github.com/users/GoogleCloudPlatform/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/GoogleCloudPlatform/kubernetes","description":"Container Cluster Manager from Google","fork":false,"url":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes","forks_url":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/forks","keys_url":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/keys{/key_id}","collaborators_url":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/teams","hooks_url":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/hooks","issue_events_url":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/issues/events{/number}","events_url":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/events","assignees_url":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/assignees{/user}","branches_url":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/branches{/branch}","tags_url":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/tags","blobs_url":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/git/refs{/sha}","trees_url":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/git/trees{/sha}","statuses_url":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/statuses/{sha}","languages_url":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/languages","stargazers_url":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/stargazers","contributors_url":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/contributors","subscribers_url":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/subscribers","subscription_url":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/subscription","commits_url":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/commits{/sha}","git_commits_url":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/git/commits{/sha}","comments_url":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/comments{/number}","issue_comment_url":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/issues/comments{/number}","contents_url":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/contents/{+path}","compare_url":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/compare/{base}...{head}","merges_url":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/merges","archive_url":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/downloads","issues_url":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/issues{/number}","pulls_url":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/pulls{/number}","milestones_url":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/milestones{/number}","notifications_url":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/labels{/name}","releases_url":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/releases{/id}","created_at":"2014-06-06T22:56:04Z","updated_at":"2015-05-08T20:33:40Z","pushed_at":"2015-05-08T23:24:42Z","git_url":"git://github.com/GoogleCloudPlatform/kubernetes.git","ssh_url":"git@github.com:GoogleCloudPlatform/kubernetes.git","clone_url":"https://github.com/GoogleCloudPlatform/kubernetes.git","svn_url":"https://github.com/GoogleCloudPlatform/kubernetes","homepage":"http://kubernetes.io","size":257600,"stargazers_count":7555,"watchers_count":7555,"language":"Go","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":1532,"mirror_url":null,"open_issues_count":1050,"forks":1532,"open_issues":1050,"watchers":7555,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/pulls/7868"},"html":{"href":"https://github.com/GoogleCloudPlatform/kubernetes/pull/7868"},"issue":{"href":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/issues/7868"},"comments":{"href":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/issues/7868/comments"},"review_comments":{"href":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/pulls/7868/comments"},"review_comment":{"href":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/pulls/7868/commits"},"statuses":{"href":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/statuses/7c79272c8c7c80d6d688e2eaa0d38f08b9179b64"}}}}