Details
-
Bug
-
Resolution: Won't Fix
-
Major - P3
-
None
-
None
Description
There are two docs for migrating config server(s):
The former is a relatively easy procedure, whereas the latter requires a (brief) downtime, so it's important to choose the right one.
TLDR: All references to "hostname" (or "hostnames") in these docs should be replaced by references to "DNS name" (or "DNS names").
GORY DETAILS:
Since one doc is "same hostnames" and the other is "different hostnames", the differentiator between these two procedures is (apparently) whether or not the hostnames of the config servers need to change during the migration.
This is not true. "DNS names" are subtly different from "hostnames", and these docs conflate the two concepts. This can cause considerable confusion.
Background:
By definition, a host has exactly one "hostname". The definitive source is the locally running operating system kernel. It is independent of anything on the network, including DNS servers, IP addresses, and so on. Even a host that has no network interfaces, and networking disabled in its kernel, will still have a hostname. Hostnames are considered to be uniquely identifying of the host (within some given realm/environment/whatever). The hostname is what the host considers its own name to be.
By contrast, a host may have any number of "DNS names" (including none). DNS names are what other hosts use to connect to that host. (Thus, the term "DNS name" is not ideal, since it is independent of DNS per se — for example, /etc/hosts can be used instead, and everything written here is still true. Open to alternative suggestions.) If there are no DNS names, then only an IP address can be used to connect to the host. This definition clearly demonstrates that DNS names are a property of remote hosts, and subject to how those other hosts have been configured. Unlike the hostname, they are not an intrinsic property of the host itself. Very often there will be a DNS name that matches the hostname, but this is not actually required.
Migrating configsvrs:
When migrating config servers, the issue at stake is purely this: does the string supplied to --configdb need to change, or not? If the names supplied to --configdb do not need to change, then the procedure currently described as "same hostnames" should be used. If the names supplied to --configdb do need to change, then the procedure currently described as "different hostnames" should be used. The important thing is that hostnames have nothing to do with this — only the names that are in --configdb.
Knowing this, we can see that "same hostnames" is just one special case of "--configdb string does not need to change". The other valid and common case is where --configdb is using logical DNS names which can easily be updated, for example, CNAMEs. All that matters is that the CNAME gets updated to point to the new config server (and its hostname could be anything).
The flipside of this is that it is possible to have a situation where the DNS names in --configdb must change, yet the actual hostnames of the config servers do not. In this case, a user might mistakenly believe that they can use the "same hostnames" procedure, when in fact the "different hostnames" procedure is required.