{"action":"created","issue":{"url":"https://api.github.com/repos/helm/charts/issues/8115","repository_url":"https://api.github.com/repos/helm/charts","labels_url":"https://api.github.com/repos/helm/charts/issues/8115/labels{/name}","comments_url":"https://api.github.com/repos/helm/charts/issues/8115/comments","events_url":"https://api.github.com/repos/helm/charts/issues/8115/events","html_url":"https://github.com/helm/charts/pull/8115","id":366003818,"node_id":"MDExOlB1bGxSZXF1ZXN0MjE5Nzg1OTg1","number":8115,"title":"[stable/mongodb-replicaset] Fix various bootstrap issues","user":{"login":"steven-sheehy","id":17552371,"node_id":"MDQ6VXNlcjE3NTUyMzcx","avatar_url":"https://avatars3.githubusercontent.com/u/17552371?v=4","gravatar_id":"","url":"https://api.github.com/users/steven-sheehy","html_url":"https://github.com/steven-sheehy","followers_url":"https://api.github.com/users/steven-sheehy/followers","following_url":"https://api.github.com/users/steven-sheehy/following{/other_user}","gists_url":"https://api.github.com/users/steven-sheehy/gists{/gist_id}","starred_url":"https://api.github.com/users/steven-sheehy/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/steven-sheehy/subscriptions","organizations_url":"https://api.github.com/users/steven-sheehy/orgs","repos_url":"https://api.github.com/users/steven-sheehy/repos","events_url":"https://api.github.com/users/steven-sheehy/events{/privacy}","received_events_url":"https://api.github.com/users/steven-sheehy/received_events","type":"User","site_admin":false},"labels":[{"id":1037076588,"node_id":"MDU6TGFiZWwxMDM3MDc2NTg4","url":"https://api.github.com/repos/helm/charts/labels/Contribution%20Allowed","name":"Contribution Allowed","color":"3df47d","default":false},{"id":352669720,"node_id":"MDU6TGFiZWwzNTI2Njk3MjA=","url":"https://api.github.com/repos/helm/charts/labels/lgtm","name":"lgtm","color":"15dd18","default":false}],"state":"open","locked":false,"assignee":{"login":"unguiculus","id":925412,"node_id":"MDQ6VXNlcjkyNTQxMg==","avatar_url":"https://avatars1.githubusercontent.com/u/925412?v=4","gravatar_id":"","url":"https://api.github.com/users/unguiculus","html_url":"https://github.com/unguiculus","followers_url":"https://api.github.com/users/unguiculus/followers","following_url":"https://api.github.com/users/unguiculus/following{/other_user}","gists_url":"https://api.github.com/users/unguiculus/gists{/gist_id}","starred_url":"https://api.github.com/users/unguiculus/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/unguiculus/subscriptions","organizations_url":"https://api.github.com/users/unguiculus/orgs","repos_url":"https://api.github.com/users/unguiculus/repos","events_url":"https://api.github.com/users/unguiculus/events{/privacy}","received_events_url":"https://api.github.com/users/unguiculus/received_events","type":"User","site_admin":false},"assignees":[{"login":"unguiculus","id":925412,"node_id":"MDQ6VXNlcjkyNTQxMg==","avatar_url":"https://avatars1.githubusercontent.com/u/925412?v=4","gravatar_id":"","url":"https://api.github.com/users/unguiculus","html_url":"https://github.com/unguiculus","followers_url":"https://api.github.com/users/unguiculus/followers","following_url":"https://api.github.com/users/unguiculus/following{/other_user}","gists_url":"https://api.github.com/users/unguiculus/gists{/gist_id}","starred_url":"https://api.github.com/users/unguiculus/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/unguiculus/subscriptions","organizations_url":"https://api.github.com/users/unguiculus/orgs","repos_url":"https://api.github.com/users/unguiculus/repos","events_url":"https://api.github.com/users/unguiculus/events{/privacy}","received_events_url":"https://api.github.com/users/unguiculus/received_events","type":"User","site_admin":false}],"milestone":null,"comments":7,"created_at":"2018-10-02T17:34:50Z","updated_at":"2018-10-10T19:05:33Z","closed_at":null,"author_association":"CONTRIBUTOR","pull_request":{"url":"https://api.github.com/repos/helm/charts/pulls/8115","html_url":"https://github.com/helm/charts/pull/8115","diff_url":"https://github.com/helm/charts/pull/8115.diff","patch_url":"https://github.com/helm/charts/pull/8115.patch"},"body":"#### What this PR does / why we need it:\r\n- Fix enabling metrics breaks upgrade for single replica (#8055)\r\n  - Separate the find primary logic from the rs.add()/rs.initate() logic\r\n  - Also change primary searching to include local mongo to handle single replica scenario\r\n- Fix bootstrap pod never completes when mongod crashes (#7996)\r\n  - We now store mongod pid and verify it is still running\r\n- Fix bootstrap init container does not show logs (#7354)\r\n  - peer-finder still does not return stdout, but it does return stderr so 1>&2\r\n  - Logs don't show up until peer-finder exits unfortunately, so still append to /work-dir/log.txt as well to debug while running\r\n- Fix bootstrap never completes when script crashes and doesn't shutdown mongod\r\n  - One example of this is if create admin user fails then db.shutdownServer() won't have credentials to succeed\r\n  - We now `set -e pipefail` to catch errors better and `trap shutdown_mongo EXIT` to ensure it always runs\r\n  - Finally we `kill -TERM` mongod if all else fails\r\n- Workaround other bootstrap hanging indefinitely issues (#6522, #7417)\r\n  - There are numerous other ways that can cause the script to hang, so we need a general solution for retries\r\n  - Set a max timeout of 5 minutes to retry mongo commands before exiting and let Kubernetes restart pod\r\n- Refactor script to not duplicate user creation and retry until logic\r\n- Automatically restart pods when configuration changes during upgrade\r\n- Adds missing `metrics.resources` to README\r\n- Moves probe documentation from separate section in README to values table\r\n\r\n#### Which issue this PR fixes\r\n- fixes #8055\r\n- fixes #7996\r\n- fixes #7354\r\n\r\n#### Special notes for your reviewer:\r\nThese are the test cases I have manually tested:\r\n- Single replica install with metrics\r\n- Single replica install without metrics\r\n- Single replica upgrade with metrics\r\n- Three replica install without metrics\r\n- Three replica upgrade with metrics\r\n- Mongod crashing during bootstrap\r\n- Bootstrap exceeds timeout\r\n\r\nThe commands I used to test, with the replicas and metrics.enabled varying per test case.\r\n```shell\r\nhelm install --name mongo --set replicas=1 --set auth.enabled=true --set auth.adminUser=mongo --set auth.adminPassword=password --set auth.key=foobar stable/mongodb-replicaset\r\nhelm upgrade mongo --reuse-values --set metrics.enabled=true --set auth.metricsUser=metrics --set auth.metricsPassword=password stable/mongodb-replicaset\r\n```\r\n#### Checklist\r\n- [x] [DCO](https://www.helm.sh/blog/helm-dco/index.html) signed\r\n- [x] Chart Version bumped\r\n- [x] Variables are documented in the README.md\r\n"},"comment":{"url":"https://api.github.com/repos/helm/charts/issues/comments/428693872","html_url":"https://github.com/helm/charts/pull/8115#issuecomment-428693872","issue_url":"https://api.github.com/repos/helm/charts/issues/8115","id":428693872,"node_id":"MDEyOklzc3VlQ29tbWVudDQyODY5Mzg3Mg==","user":{"login":"k8s-ci-robot","id":20407524,"node_id":"MDQ6VXNlcjIwNDA3NTI0","avatar_url":"https://avatars0.githubusercontent.com/u/20407524?v=4","gravatar_id":"","url":"https://api.github.com/users/k8s-ci-robot","html_url":"https://github.com/k8s-ci-robot","followers_url":"https://api.github.com/users/k8s-ci-robot/followers","following_url":"https://api.github.com/users/k8s-ci-robot/following{/other_user}","gists_url":"https://api.github.com/users/k8s-ci-robot/gists{/gist_id}","starred_url":"https://api.github.com/users/k8s-ci-robot/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/k8s-ci-robot/subscriptions","organizations_url":"https://api.github.com/users/k8s-ci-robot/orgs","repos_url":"https://api.github.com/users/k8s-ci-robot/repos","events_url":"https://api.github.com/users/k8s-ci-robot/events{/privacy}","received_events_url":"https://api.github.com/users/k8s-ci-robot/received_events","type":"User","site_admin":false},"created_at":"2018-10-10T19:05:33Z","updated_at":"2018-10-10T19:05:33Z","author_association":"CONTRIBUTOR","body":"[APPROVALNOTIFIER] This PR is **APPROVED**\n\nThis pull-request has been approved by: *<a href=\"https://github.com/helm/charts/pull/8115#\" title=\"Author self-approved\">steven-sheehy</a>*, *<a href=\"https://github.com/helm/charts/pull/8115#issuecomment-428693860\" title=\"LGTM\">unguiculus</a>*\n\nThe full list of commands accepted by this bot can be found [here](https://go.k8s.io/bot-commands).\n\nThe pull request process is described [here](https://git.k8s.io/community/contributors/guide/owners.md#the-code-review-process)\n\n<details >\nNeeds approval from an approver in each of these files:\n\n- ~~[stable/mongodb-replicaset/OWNERS](https://github.com/helm/charts/blob/master/stable/mongodb-replicaset/OWNERS)~~ [unguiculus]\n\nApprovers can indicate their approval by writing `/approve` in a comment\nApprovers can cancel approval by writing `/approve cancel` in a comment\n</details>\n<!-- META={\"approvers\":[]} -->"}}
{"actor":{"display_login":"k8s-ci-robot"}}