Why do that because I am implementing authentication which includes inter node encryption and setting auth = true but I already have a replica set working.
I thought I should do the following
To shutdown:
- Run db.runCommand({ replSetFreeze: numOfSeconds }) on secondaries to prevent from promoting to primary
- Run rs.stepDown(seconds) on the primary; it will check to make sure at least one of the secondaries is sufficiently caught up to oplog before stepping down. Choose a reasonably long wait time.
- Once everything is a secondary, db.shutdownServer() on everything
but I find that when I try to stepDown or shutdownServer my Primary it complains that there are no Eligible members they can promote. I know that and still want to shut down.
To this point, I have just done a stop on the service or a kill from the OS l but I want it to be more graceful, less chance of unflushed buffers...
Anyone know how to force the step down or the db.shutdownServer()
I have 2 servers + an arbiter MongoDB version: 3.0.6 Ubuntu
Hi Jim,
Why do that because I am implementing authentication which includes inter node encryption and setting auth = true but I already have a replica set working.
Glad to hear that you found a working solution. However I have a couple of pointers that may be helpful in the future:
You don’t need to shutdown the whole replica set to enable auth on an existing deployment. You can perform a rolling restart instead. The procedure of which is available in Enable Internal Authentication. Once you have created the necessary users, you can then Upgrade from Keyfile Authentication to x.509 Authentication.
Also, you can find out how up-to-date your secondaries are by using the db.printSlaveReplicationInfo() command in the mongo shell.
Please note that the latest in the 3.0 series is currently 3.0.14. You can also perform a rolling upgrade as described in the Upgrade a replica set section.
Best regards,
Kevin