{"action":"created","comment":{"url":"https://api.github.com/repos/openshift/origin/pulls/comments/58588472","id":58588472,"diff_hunk":"@@ -123,14 +138,19 @@ func (xqa *xfsQuotaApplicator) Apply(dir string, medium api.StorageMedium, pod *\n \n func (xqa *xfsQuotaApplicator) applyQuota(volDevice string, quota resource.Quantity, fsGroupID int64) error {\n \t_, stderr, err := xqa.cmdRunner.RunApplyQuotaCommand(volDevice, quota, fsGroupID)\n-\tif err != nil {\n-\t\treturn err\n-\t}\n+\n \t// xfs_quota is very happy to fail but return a success code, likely due to its\n \t// interactive shell approach. Grab stderr, if we see anything written to it we'll\n \t// consider this an error.\n+\t//\n+\t// If we exit non-zero *and* write to stderr, stderr is likely to have the details on what\n+\t// actually went wrong, so we'll use this as the error message instead.\n \tif len(stderr) > 0 {\n-\t\treturn fmt.Errorf(\"xfs_quota wrote to stderr: %s\", stderr)\n+\t\treturn fmt.Errorf(\"error applying quota: %s\", stderr)\n+\t}\n+\n+\tif err != nil {","path":"pkg/volume/emptydir/quota.go","position":56,"original_position":56,"commit_id":"5f7eae93b50c666166259561f44676736bdc6a5f","original_commit_id":"5f7eae93b50c666166259561f44676736bdc6a5f","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":"err being checked first was what actually bit me when fixing this issue, you get a generic \"system exit 1\" error in the logs when your real info went to stderr and isn't visible.\r\n\r\nxfs_quota behaves a little weird, it's more of an interactive CLI shell but can also be called the way we do to one-shot things. During original development I saw return 0 at times even though the internal command you asked it to run failed in some situations. In these situations, as well as the one this PR fixed, the real info was on stderr. I'm not aware of any situation where err will contain anything other than system exit 1, so as far as I know we're better off with it in this order.","created_at":"2016-04-05T18:15:20Z","updated_at":"2016-04-05T18:15:20Z","html_url":"https://github.com/openshift/origin/pull/8178#discussion_r58588472","pull_request_url":"https://api.github.com/repos/openshift/origin/pulls/8178","_links":{"self":{"href":"https://api.github.com/repos/openshift/origin/pulls/comments/58588472"},"html":{"href":"https://github.com/openshift/origin/pull/8178#discussion_r58588472"},"pull_request":{"href":"https://api.github.com/repos/openshift/origin/pulls/8178"}}},"pull_request":{"url":"https://api.github.com/repos/openshift/origin/pulls/8178","id":63604642,"html_url":"https://github.com/openshift/origin/pull/8178","diff_url":"https://github.com/openshift/origin/pull/8178.diff","patch_url":"https://github.com/openshift/origin/pull/8178.patch","issue_url":"https://api.github.com/repos/openshift/origin/issues/8178","number":8178,"state":"open","locked":false,"title":"Error on node startup using fsGroup quota, but mounted without grpquota.","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":"Previously if you specify a perFSGroup quota, we check on node startup to\r\nensure that the volume directory is on an XFS filesystem. However we do not\r\ncheck that that filesystem has been mounted with the grpquota option. As a\r\nresult when the node goes to create an emptyDir volume, it will fail with a\r\ncryptic error \"system exit 1\" and be unable to mount the volume.\r\n\r\nModified to check mount options on node startup, and error out if you're trying\r\nto use a perFSGroup quota on XFS, but are mounted without grpquota.\r\n\r\nAdditionally modified the xfs_quota calls to report stderr as the error message\r\nwhenever possible, rather than the cryptic system exit message previously.","created_at":"2016-03-21T17:49:54Z","updated_at":"2016-04-05T18:15:20Z","closed_at":null,"merged_at":null,"merge_commit_sha":"befcfe96caad5a28dee0a3eeb07745552fe53b13","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/openshift/origin/pulls/8178/commits","review_comments_url":"https://api.github.com/repos/openshift/origin/pulls/8178/comments","review_comment_url":"https://api.github.com/repos/openshift/origin/pulls/comments{/number}","comments_url":"https://api.github.com/repos/openshift/origin/issues/8178/comments","statuses_url":"https://api.github.com/repos/openshift/origin/statuses/5f7eae93b50c666166259561f44676736bdc6a5f","head":{"label":"dgoodwin:xfs-noquota-errors","ref":"xfs-noquota-errors","sha":"5f7eae93b50c666166259561f44676736bdc6a5f","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-04-05T17:40:48Z","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":233438,"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":"e56dfcb77b1f1fc8aa75dbdfe0fceec1c3f884bc","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":"The Continuous Application Platform - build, deploy, and manage cloud-native and legacy applications on Kubernetes and Docker","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-04-05T15:47:12Z","pushed_at":"2016-04-05T17:40:49Z","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":310012,"stargazers_count":1188,"watchers_count":1188,"language":"Go","has_issues":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":728,"mirror_url":null,"open_issues_count":948,"forks":728,"open_issues":948,"watchers":1188,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/openshift/origin/pulls/8178"},"html":{"href":"https://github.com/openshift/origin/pull/8178"},"issue":{"href":"https://api.github.com/repos/openshift/origin/issues/8178"},"comments":{"href":"https://api.github.com/repos/openshift/origin/issues/8178/comments"},"review_comments":{"href":"https://api.github.com/repos/openshift/origin/pulls/8178/comments"},"review_comment":{"href":"https://api.github.com/repos/openshift/origin/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/openshift/origin/pulls/8178/commits"},"statuses":{"href":"https://api.github.com/repos/openshift/origin/statuses/5f7eae93b50c666166259561f44676736bdc6a5f"}}}}