-
Notifications
You must be signed in to change notification settings - Fork 9.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
arbiter not getting added to replicaset and and arbiter pod restart at first #29393
Comments
Thank you for bringing this issue to our attention. We appreciate your involvement! If you're interested in contributing a solution, we welcome you to create a pull request. The Bitnami team is excited to review your submission and offer feedback. You can find the contributing guidelines here. Your contribution will greatly benefit the community. Feel free to reach out if you have any questions or need assistance. |
following change would help fixing this issue, I appreciate if maintainers can review this change in _helpers.tpl {{/*
Get initial primary host to configure MongoDB cluster.
*/}}
{{- define "mongodb.initialPrimaryHost" -}}
{{- if contains "arbiter" (include "mongodb.fullname" .) -}}
{{/* Use the service name of the first pod in the MongoDB StatefulSet when this is the arbiter */}}
{{ ternary
( printf "%s-0.%s-headless.$(MY_POD_NAMESPACE).svc.%s"
(include "mongodb.fullname" . | replace "arbiter" "")
(include "mongodb.fullname" . | replace "arbiter" "")
.Values.clusterDomain )
( first .Values.externalAccess.service.publicNames )
( empty .Values.externalAccess.service.publicNames )
}}
{{- else -}}
{{/* Use the standard service name for MongoDB secondaries or primary */}}
{{ ternary
( printf "%s-0.$(K8S_SERVICE_NAME).$(MY_POD_NAMESPACE).svc.%s"
(include "mongodb.fullname" .)
.Values.clusterDomain )
( first .Values.externalAccess.service.publicNames )
( empty .Values.externalAccess.service.publicNames )
}}
{{- end -}}
{{- end -}} |
This Issue has been automatically marked as "stale" because it has not had recent activity (for 15 days). It will be closed if no further activity occurs. Thanks for the feedback. |
Due to the lack of activity in the last 5 days since it was marked as "stale", we proceed to close this Issue. Do not hesitate to reopen it later if necessary. |
Name and Version
bitnami/mongodb
What architecture are you using?
amd64
What steps will reproduce the bug?
helm -n mongo-ha1 install my-mongo-ha1 bitnami/mongodb -f values-mon-ha1.yml
Are you using any custom parameters or values?
Here are my values.yml
What is the expected behavior?
This is missing the arbiter node.
What do you see instead?
It is missing out arbiter node in
rs.status()
outputmoreover arbiter is trying to connect to fqdn of node name which is incorrect...
env variable
MONGODB_INITIAL_PRIMARY_HOST
on arbiter node and secondary should be different as their headless service name is differentThe actual value of
MONGODB_INITIAL_PRIMARY_HOST
on arbiter is supposed to bemy-mongo-ha1-mongodb-0.my-mongo-ha1-mongodb-headless.mongo-ha1.svc.cluster.local
somewhere it's getting modified to use the local service name on the arbiter which is incorrect and hence container restarted and not able to add to replicaset.
The text was updated successfully, but these errors were encountered: