Description of problem: When creating a new cluster and one of the nodes has a hostname containing a upper case character, ceph (or ceps-deploy) thinks that it are two different nodes. (see how to reproduce) Version-Release number of selected component (if applicable): How reproducible: always Steps to Reproduce: 1. setup three RHEL7 nodes and name them Ceph01 ceph02 and ceph03 2. install ceph according to setup guide and use: ceph-deploy new ceph01 ceph02 ceph03 (so with lowercase) 3. continue installation Actual results: when doing a ceph -s one sees three monitors online and one down (so 4 in total). Ceph01 ceph02 and ceph03 are up and ceph01 is down. Expected results: three monitors configured and up Additional info:
I am inclined to say this is user error and ceph-deploy can't help here. The user should understand there is a typo and correct the input.
Why is this user error? a hostname is case insensitive per RFC and tools should then actually behave like that and not distinguish between <Hostename> and <hostname>.
Why 'WONTFIX'? This is a bug and not user error. Hostnames are case insensitive: https://www.ietf.org/rfc/rfc4343.txt So hostname Ceph1 == ceph1 ...
I was able to replicate this behavior, but I could not find anything in ceph-deploy that will refuse to work with mixed cased hostnames. This looks like Ceph itself wants to enforce a match between host, configured values, and paths. One of the things that I was able to identify, and that it may be part of why this is not working is that although hostnames can be case-insensitive, paths are not (in Ceph's case) and it will consume configured values (e.g. Ceph1 to match a path that is using the output of the remote `hostname` For example, the admin socket for deamons (as understood by ceph-deploy) would be: /var/run/ceph/ceph-mon.Ceph1.asok But this will not work because Ceph will look for: /var/run/ceph/ceph-mon.ceph1.asok If ceph-deploy wanted to workaround this, it would need to make all hosts lowercase, but that would only fix it for hosts that have an actual lower cased hostname (again, because paths are not case insensitive).
@Alfredo: I completely understand, but this still means that Ceph should s/A-Z/a-z/ any input, in both ceph-deploy as in ceph itself. In my opinion Ceph now does not adhere to the RFC by ignoring the case-insensitivity of hostnames. That it uses the hostname as-is for creating directories, is a bug IMHO.
Other applications besides Ceph (eg Kerberos) are case-sensitive as well when they use hostnames as machine identifiers for application logic. Workarounds to lower-case things could break when DNS has upper-case PTRs (as in the case in some Active Directory environments). The solution is to use the exact casing that is present in the DNS records and hostname configuration.
Again: hostnames are CASE INSENSITIVE per RFC, no matter how many applications do not adhere to it. So an application should preferably not be case sensitive as well. @Ken: I understand where you are coming from, but I just don't agree. Maybe it would be wise to check with multiple engineers and form a quorum. RFCs are there for a reason.
@Taco I read the RFC and you are correct in that hostnames are case insensitive. This is not a case where hostnames are used in isolation for DNS purposes; they are used as identifiers in filesystem paths (and configuration keys/values) If a case insensitive item is used in a case sensitive system, then the case-insensitive property *cannot* be maintained. My vote is to clarify it as documentation, since it is not apparent that different casing might produce issues.