-
Type: Bug
-
Resolution: Won't Fix
-
Priority: Major - P3
-
None
-
Affects Version/s: None
-
Component/s: Networking
-
Service Arch
-
ALL
-
Service Arch 2019-04-22, Service Arch 2019-05-06, Service Arch 2019-05-20
-
35
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.)
> rs.conf() { "_id" : "a", "version" : 3, "members" : [ { "_id" : 0, "host" : "LOCALHOST:27017" }, { "_id" : 1, "host" : "LOCALHOST:27018" }, { "_id" : 2, "host" : "LOCALHOST:27019" } ] }
Here are a bunch of attempts to add it as a shard:
mongos> db.adminCommand({addShard:"a/localhost"}) { "ok" : 0, "errmsg" : "in seed list a/localhost, host localhost:27017 does not belong to replica set a" } mongos> db.adminCommand({addShard:"a/localhost:27017"}) { "ok" : 0, "errmsg" : "in seed list a/localhost:27017, host localhost:27017 does not belong to replica set a" } mongos> db.adminCommand({addShard:"a/localhost:27017,localhost:27018"}) { "ok" : 0, "errmsg" : "in seed list a/localhost:27017,localhost:27018, host localhost:27017 does not belong to replica set a" } mongos> db.adminCommand({addShard:"localhost:27017"}) { "ok" : 0, "errmsg" : "host is part of set: a use replica set url format <setname>/<server1>,<server2>,...." } mongos> db.adminCommand({addShard:"LOCALHOST:27017"}) { "ok" : 0, "errmsg" : "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:27017 isLocalHost:0" } mongos> db.adminCommand({addShard:"a/LOCALHOST:27017"}) { "ok" : 0, "errmsg" : "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:27017 isLocalHost:0" } mongos> db.adminCommand({addShard:"a/LOCALHOST:27017,LOCALHOST:27018"}) { "ok" : 0, "errmsg" : "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:27017 isLocalHost:0" }
- causes
-
SERVER-41181 Sharding test failures due to hostname normalization
- Closed
-
SERVER-41614 Revert "all hostnames should be compared case insensitively"
- Closed
- is duplicated by
-
SERVER-18150 Hostname matching should be case-insensitive
- Closed
- is related to
-
SERVER-5138 Are node names case sensitive?
- Closed