Skip to content
This repository has been archived by the owner on Feb 22, 2022. It is now read-only.

[stable/mongodb-replicaset] fix: mongo init issues #7772

Merged
merged 1 commit into from
Sep 19, 2018

Conversation

ssalaues
Copy link
Collaborator

@ssalaues ssalaues commented Sep 17, 2018

What this PR does / why we need it:
Fixes init issues that cause the init container to wait indefinitely. From testing, this seems to occur because the init container has launched a mongod process that is now handling requests being made to the service and returns a Quorum check failed when the init script attempts to rs.add (which does not get handled properly).

This PR adds a simple check to handle the quorum check failure and exit when it occurs. This allows the init container to try again and successfully join the replicaset.

Which issue this PR fixes (optional, in fixes #<issue number>(, fixes #<issue_number>, ...) format, will close that issue when PR gets merged): fixes #6522

Special notes for your reviewer:

@ey-bot ey-bot added the Contribution Allowed If the contributor has signed the DCO or the CNCF CLA (prior to the move to a DCO). label Sep 17, 2018
@k8s-ci-robot k8s-ci-robot added the needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. label Sep 17, 2018
This fixes issues where the init container will stay up indefinitely because the running 'mongod' process cannot join the replicaset

Signed-off-by: Salim <[email protected]>
@ey-bot ey-bot added the Contribution Allowed If the contributor has signed the DCO or the CNCF CLA (prior to the move to a DCO). label Sep 17, 2018
@ssalaues
Copy link
Collaborator Author

/assign @unguiculus

@unguiculus
Copy link
Member

/ok-to-test

@k8s-ci-robot k8s-ci-robot removed the needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. label Sep 19, 2018
@ssalaues
Copy link
Collaborator Author

Updated the list of issues this fixes. There were two similar issues but the one I removed turned out to be an issue with x509 auth.

@unguiculus
Copy link
Member

/lgtm

@k8s-ci-robot k8s-ci-robot added the lgtm Indicates that a PR is ready to be merged. label Sep 19, 2018
@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: ssalaues, unguiculus

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@k8s-ci-robot k8s-ci-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Sep 19, 2018
@k8s-ci-robot k8s-ci-robot merged commit 45a5704 into helm:master Sep 19, 2018
@ssalaues ssalaues deleted the stuck-init branch September 19, 2018 19:46
legal90 added a commit to volvo-cars/helm-charts that referenced this pull request Sep 21, 2018
* superset-annotations: (27 commits)
  [stable/superset] Bump version to 0.1.3
  [stable/superset] Add service annotations support
  [stable/drupal] Fix chart not being upgradable (helm#7825)
  [stable/parse] Fix chart not being upgradable (helm#7824)
  [stable/jasperreports] Fix chart not being upgradable (helm#7818)
  [stable/osclass] Fix chart not being upgradable (helm#7817)
  [stable/phpbb] Fix chart not being upgradable (helm#7820)
  [stable/ghost] Fix chart not being upgradable (helm#7814)
  [stable/suitecrm] Fix chart not being upgradable (helm#7816)
  [stable/phpmyadmin] Fix chart not being upgradable (helm#7830)
  [stable/magento] Release 2.0.6 (helm#7810)
  [stable/wordpress] Fix chart not being upgradable (helm#7831)
  [stable/mongodb] Use .Values.existingSecret for standalone deployments (helm#7839)
  [incubator/kafka]: add reassignPartitions to topic configuration (helm#7623)
  Changed syntax error in custom-metrics-apiserver-service and secret (label to labels) (helm#7295)
  [stable/spinnaker] Changing email of dwardu89 (helm#7838)
  fix: mongo init issues (helm#7772)
  [stable/mattemost-team-edition] Add initial charts for Mattermost Team Edition (helm#5987)
  Fixed TLS Ingress, updated mongo dep requirements and app to latest version (helm#7636)
  Adding dwardu89 to owners and chart maintainers of stable/spinnaker (helm#7751)
  ...
jicowan pushed a commit to jicowan/charts that referenced this pull request Oct 2, 2018
This fixes issues where the init container will stay up indefinitely because the running 'mongod' process cannot join the replicaset

Signed-off-by: Salim <[email protected]>
Signed-off-by: jenkin-x <[email protected]>
Jnig pushed a commit to Jnig/charts that referenced this pull request Nov 13, 2018
This fixes issues where the init container will stay up indefinitely because the running 'mongod' process cannot join the replicaset

Signed-off-by: Salim <[email protected]>
Signed-off-by: Jakob Niggel <[email protected]>
wgiddens pushed a commit to wgiddens/charts that referenced this pull request Jan 18, 2019
This fixes issues where the init container will stay up indefinitely because the running 'mongod' process cannot join the replicaset

Signed-off-by: Salim <[email protected]>
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. Contribution Allowed If the contributor has signed the DCO or the CNCF CLA (prior to the move to a DCO). lgtm Indicates that a PR is ready to be merged.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[stable/mongodb-replicaset] Pod stuck at bootstrap/peer-finder when replicas=1
4 participants