When deploying mongodb catalog template - it starts up everything nicely and it works fine, but if you shutdown one of the nodes - it doesn't seem like it can ever re-join cluster properly.
One of the things that I noticed, is that one of the members in the replica contains a name instead of IP, and possibly that's one of the reasons, but either way something is off, and using MongoDB catalog template is very-very unsafe as it stands right now, since in case one of the replicas fails - you will not be able to re-create the cluster, and after rancher starts to spin up new instances and delete failed - it might essentually lose your content (in case that you don't use external volume and trigger + / - instances, i accidentally did that and lost all data)
rs0:PRIMARY> rs.config()
{
"_id" : "rs0",
"version" : 3,
"protocolVersion" : NumberLong(1),
"members" : [
{
"_id" : 0,
"host" : "**MongoDB_mongo-cluster_1:27017**",
"arbiterOnly" : false,
"buildIndexes" : true,
"hidden" : false,
"priority" : 1,
"tags" : {
},
"slaveDelay" : NumberLong(0),
"votes" : 1
},
{
"_id" : 1,
"host" : "**10.42.230.33:27017**",
"arbiterOnly" : false,
"buildIndexes" : true,
"hidden" : false,
"priority" : 1,
"tags" : {
},
"slaveDelay" : NumberLong(0),
"votes" : 1
},
{
"_id" : 2,
"host" : "**10.42.94.55:27017**",
"arbiterOnly" : false,
"buildIndexes" : true,
"hidden" : false,
"priority" : 1,
"tags" : {
},
"slaveDelay" : NumberLong(0),
"votes" : 1
}
],
"settings" : {
"chainingAllowed" : true,
"heartbeatIntervalMillis" : 2000,
"heartbeatTimeoutSecs" : 10,
"electionTimeoutMillis" : 10000,
"getLastErrorModes" : {
},
"getLastErrorDefaults" : {
"w" : 1,
"wtimeout" : 0
},
"replicaSetId" : ObjectId("576af7ee04b83fbf3e3135a3")
}
}
Another issue that I noticed - replicaset becomes unavailable after the cluster is increased and followed by reduction of number of instances, ie - increase to 4, and then if 2 nodes fail - cluster will never recover. And if you bring more instances up - it will just cause split brain, and new instances will come up as individual single-master-only nodes, and the replicaset nodes will remain as secondaries