Bug 1280381 - ceph-deploy (or ceph) is case sensitive
ceph-deploy (or ceph) is case sensitive
Product: Red Hat Ceph Storage
Classification: Red Hat
Component: Documentation (Show other bugs)
x86_64 Linux
medium Severity medium
: rc
: 1.3.4
Assigned To: ceph-docs@redhat.com
: Reopened
Depends On:
  Show dependency treegraph
Reported: 2015-11-11 10:28 EST by Taco Scargo
Modified: 2018-02-20 15:48 EST (History)
9 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2018-02-20 15:48:35 EST
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

  None (edit)
Description Taco Scargo 2015-11-11 10:28:36 EST
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:

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:
Comment 2 Alfredo Deza 2015-12-11 09:40:54 EST
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.
Comment 3 Taco Scargo 2015-12-11 09:52:27 EST
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>.
Comment 4 Taco Scargo 2016-08-16 06:11:44 EDT
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 ...
Comment 5 Alfredo Deza 2016-08-16 07:59:29 EDT
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:


But this will not work because Ceph will look for:


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).
Comment 6 Taco Scargo 2016-08-16 08:15:22 EDT
@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.
Comment 7 Ken Dreyer (Red Hat) 2016-08-16 13:18:43 EDT
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.
Comment 8 Taco Scargo 2016-08-17 06:22:20 EDT
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.
Comment 9 Alfredo Deza 2016-08-17 08:36:22 EDT
@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.

Note You need to log in before you can comment on or make changes to this bug.