[SERVER-12042] ERROR unsupported modification to roles collection in oplog Created: 11/Dec/13  Updated: 11/Jul/16  Resolved: 13/Dec/13

Status: Closed
Project: Core Server
Component/s: Security
Affects Version/s: 2.5.4
Fix Version/s: 2.5.5

Type: Bug Priority: Major - P3
Reporter: Tyler Brock Assignee: Andy Schwerin
Resolution: Done Votes: 0
Labels: 26qa
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Related
Operating System: ALL
Steps To Reproduce:

$ mongo --norc
MongoDB shell version: 2.5.5-pre-
connecting to: test
> db.auth('root','password')
1
> db.runCommand("authSchemaUpgradeStep")

{ "done" : false, "ok" : 1 }

> db.runCommand("authSchemaUpgradeStep")

{ "done" : true, "ok" : 1 }
Participants:

 Description   

Running the authSchemaUpgradeStep's second phase on a standalone node produces the following message in my log:

ERROR: Unsupported modification to roles collection in oplog; TODO how to remedy. OplogOperationUnsupported Unsupported oplog operation Oplog entry: c



 Comments   
Comment by Githook User [ 13/Dec/13 ]

Author:

{u'username': u'andy10gen', u'name': u'Andy Schwerin', u'email': u'schwerin@10gen.com'}

Message: SERVER-12042 Add support for command oplog entries previously unhandled by RoleGraph.
Branch: master
https://github.com/mongodb/mongo/commit/bf44f7690aadf1f99e7979adf6c33d4dea2f5464

Comment by Spencer Brody (Inactive) [ 12/Dec/13 ]

Looks like the problem is that deleteIndexes is a valid synonym for dropIndexes (and the c++ driver's dropIndex and dropIndexes methods actually use deleteIndexes), but we don't handle that in role_graph_update.cpp or authorization_manager.cpp

Comment by Valeri Karpov [ 12/Dec/13 ]

schwerin Here's the oplog output that you wanted from the standalone config server:

> db.oplog.$main.find({ op : "c" }).pretty()
{
	"ts" : Timestamp(1386875892, 6),
	"op" : "c",
	"ns" : "config.$cmd",
	"o" : {
		"create" : "changelog",
		"size" : NumberLong(10485760),
		"capped" : true
	}
}
{
	"ts" : Timestamp(1386875905, 16),
	"op" : "c",
	"ns" : "admin.$cmd",
	"o" : {
		"deleteIndexes" : "system.new_users",
		"index" : "*"
	}
}

Comment by Valeri Karpov [ 11/Dec/13 ]

For me, doesn't happen when you run it on a standalone, but does happen when running authSchemaUpgradeStep on a mongos...

Comment by Tyler Brock [ 11/Dec/13 ]

Update, this also happens on a replica set. The error is printed in the log of every node:

2013-12-11T11:32:20.452-0500 [repl writer worker 2] ERROR: Unsupported modification to roles collection in oplog; TODO how to remedy. OplogOperationU
nsupported Unsupported oplog operation Oplog entry: c

From the oplog:

udr:PRIMARY> db.oplog.rs.find({op: "c"}).pretty()
{
	"ts" : Timestamp(1386779540, 1),
	"h" : NumberLong("-1153743340488767281"),
	"v" : 2,
	"op" : "c",
	"ns" : "admin.$cmd",
	"o" : {
		"deleteIndexes" : "system.users",
		"index" : "*"
	}
}

Comment by Tyler Brock [ 11/Dec/13 ]

There doesn't even seem to be an oplog, which is expected, as this is a standalone node:

> use local
switched to db local
> show collections
startup_log

Generated at Thu Feb 08 03:27:26 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.