External Arbiter like externalNodes

Currently at the organisation I work for we have a 2 cluster mongodb replicaset running on Openshift. It is not using an operator, it is a helm chart which has been modified quite extensively to suit our needs. The replicaset is configured using scripts that run in Openshift using a job, so we are totally free to set it up as we please. We have an arbiter that is running in a 3rd data centre, not kubernetes, a VM with the arbiter running in a podman container. This scenario allows the arbiter to be external to the other Openshift data centres where it can ‘see’ each cluster and help decide the primary host preventing split brains during a failover for example. We have 2 hosts in each cluster plus the arbiter for a total of 5. I have been evaluating Percona Operator for MongoDB using a helm chart for the Percona Server for MongoDB part, I have found it very good and have used Openshift routes to help with the cross cluster communication. I use a managed and unmanaged cluster as advised in the documentation and set the arbiter up in the managed cluster.

My question in regards to Percona Operator for MongoDB is is it possible to add an arbiter as an external host, similar to how it is done with normal voting members that use externalNodes key?

1 Like

To give a clearer understanding of where I hope this will go and I am happy to raise a Jira ticket but just wanted to be sure the feature is not already available and perhaps I have missed it.

Given the mongodb manual states “Do not run an arbiter on systems that also host the primary or the secondary members of the replica set.“

From a high level I’m thinking this could be done in one of 2 ways e.g

The following would add the arbiterOnly key set to true, votes would need to be set to 1 and priority set to 0

    externalNodes:
    - host: external-arbiter-host1
      port: 27017
      votes: 1
      priority: 0
      arbiterOnly: true

The other way would create a new sections such as -

    externalArbiter:
    - host: external-arbiter-host1
      port: 27017

P.S I have tried adding an arbiter manually using the rs.addArb() command and it does get added for a while but I don’t think Operator would keep it there after the pod is deleted or some event refreshes the replicaset back to how it is configured originally.

Thanks for any ideas on this.

Hi, currently the arbiterOnly tag cannot be used in the externalNodes section. Feel free to open a FR in Projects - Percona JIRA

Thanks, I will do that.