-
Type: Bug
-
Resolution: Done
-
Priority: Major - P3
-
None
-
Affects Version/s: None
-
Component/s: None
-
None
-
ALL
-
A replica set deployed in an kubernetes environment, and tried to add two nodes which are unreachable were and added, but rs.remove() does not remove it once when logged in inside pod using mongo.
conf = { _id: "replset", members: [ {_id: 0, host: "localhost:27017"} ] } rs.initiate(conf)// Adding and removing one nonexistent secondary should work assert.commandWorked(rs.add("localhost:28018")) assert.commandWorked(rs.remove("localhost:28018"))// Adding and removing two nonexistent secondaries does not work assert.commandWorked(rs.add("localhost:28018")) assert.commandWorked(rs.add("localhost:29019")) assert.commandWorked(rs.remove("localhost:28018")) assert.commandWorked(rs.remove("localhost:29019"))
Note: This does not depend on the k8 environment and this issue doesn't seem to affect mongosh but only the mongo shell.
I tested this on MongoDB v5.0.7.