[SERVER-8409] collMod doesn't work when run through a mongos on an authenticated cluster Created: 30/Jan/13 Updated: 11/Jul/16 Resolved: 28/Mar/13 |
|
| Status: | Closed |
| Project: | Core Server |
| Component/s: | None |
| Affects Version/s: | 2.2.1 |
| Fix Version/s: | 2.4.0 |
| Type: | Bug | Priority: | Major - P3 |
| Reporter: | James Blackburn | Assignee: | Spencer Brody (Inactive) |
| Resolution: | Done | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Environment: |
RHEL 5 |
||
| Issue Links: |
|
||||||||||||||||
| Operating System: | ALL | ||||||||||||||||
| Participants: | |||||||||||||||||
| Description |
|
Attempting to switch userPowerOf2Sizes on through a mongos on a sharded collection doesn't seem to work:
It's not clear to me if the problem is the fact that the cluster is authenticated, or that it's sharded... Note the same command works fine against a plain old un-sharded, un-auth'd mongod primary:
|
| Comments |
| Comment by Spencer Brody (Inactive) [ 29/May/13 ] |
|
UPDATE: I previously commented that in 2.2, if you ran collMod against mongos it would report failure but actually succeed. I was incorrect - though it will succeed on the primaries, the failed command will not be replicated to the secondaries. |
| Comment by Spencer Brody (Inactive) [ 28/Mar/13 ] |
|
The way it was fixed in 2.4.0, however, cannot be backported. So we'll have to do a different fix (the one I described in my first comment on this ticket - it should be pretty small and straightforward), if we want to get this in the 2.2 series. Since it's just an aesthetic problem, however, it doesn't seem too important. |
| Comment by Spencer Brody (Inactive) [ 28/Mar/13 ] |
|
This was fixed automatically as part of the security work that went into 2.4.0. |
| Comment by Spencer Brody (Inactive) [ 27/Mar/13 ] |
|
- EDIT: If you run this through mongos, the command will report failure. In this situation, the cluster will be left inconsistent as the primary will have the usePowerOf2Sizes setting set, but this will not be replicated to the secondaries. |
| Comment by Kenny Gorman [ 22/Mar/13 ] |
|
running the command on all primaries did indeed work. |
| Comment by Kenny Gorman [ 22/Mar/13 ] |
|
Ran into this same issue. Voting! |
| Comment by Spencer Brody (Inactive) [ 30/Jan/13 ] |
|
It seems like the command still works in these cases, even though it reports an errmsg and returns ok:0. If you check the system.namespaces entry for this collection, you'll see the flags actually are updated. |
| Comment by Spencer Brody (Inactive) [ 30/Jan/13 ] |
|
Was able to reproduce. Problem seems to be that the collMod command iterates through all fields in the command object and returns "unknown command" if it doesn't recognize any field in the object. Would be pretty simple to just recognize and ignore the "$auth" field. This problem will go away in 2.4 now that $auth tables are gone. |