{"action":"created","comment":{"url":"https://api.github.com/repos/openshift/origin/pulls/comments/54286418","id":54286418,"diff_hunk":"@@ -169,6 +171,32 @@ func BuildKubernetesNodeConfig(options configapi.NodeConfig) (*NodeConfig, error\n \t\treturn nil, err\n \t}\n \n+\t// Replace the standard k8s emptyDir volume plugin with a wrapper version\n+\t// which offers XFS quota functionality, but only if the node config\n+\t// specifies an empty dir quota to apply to projects:\n+\tif options.ProjectEmptyDirQuota != nil {\n+\t\tglog.V(2).Info(\"Replacing empty-dir volume plugin with quota wrapper\")\n+\t\twrappedEmptyDirPlugin := false\n+\t\tfor idx, plugin := range cfg.VolumePlugins {\n+\t\t\t// Can't really do type checking or use a constant here as they are not exported:\n+\t\t\tif plugin.Name() == \"kubernetes.io/empty-dir\" {","path":"pkg/cmd/server/kubernetes/node_config.go","position":46,"original_position":46,"commit_id":"0b7e22fc97f3b064498b423c9bc3e1584850d130","original_commit_id":"0b7e22fc97f3b064498b423c9bc3e1584850d130","user":{"login":"deads2k","id":8225098,"avatar_url":"https://avatars.githubusercontent.com/u/8225098?v=3","gravatar_id":"","url":"https://api.github.com/users/deads2k","html_url":"https://github.com/deads2k","followers_url":"https://api.github.com/users/deads2k/followers","following_url":"https://api.github.com/users/deads2k/following{/other_user}","gists_url":"https://api.github.com/users/deads2k/gists{/gist_id}","starred_url":"https://api.github.com/users/deads2k/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/deads2k/subscriptions","organizations_url":"https://api.github.com/users/deads2k/orgs","repos_url":"https://api.github.com/users/deads2k/repos","events_url":"https://api.github.com/users/deads2k/events{/privacy}","received_events_url":"https://api.github.com/users/deads2k/received_events","type":"User","site_admin":false},"body":"> @deads2k @liggitt you guys ok with the composition rather than inheritance compromise above?\r\n\r\nI'm ok with it, though this is making more work later.  You should get @markturansky to help build a way to configure `VolumePlugins`.  Which ones are available, how to configure settings on them, and better organizing which cases they handle.","created_at":"2016-02-26T19:03:44Z","updated_at":"2016-02-26T19:03:44Z","html_url":"https://github.com/openshift/origin/pull/7351#discussion_r54286418","pull_request_url":"https://api.github.com/repos/openshift/origin/pulls/7351","_links":{"self":{"href":"https://api.github.com/repos/openshift/origin/pulls/comments/54286418"},"html":{"href":"https://github.com/openshift/origin/pull/7351#discussion_r54286418"},"pull_request":{"href":"https://api.github.com/repos/openshift/origin/pulls/7351"}}},"pull_request":{"url":"https://api.github.com/repos/openshift/origin/pulls/7351","id":59530015,"html_url":"https://github.com/openshift/origin/pull/7351","diff_url":"https://github.com/openshift/origin/pull/7351.diff","patch_url":"https://github.com/openshift/origin/pull/7351.patch","issue_url":"https://api.github.com/repos/openshift/origin/issues/7351","number":7351,"state":"open","locked":false,"title":"Add beginnings of quota support for emptyDir on XFS.","user":{"login":"dgoodwin","id":51265,"avatar_url":"https://avatars.githubusercontent.com/u/51265?v=3","gravatar_id":"","url":"https://api.github.com/users/dgoodwin","html_url":"https://github.com/dgoodwin","followers_url":"https://api.github.com/users/dgoodwin/followers","following_url":"https://api.github.com/users/dgoodwin/following{/other_user}","gists_url":"https://api.github.com/users/dgoodwin/gists{/gist_id}","starred_url":"https://api.github.com/users/dgoodwin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dgoodwin/subscriptions","organizations_url":"https://api.github.com/users/dgoodwin/orgs","repos_url":"https://api.github.com/users/dgoodwin/repos","events_url":"https://api.github.com/users/dgoodwin/events{/privacy}","received_events_url":"https://api.github.com/users/dgoodwin/received_events","type":"User","site_admin":false},"body":"Wraps the k8s empty_dir volume plugin in one which layers on code to apply\r\nquotas if the volume dir is on XFS, mounted with gquota, and an FSGroup is\r\navailable for the pod.\r\n\r\nThis is likely a stepping stone to a more permanent solution in the future.\r\n\r\nMore details on the research into this proposed approach are available here: https://github.com/openshift/origin/pull/7206\r\n\r\nThis attempt makes an effort to make no kubernetes modifications we need to carry. Instead the goal was to accomplish this purely in origin and look to push to something upstream in time.\r\n\r\nAlternatively we could just modify the empty_dir plugin in kubernetes and carry the patches for time being.","created_at":"2016-02-16T18:07:24Z","updated_at":"2016-02-26T19:03:44Z","closed_at":null,"merged_at":null,"merge_commit_sha":"20232d898cd06edc95f137b33a3a7f9985081cdf","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/openshift/origin/pulls/7351/commits","review_comments_url":"https://api.github.com/repos/openshift/origin/pulls/7351/comments","review_comment_url":"https://api.github.com/repos/openshift/origin/pulls/comments{/number}","comments_url":"https://api.github.com/repos/openshift/origin/issues/7351/comments","statuses_url":"https://api.github.com/repos/openshift/origin/statuses/0b7e22fc97f3b064498b423c9bc3e1584850d130","head":{"label":"dgoodwin:quota-emptydir","ref":"quota-emptydir","sha":"0b7e22fc97f3b064498b423c9bc3e1584850d130","user":{"login":"dgoodwin","id":51265,"avatar_url":"https://avatars.githubusercontent.com/u/51265?v=3","gravatar_id":"","url":"https://api.github.com/users/dgoodwin","html_url":"https://github.com/dgoodwin","followers_url":"https://api.github.com/users/dgoodwin/followers","following_url":"https://api.github.com/users/dgoodwin/following{/other_user}","gists_url":"https://api.github.com/users/dgoodwin/gists{/gist_id}","starred_url":"https://api.github.com/users/dgoodwin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dgoodwin/subscriptions","organizations_url":"https://api.github.com/users/dgoodwin/orgs","repos_url":"https://api.github.com/users/dgoodwin/repos","events_url":"https://api.github.com/users/dgoodwin/events{/privacy}","received_events_url":"https://api.github.com/users/dgoodwin/received_events","type":"User","site_admin":false},"repo":{"id":41919273,"name":"origin","full_name":"dgoodwin/origin","owner":{"login":"dgoodwin","id":51265,"avatar_url":"https://avatars.githubusercontent.com/u/51265?v=3","gravatar_id":"","url":"https://api.github.com/users/dgoodwin","html_url":"https://github.com/dgoodwin","followers_url":"https://api.github.com/users/dgoodwin/followers","following_url":"https://api.github.com/users/dgoodwin/following{/other_user}","gists_url":"https://api.github.com/users/dgoodwin/gists{/gist_id}","starred_url":"https://api.github.com/users/dgoodwin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dgoodwin/subscriptions","organizations_url":"https://api.github.com/users/dgoodwin/orgs","repos_url":"https://api.github.com/users/dgoodwin/repos","events_url":"https://api.github.com/users/dgoodwin/events{/privacy}","received_events_url":"https://api.github.com/users/dgoodwin/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/dgoodwin/origin","description":"OpenShift 3 - build, deploy, and manage your applications with Docker and Kubernetes","fork":true,"url":"https://api.github.com/repos/dgoodwin/origin","forks_url":"https://api.github.com/repos/dgoodwin/origin/forks","keys_url":"https://api.github.com/repos/dgoodwin/origin/keys{/key_id}","collaborators_url":"https://api.github.com/repos/dgoodwin/origin/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/dgoodwin/origin/teams","hooks_url":"https://api.github.com/repos/dgoodwin/origin/hooks","issue_events_url":"https://api.github.com/repos/dgoodwin/origin/issues/events{/number}","events_url":"https://api.github.com/repos/dgoodwin/origin/events","assignees_url":"https://api.github.com/repos/dgoodwin/origin/assignees{/user}","branches_url":"https://api.github.com/repos/dgoodwin/origin/branches{/branch}","tags_url":"https://api.github.com/repos/dgoodwin/origin/tags","blobs_url":"https://api.github.com/repos/dgoodwin/origin/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/dgoodwin/origin/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/dgoodwin/origin/git/refs{/sha}","trees_url":"https://api.github.com/repos/dgoodwin/origin/git/trees{/sha}","statuses_url":"https://api.github.com/repos/dgoodwin/origin/statuses/{sha}","languages_url":"https://api.github.com/repos/dgoodwin/origin/languages","stargazers_url":"https://api.github.com/repos/dgoodwin/origin/stargazers","contributors_url":"https://api.github.com/repos/dgoodwin/origin/contributors","subscribers_url":"https://api.github.com/repos/dgoodwin/origin/subscribers","subscription_url":"https://api.github.com/repos/dgoodwin/origin/subscription","commits_url":"https://api.github.com/repos/dgoodwin/origin/commits{/sha}","git_commits_url":"https://api.github.com/repos/dgoodwin/origin/git/commits{/sha}","comments_url":"https://api.github.com/repos/dgoodwin/origin/comments{/number}","issue_comment_url":"https://api.github.com/repos/dgoodwin/origin/issues/comments{/number}","contents_url":"https://api.github.com/repos/dgoodwin/origin/contents/{+path}","compare_url":"https://api.github.com/repos/dgoodwin/origin/compare/{base}...{head}","merges_url":"https://api.github.com/repos/dgoodwin/origin/merges","archive_url":"https://api.github.com/repos/dgoodwin/origin/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/dgoodwin/origin/downloads","issues_url":"https://api.github.com/repos/dgoodwin/origin/issues{/number}","pulls_url":"https://api.github.com/repos/dgoodwin/origin/pulls{/number}","milestones_url":"https://api.github.com/repos/dgoodwin/origin/milestones{/number}","notifications_url":"https://api.github.com/repos/dgoodwin/origin/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/dgoodwin/origin/labels{/name}","releases_url":"https://api.github.com/repos/dgoodwin/origin/releases{/id}","deployments_url":"https://api.github.com/repos/dgoodwin/origin/deployments","created_at":"2015-09-04T14:10:03Z","updated_at":"2015-09-04T14:10:08Z","pushed_at":"2016-02-25T18:00:11Z","git_url":"git://github.com/dgoodwin/origin.git","ssh_url":"git@github.com:dgoodwin/origin.git","clone_url":"https://github.com/dgoodwin/origin.git","svn_url":"https://github.com/dgoodwin/origin","homepage":"http://www.openshift.org","size":222495,"stargazers_count":0,"watchers_count":0,"language":"Go","has_issues":false,"has_downloads":true,"has_wiki":false,"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":"openshift:master","ref":"master","sha":"b06a8af5fa269f300e1c0b98b9f9518803957183","user":{"login":"openshift","id":792337,"avatar_url":"https://avatars.githubusercontent.com/u/792337?v=3","gravatar_id":"","url":"https://api.github.com/users/openshift","html_url":"https://github.com/openshift","followers_url":"https://api.github.com/users/openshift/followers","following_url":"https://api.github.com/users/openshift/following{/other_user}","gists_url":"https://api.github.com/users/openshift/gists{/gist_id}","starred_url":"https://api.github.com/users/openshift/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/openshift/subscriptions","organizations_url":"https://api.github.com/users/openshift/orgs","repos_url":"https://api.github.com/users/openshift/repos","events_url":"https://api.github.com/users/openshift/events{/privacy}","received_events_url":"https://api.github.com/users/openshift/received_events","type":"Organization","site_admin":false},"repo":{"id":22442668,"name":"origin","full_name":"openshift/origin","owner":{"login":"openshift","id":792337,"avatar_url":"https://avatars.githubusercontent.com/u/792337?v=3","gravatar_id":"","url":"https://api.github.com/users/openshift","html_url":"https://github.com/openshift","followers_url":"https://api.github.com/users/openshift/followers","following_url":"https://api.github.com/users/openshift/following{/other_user}","gists_url":"https://api.github.com/users/openshift/gists{/gist_id}","starred_url":"https://api.github.com/users/openshift/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/openshift/subscriptions","organizations_url":"https://api.github.com/users/openshift/orgs","repos_url":"https://api.github.com/users/openshift/repos","events_url":"https://api.github.com/users/openshift/events{/privacy}","received_events_url":"https://api.github.com/users/openshift/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/openshift/origin","description":"OpenShift 3 - build, deploy, and manage your applications with Docker and Kubernetes","fork":false,"url":"https://api.github.com/repos/openshift/origin","forks_url":"https://api.github.com/repos/openshift/origin/forks","keys_url":"https://api.github.com/repos/openshift/origin/keys{/key_id}","collaborators_url":"https://api.github.com/repos/openshift/origin/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/openshift/origin/teams","hooks_url":"https://api.github.com/repos/openshift/origin/hooks","issue_events_url":"https://api.github.com/repos/openshift/origin/issues/events{/number}","events_url":"https://api.github.com/repos/openshift/origin/events","assignees_url":"https://api.github.com/repos/openshift/origin/assignees{/user}","branches_url":"https://api.github.com/repos/openshift/origin/branches{/branch}","tags_url":"https://api.github.com/repos/openshift/origin/tags","blobs_url":"https://api.github.com/repos/openshift/origin/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/openshift/origin/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/openshift/origin/git/refs{/sha}","trees_url":"https://api.github.com/repos/openshift/origin/git/trees{/sha}","statuses_url":"https://api.github.com/repos/openshift/origin/statuses/{sha}","languages_url":"https://api.github.com/repos/openshift/origin/languages","stargazers_url":"https://api.github.com/repos/openshift/origin/stargazers","contributors_url":"https://api.github.com/repos/openshift/origin/contributors","subscribers_url":"https://api.github.com/repos/openshift/origin/subscribers","subscription_url":"https://api.github.com/repos/openshift/origin/subscription","commits_url":"https://api.github.com/repos/openshift/origin/commits{/sha}","git_commits_url":"https://api.github.com/repos/openshift/origin/git/commits{/sha}","comments_url":"https://api.github.com/repos/openshift/origin/comments{/number}","issue_comment_url":"https://api.github.com/repos/openshift/origin/issues/comments{/number}","contents_url":"https://api.github.com/repos/openshift/origin/contents/{+path}","compare_url":"https://api.github.com/repos/openshift/origin/compare/{base}...{head}","merges_url":"https://api.github.com/repos/openshift/origin/merges","archive_url":"https://api.github.com/repos/openshift/origin/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/openshift/origin/downloads","issues_url":"https://api.github.com/repos/openshift/origin/issues{/number}","pulls_url":"https://api.github.com/repos/openshift/origin/pulls{/number}","milestones_url":"https://api.github.com/repos/openshift/origin/milestones{/number}","notifications_url":"https://api.github.com/repos/openshift/origin/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/openshift/origin/labels{/name}","releases_url":"https://api.github.com/repos/openshift/origin/releases{/id}","deployments_url":"https://api.github.com/repos/openshift/origin/deployments","created_at":"2014-07-30T20:04:05Z","updated_at":"2016-02-26T15:20:56Z","pushed_at":"2016-02-26T18:59:59Z","git_url":"git://github.com/openshift/origin.git","ssh_url":"git@github.com:openshift/origin.git","clone_url":"https://github.com/openshift/origin.git","svn_url":"https://github.com/openshift/origin","homepage":"http://www.openshift.org","size":275592,"stargazers_count":1078,"watchers_count":1078,"language":"Go","has_issues":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":660,"mirror_url":null,"open_issues_count":871,"forks":660,"open_issues":871,"watchers":1078,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/openshift/origin/pulls/7351"},"html":{"href":"https://github.com/openshift/origin/pull/7351"},"issue":{"href":"https://api.github.com/repos/openshift/origin/issues/7351"},"comments":{"href":"https://api.github.com/repos/openshift/origin/issues/7351/comments"},"review_comments":{"href":"https://api.github.com/repos/openshift/origin/pulls/7351/comments"},"review_comment":{"href":"https://api.github.com/repos/openshift/origin/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/openshift/origin/pulls/7351/commits"},"statuses":{"href":"https://api.github.com/repos/openshift/origin/statuses/0b7e22fc97f3b064498b423c9bc3e1584850d130"}}}}