-
Type: Task
-
Resolution: Done
-
Priority: Blocker - P1
-
None
-
Affects Version/s: None
-
Component/s: API, BSON, Configuration
I've been on forums talking with several people for the last few days and no one has been able to give me an answer.
Is there anyway to reconfigure a replica set in the event the primary as well as a majority of the servers are down? For example if data center 1 goes down, a procedure can be run to reconfigure and set a new primary with the remaining servers?
I tried the eval method on the database object and I get this:
"Command '$eval' failed: not master (response:
)"
I also tried this:
var reconfigCommand = new CommandDocument
{
{"replSetReconfig", new BsonDocument{{"configuration", newConfig},
}}
};
var response = database.RunCommand(reconfigCommand);
And RunCommand throws the following MongoCommandException
Command 'replSetReconfig' failed: replSetReconfig command must be sent to the current replica set primary. (response:
{ "ok" : 0.0, "errmsg" : "replSetReconfig command must be sent to the current replica set primary." })
From what I can tell in the documentation, force = true should allow reconfig against a non-primary database.
Any suggestions?