-
Notifications
You must be signed in to change notification settings - Fork 9.3k
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
Failure to add an external Hidden instance to an externally accessed ReplicaSet #16659
Comments
It seems a very specific use case difficult to reproduce on our side and very tied to your scenario. For information regarding the application itself, customization of the content within the application, or questions about the use of the technology or infrastructure; we highly recommend checking forums and user guides made available by the project behind the application or the technology. That said, we will keep this ticket open until the stale bot closes it just in case someone from the community adds some valuable info. |
Hi @bslpzk I have also been looking at something similar when it comes to deploying nodes using a new chart but wanting them to attach to an existing replica set. From my understanding your hidden node is running through initialization whilst attempting to register with a primary node which has a DNS address relative to the hidden chart, and not your original chart. I would look at updating the hidden chart to overwrite the environment variable: It will be used in this function: mongodb_configure_hidden I have also found a workaround if you want to add all nodes, and not just hidden nodes, to an existing cluster. The description is buried in this issue: #16719 The idea is to edit the There is a line where it searched for a current primary. If you're able to alter this search to target the host names of your existing cluster then it will add itself to that cluster. It might still be worth overwriting |
Hi @dtrts. In fact, I also moved away from the idea of a hidden node and added a normal secondary node in the same way - using variables from the initialization scripts. And to change replicaset configuration it's convenient to use initdbScriptsConfigMap value, by putting into the configmap the changed replicaset configuration as |
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 13.10.2
What architecture are you using?
None
What steps will reproduce the bug?
On two separate clusters with external IPs, run replicaset and hidden mongodb instance.
Add a hidden mongodb instance from one cluster to the replicaset of the other cluster.
Are you using any custom parameters or values?
What is the expected behavior?
To be able to run a hidden instance to connect to a replicaset located in another cluster via external access
What do you see instead?
N/A
Additional information
Hello colleagues,
I'm having difficulties adding a hidden MongoDB instance from another Kubernetes cluster while maintaining external access.
The initial goal was simple: add another hidden MongoDB instance to an existing replica set running in Azure AKS. This new instance would be located in a different AKS cluster and serve as a read-only copy.
The inter-cluster communication via IP is established. However, when deploying the
bitnami/mongodb
chart on each cluster, two separate replica sets are created, even if the names are the same. Consequently, when attempting to execute rs.add("<second_cluster_ip>:27017"), an error occurs due to different replica set IDs. These IDs are generated upon initialization of the primary MongoDB instance in each cluster and cannot be changed. Here's an example log entry from heartbeat:Similarly, the methods to add
initdbScripts
do not work, because they run after the replicaset is initialized.If I try to deploy the chart on the second cluster with
replicaCount: 0
andhidden.replicaCount: 1
, the replica set initialization is skipped, but the hidden replica profile is not configured either. Attempting to manually adjust its settings via the console results in the following expected error:I need help to solve this problem and achieve the desired configuration. I appreciate any advice from those who can assist me. Thank you.
The text was updated successfully, but these errors were encountered: