bitnami / charts

Bitnami Helm Charts

Home Page:https://bitnami.com

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

[bitnami/mongodb] arbiter container is not able to join the mongo cluster

manoj0116 opened this issue · comments

Name and Version

bitnami/mongodb 15.6.16

What architecture are you using?

None

What steps will reproduce the bug?

  1. Create a mongodb statefulset with arbiter.
  2. Chart creates a headless service for both mongodb and arbiter
  3. When arbiter starts it tries to connect to mongodb initial node, url is made available using env variable: MONGODB_INITIAL_PRIMARY_HOST which is generated using below code but the arbiter container will have a different K8S_SERVICE_NAME:
    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 )

Are you using any custom parameters or values?

No response

What is the expected behavior?

arbiter should be trying to connect to MongoDB server mongodb-0.mongodb-headless.services.svc.cluster.local instead of
mongodb-0.mongodb-arbiter-headless.services.svc.cluster.local

What do you see instead?

cannot resolve host "mongodb-0.mongodb-arbiter-headless.services.svc.cluster.local": lookup mongodb-0.mongodb-arbiter-headless.services.svc.cluster.local: no such host

Additional information

No response

Hi @manoj0116

In order to reproduce the issue, could you please provide the chart parameters (provided via values.yaml or using the --set flag) you used to install your Helm release? Please exclusively provide the parameters you customized avoiding the ones with default values.

Note: you can easily obtain the above parameters using helm get values RELEASE_NAME

Thanks in advance.

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.