[DOCS-12719] Docs for SERVER-4999: all hostnames should be compared case insensitively Created: 19/May/19  Updated: 30/Oct/23  Resolved: 11/Jun/19

Status: Closed
Project: Documentation
Component/s: manual, Server
Affects Version/s: None
Fix Version/s: Server_Docs_20231030

Type: Task Priority: Major - P3
Reporter: Kay Kim (Inactive) Assignee: Unassigned
Resolution: Gone away Votes: 0
Labels: platforms-re-triaged
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Documented
documents SERVER-4999 all hostnames should be compared case... Closed
Related
related to DOCS-12794 Docs for SERVER-41614: Revert "all ho... Closed
Participants:
Days since reply: 4 years, 35 weeks, 1 day ago
Epic Link: DOCS: 4.2 Server/Tools

 Description   

Description

Description:

Hostnames passed in a shell connection string, or passed to addShard, rs.initiate, or rs.reconfig are now case-insensitive. Hostnames are lowercased by translating uppercase ASCII letters to lowercase; non-ASCII characters in hostnames are left alone. If you pass a hostname with an uppercase character to rs.initiate/reconfig, it will appear lowercase in rs.conf or rs.status.

Engineering Ticket 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.)

> 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"
}

Scope of changes

Impact to Other Docs

MVP (Work and Date)

Resources (Scope or Design Docs, Invision, etc.)



 Comments   
Comment by Kay Kim (Inactive) [ 11/Jun/19 ]

SERVER-4999 was reverted

Generated at Thu Feb 08 08:05:56 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.