payload: {"action":"created","comment":{"url":"https://api.github.com/repos/rook/rook/pulls/comments/358668044","pull_request_review_id":333114729,"id":358668044,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDM1ODY2ODA0NA==","diff_hunk":"@@ -19,15 +19,34 @@ package client\n import (\n \t\"fmt\"\n \t\"strings\"\n+\t\"time\"\n \n \t\"github.com/pkg/errors\"\n \t\"github.com/rook/rook/pkg/clusterd\"\n \tcephver \"github.com/rook/rook/pkg/operator/ceph/version\"\n )\n \n+var (\n+\tmoduleEnableWaitTime = 5 * time.Second\n+)\n+\n // MgrEnableModule enables a mgr module\n func MgrEnableModule(context *clusterd.Context, clusterName, name string, force bool) error {\n-\treturn enableModule(context, clusterName, name, force, \"enable\")\n+\tretryCount := 5\n+\tfor i := 0; i < retryCount; i++ {\n+\t\terr := enableModule(context, clusterName, name, force, \"enable\")\n+\t\tif err != nil {\n+\t\t\tif i < retryCount-1 {\n+\t\t\t\tlogger.Infof(\"failed to enable mgr module %q. trying again...\", name)\n+\t\t\t\ttime.Sleep(moduleEnableWaitTime)\n+\t\t\t\tcontinue\n+\t\t\t} else {\n+\t\t\t\treturn err","path":"pkg/daemon/ceph/client/mgr.go","position":27,"original_position":27,"commit_id":"5c242fae0bcd668c1b63e4134d232d18f131e560","original_commit_id":"5c242fae0bcd668c1b63e4134d232d18f131e560","user":{"login":"leseb","id":912735,"node_id":"MDQ6VXNlcjkxMjczNQ==","avatar_url":"https://avatars3.githubusercontent.com/u/912735?v=4","gravatar_id":"","url":"https://api.github.com/users/leseb","html_url":"https://github.com/leseb","followers_url":"https://api.github.com/users/leseb/followers","following_url":"https://api.github.com/users/leseb/following{/other_user}","gists_url":"https://api.github.com/users/leseb/gists{/gist_id}","starred_url":"https://api.github.com/users/leseb/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/leseb/subscriptions","organizations_url":"https://api.github.com/users/leseb/orgs","repos_url":"https://api.github.com/users/leseb/repos","events_url":"https://api.github.com/users/leseb/events{/privacy}","received_events_url":"https://api.github.com/users/leseb/received_events","type":"User","site_admin":false},"body":"Always name your errors.","created_at":"2019-12-17T08:57:07Z","updated_at":"2019-12-17T08:57:08Z","html_url":"https://github.com/rook/rook/pull/4512#discussion_r358668044","pull_request_url":"https://api.github.com/repos/rook/rook/pulls/4512","author_association":"MEMBER","_links":{"self":{"href":"https://api.github.com/repos/rook/rook/pulls/comments/358668044"},"html":{"href":"https://github.com/rook/rook/pull/4512#discussion_r358668044"},"pull_request":{"href":"https://api.github.com/repos/rook/rook/pulls/4512"}}},"pull_request":{"url":"https://api.github.com/repos/rook/rook/pulls/4512","id":353526861,"node_id":"MDExOlB1bGxSZXF1ZXN0MzUzNTI2ODYx","html_url":"https://github.com/rook/rook/pull/4512","diff_url":"https://github.com/rook/rook/pull/4512.diff","patch_url":"https://github.com/rook/rook/pull/4512.patch","issue_url":"https://api.github.com/repos/rook/rook/issues/4512","number":4512,"state":"open","locked":false,"title":"ceph: add retry while enabling mgr modules","user":{"login":"sp98","id":9363998,"node_id":"MDQ6VXNlcjkzNjM5OTg=","avatar_url":"https://avatars2.githubusercontent.com/u/9363998?v=4","gravatar_id":"","url":"https://api.github.com/users/sp98","html_url":"https://github.com/sp98","followers_url":"https://api.github.com/users/sp98/followers","following_url":"https://api.github.com/users/sp98/following{/other_user}","gists_url":"https://api.github.com/users/sp98/gists{/gist_id}","starred_url":"https://api.github.com/users/sp98/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sp98/subscriptions","organizations_url":"https://api.github.com/users/sp98/orgs","repos_url":"https://api.github.com/users/sp98/repos","events_url":"https://api.github.com/users/sp98/events{/privacy}","received_events_url":"https://api.github.com/users/sp98/received_events","type":"User","site_admin":false},"body":"Enabling pg_autoscalar module fails most probably becasue `ceph mgr module enable <>` is happening very quickly after ceph mgr starts.\r\nThis PR adds a retry (5 times) with a sleep interval of 5 seconds (for each interval) to handle failure while enabling mgr modules.\r\n\r\nSigned-off-by: Santosh Pillai <sapillai@redhat.com>\r\n\r\n<!-- Please take a look at our [Contributing](https://rook.io/docs/rook/master/development-flow.html)\r\ndocumentation before submitting a Pull Request!\r\nThank you for contributing to Rook! -->\r\n\r\n**Description of your changes:**\r\n- Add a retry (5 times) when trying to enable mgr modules. \r\n- Add a wait for 5 seconds for reach retry iteration. \r\n\r\n**Which issue is resolved by this Pull Request:**\r\nResolves #4497\r\n\r\n**Checklist:**\r\n\r\n- [ ] Reviewed the developer guide on [Submitting a Pull Request](https://rook.io/docs/rook/master/development-flow.html#submitting-a-pull-request)\r\n- [ ] Documentation has been updated, if necessary.\r\n- [ ] Unit tests have been added, if necessary.\r\n- [ ] Integration tests have been added, if necessary.\r\n- [ ] Pending release notes updated with breaking and/or notable changes, if necessary.\r\n- [ ] Upgrade from previous release is tested and upgrade user guide is updated, if necessary.\r\n- [ ] Code generation (`make codegen`) has been run to update object specifications, if necessary.\r\n- [ ] Comments have been added or updated based on the standards set in [CONTRIBUTING.md](https://github.com/rook/rook/blob/master/CONTRIBUTING.md#comments)\r\n- [ ] Add the flag for skipping the CI if this PR does not require a build. See [here](https://github.com/rook/rook/blob/master/INSTALL.md#skip-ci) for more details.\r\n\r\n[test ceph]","created_at":"2019-12-16T12:03:02Z","updated_at":"2019-12-17T08:57:07Z","closed_at":null,"merged_at":null,"merge_commit_sha":"25a9db1a3e36687d38d733261e416238839afc1c","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[{"id":479456042,"node_id":"MDU6TGFiZWw0Nzk0NTYwNDI=","url":"https://api.github.com/repos/rook/rook/labels/ceph%20-","name":"ceph -","color":"ef5c55","default":false,"description":"main ceph tag"},{"id":1537289955,"node_id":"MDU6TGFiZWwxNTM3Mjg5OTU1","url":"https://api.github.com/repos/rook/rook/labels/ceph-mgr","name":"ceph-mgr","color":"ad0036","default":false,"description":"Relating to the Ceph mgr or mgr modules"}],"milestone":null,"commits_url":"https://api.github.com/repos/rook/rook/pulls/4512/commits","review_comments_url":"https://api.github.com/repos/rook/rook/pulls/4512/comments","review_comment_url":"https://api.github.com/repos/rook/rook/pulls/comments{/number}","comments_url":"https://api.github.com/repos/rook/rook/issues/4512/comments","statuses_url":"https://api.github.com/repos/rook/rook/statuses/5c242fae0bcd668c1b63e4134d232d18f131e560","head":{"label":"sp98:fix-pg-autoscaler","ref":"fix-pg-autoscaler","sha":"5c242fae0bcd668c1b63e4134d232d18f131e560","user":{"login":"sp98","id":9363998,"node_id":"MDQ6VXNlcjkzNjM5OTg=","avatar_url":"https://avatars2.githubusercontent.com/u/9363998?v=4","gravatar_id":"","url":"https://api.github.com/users/sp98","html_url":"https://github.com/sp98","followers_url":"https://api.github.com/users/sp98/followers","following_url":"https://api.github.com/users/sp98/following{/other_user}","gists_url":"https://api.github.com/users/sp98/gists{/gist_id}","starred_url":"https://api.github.com/users/sp98/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sp98/subscriptions","organizations_url":"https://api.github.com/users/sp98/orgs","repos_url":"https://api.github.com/users/sp98/repos","events_url":"https://api.github.com/users/sp98/events{/privacy}","received_events_url":"https://api.github.com/users/sp98/received_events","type":"User","site_admin":false},"repo":{"id":174461757,"node_id":"MDEwOlJlcG9zaXRvcnkxNzQ0NjE3NTc=","name":"rook","full_name":"sp98/rook","private":false,"owner":{"login":"sp98","id":9363998,"node_id":"MDQ6VXNlcjkzNjM5OTg=","avatar_url":"https://avatars2.githubusercontent.com/u/9363998?v=4","gravatar_id":"","url":"https://api.github.com/users/sp98","html_url":"https://github.com/sp98","followers_url":"https://api.github.com/users/sp98/followers","following_url":"https://api.github.com/users/sp98/following{/other_user}","gists_url":"https://api.github.com/users/sp98/gists{/gist_id}","starred_url":"https://api.github.com/users/sp98/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sp98/subscriptions","organizations_url":"https://api.github.com/users/sp98/orgs","repos_url":"https://api.github.com/users/sp98/repos","events_url":"https://api.github.com/users/sp98/events{/privacy}","received_events_url":"https://api.github.com/users/sp98/received_events","type":"User","site_admin":false},"html_url":"https://github.com/sp98/rook","description":"Storage Orchestration for Kubernetes","fork":true,"url":"https://api.github.com/repos/sp98/rook","forks_url":"https://api.github.com/repos/sp98/rook/forks","keys_url":"https://api.github.com/repos/sp98/rook/keys{/key_id}","collaborators_url":"https://api.github.com/repos/sp98/rook/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/sp98/rook/teams","hooks_url":"https://api.github.com/repos/sp98/rook/hooks","issue_events_url":"https://api.github.com/repos/sp98/rook/issues/events{/number}","events_url":"https://api.github.com/repos/sp98/rook/events","assignees_url":"https://api.github.com/repos/sp98/rook/assignees{/user}","branches_url":"https://api.github.com/repos/sp98/rook/branches{/branch}","tags_url":"https://api.github.com/repos/sp98/rook/tags","blobs_url":"https://api.github.com/repos/sp98/rook/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/sp98/rook/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/sp98/rook/git/refs{/sha}","trees_url":"https://api.github.com/repos/sp98/rook/git/trees{/sha}","statuses_url":"https://api.github.com/repos/sp98/rook/statuses/{sha}","languages_url":"https://api.github.com/repos/sp98/rook/languages","stargazers_url":"https://api.github.com/repos/sp98/rook/stargazers","contributors_url":"https://api.github.com/repos/sp98/rook/contributors","subscribers_url":"https://api.github.com/repos/sp98/rook/subscribers","subscription_url":"https://api.github.com/repos/sp98/rook/subscription","commits_url":"https://api.github.com/repos/sp98/rook/commits{/sha}","git_commits_url":"https://api.github.com/repos/sp98/rook/git/commits{/sha}","comments_url":"https://api.github.com/repos/sp98/rook/comments{/number}","issue_comment_url":"https://api.github.com/repos/sp98/rook/issues/comments{/number}","contents_url":"https://api.github.com/repos/sp98/rook/contents/{+path}","compare_url":"https://api.github.com/repos/sp98/rook/compare/{base}...{head}","merges_url":"https://api.github.com/repos/sp98/rook/merges","archive_url":"https://api.github.com/repos/sp98/rook/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/sp98/rook/downloads","issues_url":"https://api.github.com/repos/sp98/rook/issues{/number}","pulls_url":"https://api.github.com/repos/sp98/rook/pulls{/number}","milestones_url":"https://api.github.com/repos/sp98/rook/milestones{/number}","notifications_url":"https://api.github.com/repos/sp98/rook/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/sp98/rook/labels{/name}","releases_url":"https://api.github.com/repos/sp98/rook/releases{/id}","deployments_url":"https://api.github.com/repos/sp98/rook/deployments","created_at":"2019-03-08T03:21:25Z","updated_at":"2019-12-13T08:23:18Z","pushed_at":"2019-12-17T08:55:00Z","git_url":"git://github.com/sp98/rook.git","ssh_url":"git@github.com:sp98/rook.git","clone_url":"https://github.com/sp98/rook.git","svn_url":"https://github.com/sp98/rook","homepage":"https://rook.io","size":13874,"stargazers_count":0,"watchers_count":0,"language":"Go","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"disabled":false,"open_issues_count":0,"license":{"key":"apache-2.0","name":"Apache License 2.0","spdx_id":"Apache-2.0","url":"https://api.github.com/licenses/apache-2.0","node_id":"MDc6TGljZW5zZTI="},"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"rook:master","ref":"master","sha":"29e5fae591d56d867ee93ce5001a22d1de9f732a","user":{"login":"rook","id":22860722,"node_id":"MDEyOk9yZ2FuaXphdGlvbjIyODYwNzIy","avatar_url":"https://avatars1.githubusercontent.com/u/22860722?v=4","gravatar_id":"","url":"https://api.github.com/users/rook","html_url":"https://github.com/rook","followers_url":"https://api.github.com/users/rook/followers","following_url":"https://api.github.com/users/rook/following{/other_user}","gists_url":"https://api.github.com/users/rook/gists{/gist_id}","starred_url":"https://api.github.com/users/rook/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rook/subscriptions","organizations_url":"https://api.github.com/users/rook/orgs","repos_url":"https://api.github.com/users/rook/repos","events_url":"https://api.github.com/users/rook/events{/privacy}","received_events_url":"https://api.github.com/users/rook/received_events","type":"Organization","site_admin":false},"repo":{"id":62921553,"node_id":"MDEwOlJlcG9zaXRvcnk2MjkyMTU1Mw==","name":"rook","full_name":"rook/rook","private":false,"owner":{"login":"rook","id":22860722,"node_id":"MDEyOk9yZ2FuaXphdGlvbjIyODYwNzIy","avatar_url":"https://avatars1.githubusercontent.com/u/22860722?v=4","gravatar_id":"","url":"https://api.github.com/users/rook","html_url":"https://github.com/rook","followers_url":"https://api.github.com/users/rook/followers","following_url":"https://api.github.com/users/rook/following{/other_user}","gists_url":"https://api.github.com/users/rook/gists{/gist_id}","starred_url":"https://api.github.com/users/rook/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rook/subscriptions","organizations_url":"https://api.github.com/users/rook/orgs","repos_url":"https://api.github.com/users/rook/repos","events_url":"https://api.github.com/users/rook/events{/privacy}","received_events_url":"https://api.github.com/users/rook/received_events","type":"Organization","site_admin":false},"html_url":"https://github.com/rook/rook","description":"Storage Orchestration for Kubernetes","fork":false,"url":"https://api.github.com/repos/rook/rook","forks_url":"https://api.github.com/repos/rook/rook/forks","keys_url":"https://api.github.com/repos/rook/rook/keys{/key_id}","collaborators_url":"https://api.github.com/repos/rook/rook/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/rook/rook/teams","hooks_url":"https://api.github.com/repos/rook/rook/hooks","issue_events_url":"https://api.github.com/repos/rook/rook/issues/events{/number}","events_url":"https://api.github.com/repos/rook/rook/events","assignees_url":"https://api.github.com/repos/rook/rook/assignees{/user}","branches_url":"https://api.github.com/repos/rook/rook/branches{/branch}","tags_url":"https://api.github.com/repos/rook/rook/tags","blobs_url":"https://api.github.com/repos/rook/rook/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/rook/rook/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/rook/rook/git/refs{/sha}","trees_url":"https://api.github.com/repos/rook/rook/git/trees{/sha}","statuses_url":"https://api.github.com/repos/rook/rook/statuses/{sha}","languages_url":"https://api.github.com/repos/rook/rook/languages","stargazers_url":"https://api.github.com/repos/rook/rook/stargazers","contributors_url":"https://api.github.com/repos/rook/rook/contributors","subscribers_url":"https://api.github.com/repos/rook/rook/subscribers","subscription_url":"https://api.github.com/repos/rook/rook/subscription","commits_url":"https://api.github.com/repos/rook/rook/commits{/sha}","git_commits_url":"https://api.github.com/repos/rook/rook/git/commits{/sha}","comments_url":"https://api.github.com/repos/rook/rook/comments{/number}","issue_comment_url":"https://api.github.com/repos/rook/rook/issues/comments{/number}","contents_url":"https://api.github.com/repos/rook/rook/contents/{+path}","compare_url":"https://api.github.com/repos/rook/rook/compare/{base}...{head}","merges_url":"https://api.github.com/repos/rook/rook/merges","archive_url":"https://api.github.com/repos/rook/rook/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/rook/rook/downloads","issues_url":"https://api.github.com/repos/rook/rook/issues{/number}","pulls_url":"https://api.github.com/repos/rook/rook/pulls{/number}","milestones_url":"https://api.github.com/repos/rook/rook/milestones{/number}","notifications_url":"https://api.github.com/repos/rook/rook/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/rook/rook/labels{/name}","releases_url":"https://api.github.com/repos/rook/rook/releases{/id}","deployments_url":"https://api.github.com/repos/rook/rook/deployments","created_at":"2016-07-08T22:45:05Z","updated_at":"2019-12-17T08:50:32Z","pushed_at":"2019-12-17T08:55:01Z","git_url":"git://github.com/rook/rook.git","ssh_url":"git@github.com:rook/rook.git","clone_url":"https://github.com/rook/rook.git","svn_url":"https://github.com/rook/rook","homepage":"https://rook.io","size":14523,"stargazers_count":6536,"watchers_count":6536,"language":"Go","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":1224,"mirror_url":null,"archived":false,"disabled":false,"open_issues_count":280,"license":{"key":"apache-2.0","name":"Apache License 2.0","spdx_id":"Apache-2.0","url":"https://api.github.com/licenses/apache-2.0","node_id":"MDc6TGljZW5zZTI="},"forks":1224,"open_issues":280,"watchers":6536,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/rook/rook/pulls/4512"},"html":{"href":"https://github.com/rook/rook/pull/4512"},"issue":{"href":"https://api.github.com/repos/rook/rook/issues/4512"},"comments":{"href":"https://api.github.com/repos/rook/rook/issues/4512/comments"},"review_comments":{"href":"https://api.github.com/repos/rook/rook/pulls/4512/comments"},"review_comment":{"href":"https://api.github.com/repos/rook/rook/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/rook/rook/pulls/4512/commits"},"statuses":{"href":"https://api.github.com/repos/rook/rook/statuses/5c242fae0bcd668c1b63e4134d232d18f131e560"}},"author_association":"CONTRIBUTOR"}}
other: {"actor":{"display_login":"leseb"}}