{"action":"opened","number":29641,"pull_request":{"url":"https://api.github.com/repos/kubernetes/kubernetes/pulls/29641","id":78935676,"html_url":"https://github.com/kubernetes/kubernetes/pull/29641","diff_url":"https://github.com/kubernetes/kubernetes/pull/29641.diff","patch_url":"https://github.com/kubernetes/kubernetes/pull/29641.patch","issue_url":"https://api.github.com/repos/kubernetes/kubernetes/issues/29641","number":29641,"state":"open","locked":false,"title":"Fix configmap volume race.","user":{"login":"ivan4th","id":190448,"avatar_url":"https://avatars.githubusercontent.com/u/190448?v=3","gravatar_id":"","url":"https://api.github.com/users/ivan4th","html_url":"https://github.com/ivan4th","followers_url":"https://api.github.com/users/ivan4th/followers","following_url":"https://api.github.com/users/ivan4th/following{/other_user}","gists_url":"https://api.github.com/users/ivan4th/gists{/gist_id}","starred_url":"https://api.github.com/users/ivan4th/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ivan4th/subscriptions","organizations_url":"https://api.github.com/users/ivan4th/orgs","repos_url":"https://api.github.com/users/ivan4th/repos","events_url":"https://api.github.com/users/ivan4th/events{/privacy}","received_events_url":"https://api.github.com/users/ivan4th/received_events","type":"User","site_admin":false},"body":"wrappedVolumeSpec used by configMapVolumeMounter and\r\nconfigMapVolumeUnmounter contained a pointer to api.Volume which was\r\nbeing patched by NewWrapperMounter/NewWrapperUnmounter, causing race\r\ncondition during configmap volume mounts.\r\n\r\nSee https://github.com/kubernetes/kubernetes/issues/29297#issuecomment-235403806 for complete explanation.\r\nThe subtle bug was introduced by #18445, it also can affect other volume plugins utilizing `wrappedVolumeSpec` technique, if this PR is correct/accepted will make more PRs for secrets etc. Although tmpfs variety of inner `emptyDir` volume appears to be less susceptible to this race, there's chance it can fail too.\r\n\r\nThe errors produced by this race look like this:\r\n```Jul 19 17:05:21 ubuntu1604 kubelet[17097]: I0719 17:05:21.854303   17097 reconciler.go:253] MountVolume operation started for volume \"kubernetes.io/configmap/foo-files\"\r\n (spec.Name: \"files\") to pod \"11786582-4dbf-11e6-9fc9-64cca009c636\" (UID: \"11786582-4dbf-11e6-9fc9-64cca009c636\").\r\nJul 19 17:05:21 ubuntu1604 kubelet[17097]: I0719 17:05:21.854842   17097 reconciler.go:253] MountVolume operation started for volume \"kubernetes.io/configmap/bar-file\r\ns\" (spec.Name: \"files\") to pod \"117d2c22-4dbf-11e6-9fc9-64cca009c636\" (UID: \"117d2c22-4dbf-11e6-9fc9-64cca009c636\").\r\nJul 19 17:05:21 ubuntu1604 kubelet[17097]: E0719 17:05:21.860796   17097 configmap.go:171] Error creating atomic writer: stat /var/lib/kubelet/pods/117d2c22-4dbf-11e6-9fc9-64cca009c636/volumes/kubernetes.io~configmap/files: no such file or directory\r\nJul 19 17:05:21 ubuntu1604 kubelet[17097]: E0719 17:05:21.861070   17097 goroutinemap.go:155] Operation for \"kubernetes.io/configmap/bar-files\" failed. No retries permitted until 2016-07-19 17:07:21.861036886 +0200 CEST (durationBeforeRetry 2m0s). error: MountVolume.SetUp failed for volume \"kubernetes.io/configmap/bar-files\" (spec.Name: \"files\") pod \"117d2c22-4dbf-11e6-9fc9-64cca009c636\" (UID: \"117d2c22-4dbf-11e6-9fc9-64cca009c636\") with: stat /var/lib/kubelet/pods/117d2c22-4dbf-11e6-9fc9-64cca009c636/volumes/kubernetes.io~configmap/files: no such file or directory\r\nJul 19 17:05:21 ubuntu1604 kubelet[17097]: E0719 17:05:21.861271   17097 configmap.go:171] Error creating atomic writer: stat /var/lib/kubelet/pods/11786582-4dbf-11e6-9fc9-64cca009c636/volumes/kubernetes.io~configmap/files: no such file or directory\r\nJul 19 17:05:21 ubuntu1604 kubelet[17097]: E0719 17:05:21.862284   17097 goroutinemap.go:155] Operation for \"kubernetes.io/configmap/foo-files\" failed. No retries permitted until 2016-07-19 17:07:21.862275753 +0200 CEST (durationBeforeRetry 2m0s). error: MountVolume.SetUp failed for volume \"kubernetes.io/configmap/foo-files\" (spec.Name: \"files\") pod \"11786582-4dbf-11e6-9fc9-64cca009c636\" (UID: \"11786582-4dbf-11e6-9fc9-64cca009c636\") with: stat /var/lib/kubelet/pods/11786582-4dbf-11e6-9fc9-64cca009c636/volumes/kubernetes.io~configmap/files: no such file or directory```\r\n\r\nNote \"Error creating atomic writer\" errors.\r\nThis problem can be reproduced by making kubelet mount multiple config map volumes in parallel.","created_at":"2016-07-26T22:18:34Z","updated_at":"2016-07-26T22:18:34Z","closed_at":null,"merged_at":null,"merge_commit_sha":null,"assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/kubernetes/kubernetes/pulls/29641/commits","review_comments_url":"https://api.github.com/repos/kubernetes/kubernetes/pulls/29641/comments","review_comment_url":"https://api.github.com/repos/kubernetes/kubernetes/pulls/comments{/number}","comments_url":"https://api.github.com/repos/kubernetes/kubernetes/issues/29641/comments","statuses_url":"https://api.github.com/repos/kubernetes/kubernetes/statuses/105ac4859a1f7802cdd4028d8840bf35e9a15cce","head":{"label":"ivan4th:fix-configmap-race","ref":"fix-configmap-race","sha":"105ac4859a1f7802cdd4028d8840bf35e9a15cce","user":{"login":"ivan4th","id":190448,"avatar_url":"https://avatars.githubusercontent.com/u/190448?v=3","gravatar_id":"","url":"https://api.github.com/users/ivan4th","html_url":"https://github.com/ivan4th","followers_url":"https://api.github.com/users/ivan4th/followers","following_url":"https://api.github.com/users/ivan4th/following{/other_user}","gists_url":"https://api.github.com/users/ivan4th/gists{/gist_id}","starred_url":"https://api.github.com/users/ivan4th/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ivan4th/subscriptions","organizations_url":"https://api.github.com/users/ivan4th/orgs","repos_url":"https://api.github.com/users/ivan4th/repos","events_url":"https://api.github.com/users/ivan4th/events{/privacy}","received_events_url":"https://api.github.com/users/ivan4th/received_events","type":"User","site_admin":false},"repo":{"id":61797759,"name":"kubernetes","full_name":"ivan4th/kubernetes","owner":{"login":"ivan4th","id":190448,"avatar_url":"https://avatars.githubusercontent.com/u/190448?v=3","gravatar_id":"","url":"https://api.github.com/users/ivan4th","html_url":"https://github.com/ivan4th","followers_url":"https://api.github.com/users/ivan4th/followers","following_url":"https://api.github.com/users/ivan4th/following{/other_user}","gists_url":"https://api.github.com/users/ivan4th/gists{/gist_id}","starred_url":"https://api.github.com/users/ivan4th/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ivan4th/subscriptions","organizations_url":"https://api.github.com/users/ivan4th/orgs","repos_url":"https://api.github.com/users/ivan4th/repos","events_url":"https://api.github.com/users/ivan4th/events{/privacy}","received_events_url":"https://api.github.com/users/ivan4th/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/ivan4th/kubernetes","description":"Production-Grade Container Scheduling and Management","fork":true,"url":"https://api.github.com/repos/ivan4th/kubernetes","forks_url":"https://api.github.com/repos/ivan4th/kubernetes/forks","keys_url":"https://api.github.com/repos/ivan4th/kubernetes/keys{/key_id}","collaborators_url":"https://api.github.com/repos/ivan4th/kubernetes/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/ivan4th/kubernetes/teams","hooks_url":"https://api.github.com/repos/ivan4th/kubernetes/hooks","issue_events_url":"https://api.github.com/repos/ivan4th/kubernetes/issues/events{/number}","events_url":"https://api.github.com/repos/ivan4th/kubernetes/events","assignees_url":"https://api.github.com/repos/ivan4th/kubernetes/assignees{/user}","branches_url":"https://api.github.com/repos/ivan4th/kubernetes/branches{/branch}","tags_url":"https://api.github.com/repos/ivan4th/kubernetes/tags","blobs_url":"https://api.github.com/repos/ivan4th/kubernetes/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/ivan4th/kubernetes/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/ivan4th/kubernetes/git/refs{/sha}","trees_url":"https://api.github.com/repos/ivan4th/kubernetes/git/trees{/sha}","statuses_url":"https://api.github.com/repos/ivan4th/kubernetes/statuses/{sha}","languages_url":"https://api.github.com/repos/ivan4th/kubernetes/languages","stargazers_url":"https://api.github.com/repos/ivan4th/kubernetes/stargazers","contributors_url":"https://api.github.com/repos/ivan4th/kubernetes/contributors","subscribers_url":"https://api.github.com/repos/ivan4th/kubernetes/subscribers","subscription_url":"https://api.github.com/repos/ivan4th/kubernetes/subscription","commits_url":"https://api.github.com/repos/ivan4th/kubernetes/commits{/sha}","git_commits_url":"https://api.github.com/repos/ivan4th/kubernetes/git/commits{/sha}","comments_url":"https://api.github.com/repos/ivan4th/kubernetes/comments{/number}","issue_comment_url":"https://api.github.com/repos/ivan4th/kubernetes/issues/comments{/number}","contents_url":"https://api.github.com/repos/ivan4th/kubernetes/contents/{+path}","compare_url":"https://api.github.com/repos/ivan4th/kubernetes/compare/{base}...{head}","merges_url":"https://api.github.com/repos/ivan4th/kubernetes/merges","archive_url":"https://api.github.com/repos/ivan4th/kubernetes/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/ivan4th/kubernetes/downloads","issues_url":"https://api.github.com/repos/ivan4th/kubernetes/issues{/number}","pulls_url":"https://api.github.com/repos/ivan4th/kubernetes/pulls{/number}","milestones_url":"https://api.github.com/repos/ivan4th/kubernetes/milestones{/number}","notifications_url":"https://api.github.com/repos/ivan4th/kubernetes/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/ivan4th/kubernetes/labels{/name}","releases_url":"https://api.github.com/repos/ivan4th/kubernetes/releases{/id}","deployments_url":"https://api.github.com/repos/ivan4th/kubernetes/deployments","created_at":"2016-06-23T10:49:36Z","updated_at":"2016-06-23T10:49:53Z","pushed_at":"2016-07-26T22:05:02Z","git_url":"git://github.com/ivan4th/kubernetes.git","ssh_url":"git@github.com:ivan4th/kubernetes.git","clone_url":"https://github.com/ivan4th/kubernetes.git","svn_url":"https://github.com/ivan4th/kubernetes","homepage":"http://kubernetes.io","size":300589,"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":"92e22b424e07201afeb9b707a49841be6695f452","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":"Production-Grade Container Scheduling and Management","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-07-26T22:06:27Z","pushed_at":"2016-07-26T22:09:17Z","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":513114,"stargazers_count":15766,"watchers_count":15766,"language":"Go","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":4986,"mirror_url":null,"open_issues_count":4030,"forks":4986,"open_issues":4030,"watchers":15766,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/kubernetes/kubernetes/pulls/29641"},"html":{"href":"https://github.com/kubernetes/kubernetes/pull/29641"},"issue":{"href":"https://api.github.com/repos/kubernetes/kubernetes/issues/29641"},"comments":{"href":"https://api.github.com/repos/kubernetes/kubernetes/issues/29641/comments"},"review_comments":{"href":"https://api.github.com/repos/kubernetes/kubernetes/pulls/29641/comments"},"review_comment":{"href":"https://api.github.com/repos/kubernetes/kubernetes/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/kubernetes/kubernetes/pulls/29641/commits"},"statuses":{"href":"https://api.github.com/repos/kubernetes/kubernetes/statuses/105ac4859a1f7802cdd4028d8840bf35e9a15cce"}},"merged":false,"mergeable":null,"mergeable_state":"unknown","merged_by":null,"comments":0,"review_comments":0,"commits":1,"additions":10,"deletions":8,"changed_files":1}}
{"actor":{"display_login":"ivan4th"}}