Skip to content
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

Unable to scale up more than 7 replicas #119

Open
rakeshk121 opened this issue Jun 11, 2020 · 1 comment
Open

Unable to scale up more than 7 replicas #119

rakeshk121 opened this issue Jun 11, 2020 · 1 comment

Comments

@rakeshk121
Copy link

rakeshk121 commented Jun 11, 2020

The mongo-k8-sidecar works fine for replicas upto 7 but when it is scaled up beyond 7, the new members are unable to join the replica. As per my analysis the issue is due to a constraint that mongo allows only 7 members as voting members even though there can be max of 50 members in the replica set. The sidecar configures all the members as voting members, so scale-up beyond 7 is not working fine. Is there any configuration that i can do to fix this?
Here is the error log of the sidecar of PRIMARY replica:-

Error in workloop { MongoError: Replica set configuration contains 8 voting members, but must be at least 1 and no more than 7
    at Function.MongoError.create (/opt/cvallance/mongo-k8s-sidecar/node_modules/mongodb-core/lib/error.js:31:11)
    at /opt/cvallance/mongo-k8s-sidecar/node_modules/mongodb-core/lib/connection/pool.js:497:72
    at authenticateStragglers (/opt/cvallance/mongo-k8s-sidecar/node_modules/mongodb-core/lib/connection/pool.js:443:16)
    at Connection.messageHandler (/opt/cvallance/mongo-k8s-sidecar/node_modules/mongodb-core/lib/connection/pool.js:477:5)
    at Socket.<anonymous> (/opt/cvallance/mongo-k8s-sidecar/node_modules/mongodb-core/lib/connection/connection.js:333:22)
    at Socket.emit (events.js:182:13)
    at addChunk (_stream_readable.js:287:12)
    at readableAddChunk (_stream_readable.js:268:11)
    at Socket.Readable.push (_stream_readable.js:223:10)
    at TCP.onStreamRead [as onread] (internal/stream_base_commons.js:122:17)
  name: 'MongoError',
  message:
   'Replica set configuration contains 8 voting members, but must be at least 1 and no more than 7',
  operationTime:
   Timestamp { _bsontype: 'Timestamp', low_: 1, high_: 1591844848 },
  ok: 0,
  errmsg:
   'Replica set configuration contains 8 voting members, but must be at least 1 and no more than 7',
  code: 103,
  codeName: 'NewReplicaSetConfigurationIncompatible',
@rakeshk121
Copy link
Author

Scalling the mongo-stateful set beyond 3 as well does not seem to work. The current mongodb replica can be scalled up to 3 replicas(due to mongo-sidecar limitation) and scalling beyond 3 will fail to re-elect the members of the replica upon pod non-graceful restart of the pod and the system reboot

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant