[SERVER-9029] Duplicate users in system.users causes problem with 2.4.x upgrade Created: 20/Mar/13 Updated: 11/Jul/16 Resolved: 25/Mar/13 |
|
| Status: | Closed |
| Project: | Core Server |
| Component/s: | Security, Usability |
| Affects Version/s: | 2.4.0 |
| Fix Version/s: | 2.4.2, 2.5.0 |
| Type: | Bug | Priority: | Major - P3 |
| Reporter: | Adam Comerford | Assignee: | Spencer Brody (Inactive) |
| Resolution: | Done | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Issue Links: |
|
||||||||||||||||
| Operating System: | ALL | ||||||||||||||||
| Participants: | |||||||||||||||||
| Description |
|
If duplicate users exist then the upgrade process of creating a new unique index will fail. To fix this duplicate user problem you must start in the previous version and ensure that no duplicate users exist before upgrading; this will require removing those duplicate user documents. Orig Report After upgrading to 2.4 I have following errors:
|
| Comments |
| Comment by auto [ 25/Mar/13 ] | |||||||||||||||||||||||
|
Author: {u'date': u'2013-03-25T19:12:36Z', u'name': u'Spencer T Brody', u'email': u'spencer@10gen.com'}Message: | |||||||||||||||||||||||
| Comment by auto [ 25/Mar/13 ] | |||||||||||||||||||||||
|
Author: {u'date': u'2013-03-25T19:12:36Z', u'name': u'Spencer T Brody', u'email': u'spencer@10gen.com'}Message: | |||||||||||||||||||||||
| Comment by Daniel Pasette (Inactive) [ 25/Mar/13 ] | |||||||||||||||||||||||
|
spencer is looking into how to improve the error message. | |||||||||||||||||||||||
| Comment by Scott Hernandez (Inactive) [ 21/Mar/13 ] | |||||||||||||||||||||||
|
HELP NEEDED | |||||||||||||||||||||||
| Comment by Spencer Brody (Inactive) [ 20/Mar/13 ] | |||||||||||||||||||||||
|
Unfortunately there's not much we can do here other than document this clearly and improve the error message. The server can't know which user to drop if there are duplicate user docs, so fixing this has to require user intervention. | |||||||||||||||||||||||
| Comment by Mark porter [ 20/Mar/13 ] | |||||||||||||||||||||||
|
Easy to repro on RHEL:
| |||||||||||||||||||||||
| Comment by Scott Hernandez (Inactive) [ 20/Mar/13 ] | |||||||||||||||||||||||
|
I was able to easily reproduce this:
Then upgrade to 2.4.x:
The ability to have duplicate users with the same name in previous versions was a bug and this unique index now keeps the problem from happening when users are created. | |||||||||||||||||||||||
| Comment by Artyom Pakhomov [ 20/Mar/13 ] | |||||||||||||||||||||||
|
After downgrading to 2.2.3 I found that ther dups in db.system.users collection. But not sure whether the two entries where there before the upgrade or were created somehow durin the upgrade. After remove one entry, I upgrade to 2.4 and everything is fine. |