[SERVER-4999] all hostnames should be compared case insensitively Created: 17/Feb/12 Updated: 08/Jan/24 Resolved: 24/Jun/19 |
|
| Status: | Closed |
| Project: | Core Server |
| Component/s: | Networking |
| Affects Version/s: | None |
| Fix Version/s: | None |
| Type: | Bug | Priority: | Major - P3 |
| Reporter: | Richard Kreuter (Inactive) | Assignee: | Backlog - Service Architecture |
| Resolution: | Won't Fix | Votes: | 5 |
| Labels: | platforms-re-triaged | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Issue Links: |
|
||||||||||||||||||||||||||||||||||||||||
| Assigned Teams: |
Service Arch
|
||||||||||||||||||||||||||||||||||||||||
| Operating System: | ALL | ||||||||||||||||||||||||||||||||||||||||
| Sprint: | Service Arch 2019-04-22, Service Arch 2019-05-06, Service Arch 2019-05-20 | ||||||||||||||||||||||||||||||||||||||||
| Participants: | |||||||||||||||||||||||||||||||||||||||||
| Linked BF Score: | 35 | ||||||||||||||||||||||||||||||||||||||||
| Description |
|
It seems like addshard treats hostnames case-sensitively, which is inconsistent with how hostnames work in DNS. Here's my replica set, addshard failures below. (I know that using localhost adds some extra stupid to the problem, but I don't have a routable hostname to test with right now.)
Here are a bunch of attempts to add it as a shard:
|
| Comments |
| Comment by Andy Schwerin [ 24/Jun/19 ] |
|
While MongoDB servers' treatment of hostnames ought to more closely match the behavior of DNS, it never has, and our attempt to change it ran into a lot of existing infrastructure that had come to rely on hostname case sensitivity. As such, we're no longer planning to change this behavior. |
| Comment by A. Jesse Jiryu Davis [ 11/Jun/19 ] |
|
Reverted and reopened to give the Cloud Team time to adapt cloud monitoring for this change. This will not be released in 4.2. |
| Comment by A. Jesse Jiryu Davis [ 11/Jun/19 ] |
|
When we reintroduce this patch, remember to apply two commits: the one for this ticket and the one for ad9267a722e21268d1005c1428ccad85d5a98946 0ed0b97e6f62bba38cf4c93f5a7270569e79f24d |
| Comment by Githook User [ 11/Jun/19 ] |
|
Author: {'name': 'A. Jesse Jiryu Davis', 'email': 'jesse@mongodb.com', 'username': 'ajdavis'}Message: Revert " This reverts commit ad9267a722e21268d1005c1428ccad85d5a98946 ( |
| Comment by Githook User [ 10/Jun/19 ] |
|
Author: {'name': 'A. Jesse Jiryu Davis', 'email': 'jesse@mongodb.com', 'username': 'ajdavis'}Message: Revert " This reverts commit ad9267a722e21268d1005c1428ccad85d5a98946 ( |
| Comment by Githook User [ 14/May/19 ] |
|
Author: {'email': 'jesse@mongodb.com', 'name': 'A. Jesse Jiryu Davis', 'username': 'ajdavis'}Message: Hostnames passed to replSetInitiate, replSetReconfig, addShard, etc. are The shell's getHostName() function now returns the hostname lowercased. Fixes undefined behavior in mongo::str::toLower(). |
| Comment by A. Jesse Jiryu Davis [ 25/Apr/19 ] |
|
Reverted and reopened while I work out some build failures. |
| Comment by Githook User [ 25/Apr/19 ] |
|
Author: {'name': 'A. Jesse Jiryu Davis', 'username': 'ajdavis', 'email': 'jesse@mongodb.com'}Message: Revert " This reverts commit 5e346eb4b9bb3ec678d4eac36b3f0a18c1c10939. |
| Comment by Githook User [ 25/Apr/19 ] |
|
Author: {'email': 'jesse@mongodb.com', 'name': 'A. Jesse Jiryu Davis', 'username': 'ajdavis'}Message: Hostnames passed to replSetInitiate, replSetReconfig, addShard, etc. are Fixes undefined behavior in mongo::str::toLower(). |
| Comment by Dmitry Gusarov [ 23/Jan/18 ] |
|
+1 please... I've wasted half a day before figured out one letter in server name been in wrong case |
| Comment by Grégoire Seux [ 16/Oct/12 ] |
|
All name should case insensitive and be more tolerant in general : ip, dns name, hostname should be seen as the same host if is really the same host. |
| Comment by Theo [ 17/Mar/12 ] |
|
The description of this issue focus to much around replicaset and shards. This is wide spread throughout the product even when specifying hostnames on the command line and in configuration files. The desired fix is to make all hostnames case insensitive. |
| Comment by Spencer Brody (Inactive) [ 17/Feb/12 ] |
|
The easiest fix would probably be to make the replica set and sharding configurations convert everything to lowercase when they're first added. |