{"action":"created","issue":{"url":"https://api.github.com/repos/kubernetes/kubernetes/issues/33616","repository_url":"https://api.github.com/repos/kubernetes/kubernetes","labels_url":"https://api.github.com/repos/kubernetes/kubernetes/issues/33616/labels{/name}","comments_url":"https://api.github.com/repos/kubernetes/kubernetes/issues/33616/comments","events_url":"https://api.github.com/repos/kubernetes/kubernetes/issues/33616/events","html_url":"https://github.com/kubernetes/kubernetes/pull/33616","id":179642080,"number":33616,"title":"Fix volume states out of sync problem after kubelet restarts","user":{"login":"jingxu97","id":19172805,"avatar_url":"https://avatars.githubusercontent.com/u/19172805?v=3","gravatar_id":"","url":"https://api.github.com/users/jingxu97","html_url":"https://github.com/jingxu97","followers_url":"https://api.github.com/users/jingxu97/followers","following_url":"https://api.github.com/users/jingxu97/following{/other_user}","gists_url":"https://api.github.com/users/jingxu97/gists{/gist_id}","starred_url":"https://api.github.com/users/jingxu97/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jingxu97/subscriptions","organizations_url":"https://api.github.com/users/jingxu97/orgs","repos_url":"https://api.github.com/users/jingxu97/repos","events_url":"https://api.github.com/users/jingxu97/events{/privacy}","received_events_url":"https://api.github.com/users/jingxu97/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/kubernetes/kubernetes/labels/cla:%20yes","name":"cla: yes","color":"bfe5bf"},{"url":"https://api.github.com/repos/kubernetes/kubernetes/labels/lgtm","name":"lgtm","color":"15dd18"},{"url":"https://api.github.com/repos/kubernetes/kubernetes/labels/priority/P0","name":"priority/P0","color":"e11d21"},{"url":"https://api.github.com/repos/kubernetes/kubernetes/labels/release-note","name":"release-note","color":"c2e0c6"},{"url":"https://api.github.com/repos/kubernetes/kubernetes/labels/size/L","name":"size/L","color":"ee9900"}],"state":"closed","locked":false,"assignee":{"login":"saad-ali","id":10052848,"avatar_url":"https://avatars.githubusercontent.com/u/10052848?v=3","gravatar_id":"","url":"https://api.github.com/users/saad-ali","html_url":"https://github.com/saad-ali","followers_url":"https://api.github.com/users/saad-ali/followers","following_url":"https://api.github.com/users/saad-ali/following{/other_user}","gists_url":"https://api.github.com/users/saad-ali/gists{/gist_id}","starred_url":"https://api.github.com/users/saad-ali/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/saad-ali/subscriptions","organizations_url":"https://api.github.com/users/saad-ali/orgs","repos_url":"https://api.github.com/users/saad-ali/repos","events_url":"https://api.github.com/users/saad-ali/events{/privacy}","received_events_url":"https://api.github.com/users/saad-ali/received_events","type":"User","site_admin":false},"assignees":[{"login":"saad-ali","id":10052848,"avatar_url":"https://avatars.githubusercontent.com/u/10052848?v=3","gravatar_id":"","url":"https://api.github.com/users/saad-ali","html_url":"https://github.com/saad-ali","followers_url":"https://api.github.com/users/saad-ali/followers","following_url":"https://api.github.com/users/saad-ali/following{/other_user}","gists_url":"https://api.github.com/users/saad-ali/gists{/gist_id}","starred_url":"https://api.github.com/users/saad-ali/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/saad-ali/subscriptions","organizations_url":"https://api.github.com/users/saad-ali/orgs","repos_url":"https://api.github.com/users/saad-ali/repos","events_url":"https://api.github.com/users/saad-ali/events{/privacy}","received_events_url":"https://api.github.com/users/saad-ali/received_events","type":"User","site_admin":false}],"milestone":null,"comments":30,"created_at":"2016-09-27T23:26:03Z","updated_at":"2016-10-26T01:42:35Z","closed_at":"2016-10-25T23:19:19Z","pull_request":{"url":"https://api.github.com/repos/kubernetes/kubernetes/pulls/33616","html_url":"https://github.com/kubernetes/kubernetes/pull/33616","diff_url":"https://github.com/kubernetes/kubernetes/pull/33616.diff","patch_url":"https://github.com/kubernetes/kubernetes/pull/33616.patch"},"body":"When kubelet restarts, all the information about the volumes will be\r\ngone from actual/desired states. When update node status with mounted\r\nvolumes, the volume list might be empty although there are still volumes\r\nare mounted and in turn causing master to detach those volumes since\r\nthey are not in the mounted volumes list. This fix is to make sure only\r\nupdate mounted volumes list after reconciler starts sync states process.\r\nThis sync state process will scan the existing volume directories and\r\nreconstruct actual states if they are missing.\r\n\r\nThis PR also fixes the problem during orphaned pods' directories. In\r\ncase of the pod directory is unmounted but has not yet deleted (e.g.,\r\ninterrupted with kubelet restarts), clean up routine will delete the\r\ndirectory so that the pod directoriy could be cleaned up (it is safe to\r\ndelete directory since it is no longer mounted)\r\n\r\nThe third issue this PR fixes is that during reconstruct volume in\r\nactual state, mounter could not be nil since it is required for creating\r\ncontainer.VolumeMap. If it is nil, it might cause nil pointer exception\r\nin kubelet.\r\nDetailed design proposal is #33203\r\n\r\n<!-- Reviewable:start -->\r\n---\r\nThis change is [<img src=\"https://reviewable.kubernetes.io/review_button.svg\" height=\"34\" align=\"absmiddle\" alt=\"Reviewable\"/>](https://reviewable.kubernetes.io/reviews/kubernetes/kubernetes/33616)\r\n<!-- Reviewable:end -->\r\n"},"comment":{"url":"https://api.github.com/repos/kubernetes/kubernetes/issues/comments/256227198","html_url":"https://github.com/kubernetes/kubernetes/pull/33616#issuecomment-256227198","issue_url":"https://api.github.com/repos/kubernetes/kubernetes/issues/33616","id":256227198,"user":{"login":"saad-ali","id":10052848,"avatar_url":"https://avatars.githubusercontent.com/u/10052848?v=3","gravatar_id":"","url":"https://api.github.com/users/saad-ali","html_url":"https://github.com/saad-ali","followers_url":"https://api.github.com/users/saad-ali/followers","following_url":"https://api.github.com/users/saad-ali/following{/other_user}","gists_url":"https://api.github.com/users/saad-ali/gists{/gist_id}","starred_url":"https://api.github.com/users/saad-ali/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/saad-ali/subscriptions","organizations_url":"https://api.github.com/users/saad-ali/orgs","repos_url":"https://api.github.com/users/saad-ali/repos","events_url":"https://api.github.com/users/saad-ali/events{/privacy}","received_events_url":"https://api.github.com/users/saad-ali/received_events","type":"User","site_admin":false},"created_at":"2016-10-26T01:42:35Z","updated_at":"2016-10-26T01:42:35Z","body":"@jingxu97: @rootfs sent out https://github.com/kubernetes/kubernetes/pull/35566 which should fix the build break. However, I'd like to understand why we decided to split `IsNotMountPoint` out in to a separate method? My fault for not catching this during the review. "}}
{"actor":{"display_login":"saad-ali"}}