Bug 1280381 - ceph-deploy (or ceph) is case sensitive
Summary: ceph-deploy (or ceph) is case sensitive
Keywords:
Status: CLOSED WONTFIX
Alias: None
Product: Red Hat Ceph Storage
Classification: Red Hat Storage
Component: Documentation
Version: 1.3.0
Hardware: x86_64
OS: Linux
medium
medium
Target Milestone: rc
: 1.3.4
Assignee: ceph-docs@redhat.com
QA Contact: ceph-qe-bugs
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2015-11-11 15:28 UTC by Taco Scargo
Modified: 2018-02-20 20:48 UTC (History)
9 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2018-02-20 20:48:35 UTC
Embargoed:


Attachments (Terms of Use)

Description Taco Scargo 2015-11-11 15:28:36 UTC
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:

Comment 2 Alfredo Deza 2015-12-11 14:40:54 UTC
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 14:52:27 UTC
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 10:11:44 UTC
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 11:59:29 UTC
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).

Comment 6 Taco Scargo 2016-08-16 12:15:22 UTC
@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 17:18:43 UTC
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 10:22:20 UTC
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 12:36:22 UTC
@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.