Hi,
I am not a mongo expert, although I am familiar with the product.
I am running a Percona Mongo 3.2.18-3.9 cluster with 7 nodes, two of which are delayed nodes (24 hr delay).
When I attempt to drop or add users from the admin database on the primary, I get the following error:
REPLICA1:PRIMARY> use admin
switched to db admin
REPLICA1:PRIMARY> db.dropUser(“someuser”);
2018-04-24T16:26:56.299-0400 E QUERY [thread1] Error: timeout :
_getErrorWithCode@src/mongo/shell/utils.js:25:13
DB.prototype.dropUser@src/mongo/shell/db.js:1355:15
@(shell):1:1
And the user is not dropped.
I get the same kind of thing with adding a user.
I was thinking that it is the 24 hr delayed nodes which are causing this issue.
this cluster was originally mongo community 2.6.8, upgraded to Mongo community 3.0.7, and then to community edition 2.3.18; then finally
finally, the cluster was upgraded to Percona Mongo 3.2.18-3.9.
In the community versions with the delayed nodes, a similar error/warning would display, but the add or drop of the user would succeed.
I was thinking of using writetimeout with no timeout - so the syntax would be like this:
db.dropUser(“someuser”, {w: “majority”, wtimeout: 0} );
But…I am concerned about how this will behave with the 24 hr delayed nodes.
These delayed nodes are configured as follows:
{
“_id” : 4,
“host” : “<ode name>:<ode port>”,
“arbiterOnly” : false,
“buildIndexes” : true,
“hidden” : true,
“priority” : 0,
“tags” : {
},
“slaveDelay” : NumberLong(86400),
“votes” : 1
},
I thought of something like db.dropUser(“someuser”, {w: “majority”, wtimeout: 86500000} ); but I am worried about the length of the timeout there.
PS - I have a test cluster with no delayed nodes (slightly lower version) and here are the results of the add and drop user operations on that one:
RS1:PRIMARY> db.createUser( { user: “tester”, pwd: “dwjhfwouyfufh”, roles: [“root”] } )
Successfully added user: { “user” : “tester”, “roles” : [ “root” ] }
RS1:PRIMARY> db.dropUser(“tester”);
true
RS1:PRIMARY> db.version()
3.2.16-3.6
At any rate let me know if using 0 or for wtimeout or the very large number of MS - 86500000 - note this is a little bit longer than the delay…
Thanx in advance
Doug Levy