{"action":"created","issue":{"url":"https://api.github.com/repos/kubernetes/kubernetes/issues/55088","repository_url":"https://api.github.com/repos/kubernetes/kubernetes","labels_url":"https://api.github.com/repos/kubernetes/kubernetes/issues/55088/labels{/name}","comments_url":"https://api.github.com/repos/kubernetes/kubernetes/issues/55088/comments","events_url":"https://api.github.com/repos/kubernetes/kubernetes/issues/55088/events","html_url":"https://github.com/kubernetes/kubernetes/pull/55088","id":271146801,"number":55088,"title":"Extends deviceplugin to gracefully handle full device plugin lifecycle.","user":{"login":"jiayingz","id":29497748,"avatar_url":"https://avatars3.githubusercontent.com/u/29497748?v=4","gravatar_id":"","url":"https://api.github.com/users/jiayingz","html_url":"https://github.com/jiayingz","followers_url":"https://api.github.com/users/jiayingz/followers","following_url":"https://api.github.com/users/jiayingz/following{/other_user}","gists_url":"https://api.github.com/users/jiayingz/gists{/gist_id}","starred_url":"https://api.github.com/users/jiayingz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jiayingz/subscriptions","organizations_url":"https://api.github.com/users/jiayingz/orgs","repos_url":"https://api.github.com/users/jiayingz/repos","events_url":"https://api.github.com/users/jiayingz/events{/privacy}","received_events_url":"https://api.github.com/users/jiayingz/received_events","type":"User","site_admin":false},"labels":[{"id":644163893,"url":"https://api.github.com/repos/kubernetes/kubernetes/labels/area/hw-accelerators","name":"area/hw-accelerators","color":"0052cc","default":false},{"id":477397086,"url":"https://api.github.com/repos/kubernetes/kubernetes/labels/cncf-cla:%20yes","name":"cncf-cla: yes","color":"bfe5bf","default":false},{"id":240247879,"url":"https://api.github.com/repos/kubernetes/kubernetes/labels/needs-rebase","name":"needs-rebase","color":"BDBDBD","default":false},{"id":200149833,"url":"https://api.github.com/repos/kubernetes/kubernetes/labels/release-note","name":"release-note","color":"c2e0c6","default":false},{"id":253450978,"url":"https://api.github.com/repos/kubernetes/kubernetes/labels/size/L","name":"size/L","color":"ee9900","default":false}],"state":"open","locked":false,"assignee":{"login":"dchen1107","id":7740897,"avatar_url":"https://avatars2.githubusercontent.com/u/7740897?v=4","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},"assignees":[{"login":"vishh","id":7063592,"avatar_url":"https://avatars2.githubusercontent.com/u/7063592?v=4","gravatar_id":"","url":"https://api.github.com/users/vishh","html_url":"https://github.com/vishh","followers_url":"https://api.github.com/users/vishh/followers","following_url":"https://api.github.com/users/vishh/following{/other_user}","gists_url":"https://api.github.com/users/vishh/gists{/gist_id}","starred_url":"https://api.github.com/users/vishh/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/vishh/subscriptions","organizations_url":"https://api.github.com/users/vishh/orgs","repos_url":"https://api.github.com/users/vishh/repos","events_url":"https://api.github.com/users/vishh/events{/privacy}","received_events_url":"https://api.github.com/users/vishh/received_events","type":"User","site_admin":false},{"login":"dchen1107","id":7740897,"avatar_url":"https://avatars2.githubusercontent.com/u/7740897?v=4","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},{"login":"yujuhong","id":10524058,"avatar_url":"https://avatars1.githubusercontent.com/u/10524058?v=4","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,"comments":10,"created_at":"2017-11-03T23:45:11Z","updated_at":"2017-11-18T08:29:58Z","closed_at":null,"author_association":"MEMBER","pull_request":{"url":"https://api.github.com/repos/kubernetes/kubernetes/pulls/55088","html_url":"https://github.com/kubernetes/kubernetes/pull/55088","diff_url":"https://github.com/kubernetes/kubernetes/pull/55088.diff","patch_url":"https://github.com/kubernetes/kubernetes/pull/55088.patch"},"body":"<!--  Thanks for sending a pull request!  Here are some tips for you:\r\n1. If this is your first time, read our contributor guidelines https://git.k8s.io/community/contributors/devel/pull-requests.md#the-pr-submit-process and developer guide https://git.k8s.io/community/contributors/devel/development.md#development-guide\r\n2. If you want *faster* PR reviews, read how: https://git.k8s.io/community/contributors/devel/pull-requests.md#best-practices-for-faster-reviews\r\n3. Follow the instructions for writing a release note: https://git.k8s.io/community/contributors/devel/pull-requests.md#write-release-notes-if-needed\r\n4. If the PR is unfinished, see how to mark it: https://github.com/kubernetes/community/blob/master/contributors/devel/pull-requests.md#marking-unfinished-pull-requests\r\n-->\r\n\r\n**What this PR does / why we need it**:\r\n- Instead of using cm.capacity field to communicate device plugin resource capacity,\r\nthis PR changes to use an explicit cm.GetDevicePluginResourceCapacity() function\r\nthat returns device plugin resource capacity as well as any inactive device plugin resource.\r\nKubelet syncNodeStatus call this function during its periodic run to update node status\r\ncapacity and allocatable. After this call, device plugin can remove the inactive device\r\nplugin resource from its allDevices field as the update is already pushed to API server.\r\n- Extends device plugin checkpoint data to record registered resources\r\nso that we can finish resource removing even upon kubelet restarts.\r\n- Passes sourcesReady from kubelet to device plugin to avoid removing\r\ninactive pods during grace period of kubelet restart.\r\n- Extends gpu_device_plugin e2e_node test to verify that scheduled pods\r\ncan continue to run even after device plugin deletion and kubelet\r\nrestarts.\r\n\r\n**Which issue(s) this PR fixes** *(optional, in `fixes #<issue number>(, fixes #<issue_number>, ...)` format, will close the issue(s) when PR gets merged)*:\r\nTogether with https://github.com/kubernetes/kubernetes/pull/54488, fixes https://github.com/kubernetes/kubernetes/issues/53395\r\n\r\n**Special notes for your reviewer**:\r\n\r\n**Release note**:\r\n<!--  Write your release note:\r\n1. Enter your extended release note in the below block. If the PR requires additional action from users switching to the new release, include the string \"action required\".\r\n2. If no release note is required, just write \"NONE\".\r\n-->\r\n```release-note\r\nExtends deviceplugin to gracefully handle full device plugin lifecycle.\r\n```\r\n"},"comment":{"url":"https://api.github.com/repos/kubernetes/kubernetes/issues/comments/345427448","html_url":"https://github.com/kubernetes/kubernetes/pull/55088#issuecomment-345427448","issue_url":"https://api.github.com/repos/kubernetes/kubernetes/issues/55088","id":345427448,"user":{"login":"k8s-merge-robot","id":13653959,"avatar_url":"https://avatars0.githubusercontent.com/u/13653959?v=4","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},"created_at":"2017-11-18T08:29:58Z","updated_at":"2017-11-18T08:29:58Z","author_association":"COLLABORATOR","body":"@jiayingz PR needs rebase"}}
{"actor":{"display_login":"k8s-merge-robot"}}