Hi
It’s been a while since you posted this issue. Have you had success in resolving this?
To deploy config servers as a replica set, you need two basic things:
mongod instance must be called with the --replSet and --configsvr options. The --configsvr option can also be set in the sharding.clusterRole: configsvr if using a config file.rs.initiate()) must contain the field configsvr: trueThe main issue in your deployment is this line you posted:
Got “BadValue: Nodes started with the —configsvr flag must have configsvr:true in their config” while validating”.
This error appears when you initiate a regular replica set (i.e. without the --configsvr option and without the configsvr: true during rs.initiate()) and then attempt to restart it using the --configsvr option. That is, you cannot repurpose an existing replica set into config servers.
To use replica set config servers, you must create a new replica set, or upgrade an existing config server deployment. This is because there are additional restrictions that replica set config servers must abide compared to a regular replica set.
For more information, please see:
Best regards,
Kevin