[SERVER-4833] Misleading error when running addshard with a space before hostname Created: 01/Feb/12 Updated: 12/Dec/23 |
|
| Status: | Backlog |
| Project: | Core Server |
| Component/s: | Sharding |
| Affects Version/s: | 2.0.2 |
| Fix Version/s: | None |
| Type: | Improvement | Priority: | Minor - P4 |
| Reporter: | A. Jesse Jiryu Davis | Assignee: | Backlog - Cluster Scalability |
| Resolution: | Unresolved | Votes: | 0 |
| Labels: | RachitaD, neweng | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Assigned Teams: |
Cluster Scalability
|
| Sprint: | Sharding 10 (02/19/16) |
| Participants: |
| Description |
|
If add a replica set as a member of a shard, with a space between the comma and one of the hosts, like so: db.runCommand( { addshard : 'shard0/localhost:4000, localhost:4001', name: 'shard0' }) I get a misleading error: "can't use localhost as a shard since all shards need to communicate. either use all shards and configdbs in localhost or all in actual IPs host: localhost:4001 isLocalHost:0" Better to trim spaces in lists of replica-set members, or to give a more informative error. |
| Comments |
| Comment by Andy Schwerin [ 12/Oct/15 ] |
|
I think this comes down to improving how we parse ConnectionString. |