[SERVER-2422] "db" returns hostname when connecting to remote host Created: 27/Jan/11 Updated: 27/Jan/11 Resolved: 27/Jan/11 |
|
| Status: | Closed |
| Project: | Core Server |
| Component/s: | Shell |
| Affects Version/s: | 1.6.5 |
| Fix Version/s: | None |
| Type: | Bug | Priority: | Major - P3 |
| Reporter: | Adrien Mogenet | Assignee: | Unassigned |
| Resolution: | Done | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Operating System: | ALL |
| Participants: |
| Description |
|
$ ./mongo my-host MongoDB shell: (In my sharded case, it also created a db "my-host" ... I think it could just display error "please select a db" |
| Comments |
| Comment by Adrien Mogenet [ 27/Jan/11 ] |
|
In that case, maybe name resolving should be disabled ? $ ./mongo datastore It might be confusing if both db and host have been named "datastore". $ ./mongo --host datastore to make it less ambiguous, but the raw URL pattern without explicit option is still confusing |
| Comment by Scott Hernandez (Inactive) [ 27/Jan/11 ] |
|
Unfortunately this is a known issue. If the name doesn't resolve to an address (ip) then it is considered a database name. Many people do this: "mongo mydb", and expect it to work, as it does now. Your suggestion would break existing functionality |
| Comment by Adrien Mogenet [ 27/Jan/11 ] |
|
It's not a technical bug but a not logical behavior according to me. |