Project

General

Profile

Bug #6330

ceph-deploy does not use /etc/hosts entry making functional DNS a dependency

Added by Nigel Williams over 10 years ago. Updated over 10 years ago.

Status:
Closed
Priority:
Normal
Assignee:
Category:
-
Target version:
-
% Done:

0%

Source:
other
Tags:
Backport:
Regression:
No
Severity:
4 - irritation
Reviewed:
Affected Versions:
ceph-qa-suite:
Pull request ID:
Crash signature (v1):
Crash signature (v2):

Description

This is to avoid what I consider to be a bug in Linux where some tools do not respect the /etc/nsswitch.conf settings, and only query nameservers for results. For example, add NewHostName to /etc/hosts pointing to localhost, you can ping the host, but you won't be able to 'dig' or 'host' the name without getting a NXDOMAIN error. However, 'getent hosts NewHostName' will work.

ceph-deploy is now resolving names using the same buggy tools, so it is no longer possible to use /etc/hosts file entries in order to reference hosts, since this causes ceph-deploy to fail.

FIX: The test for a hostname should use 'getent hosts SomeHostName' to check name resolution.

History

#1 Updated by Ian Colle over 10 years ago

  • Assignee set to Alfredo Deza

#2 Updated by Alfredo Deza over 10 years ago

  • Status changed from New to 4

Can you give me an example on where does ceph-deploy fails to use something that is defined in `/etc/hosts` ?

All of my actual testing is never done with hosts that are defined in DNS, and always in `/etc/hosts` and ceph-deploy does honor that.

When you say 'ceph-deploy is now resolving names using the same buggy tools' it is not entirely clear to me what tools are you referring to. The only one
call the ceph-deploy does all over is:

socket.gethostname()

Which is a pure Python function that attempts to get the hostname.

#3 Updated by Nigel Williams over 10 years ago

Thanks Alfredo. I tried to recreate the error I encountered as a test case but have failed to make it re-occur. I now think that I might have seen an edge-case that might be partly self-inflicted (I am doing one step out of order). Let us close this for now and I can re-open when I am sure it is reproducible and I can provide you with something tangible.

#4 Updated by Alfredo Deza over 10 years ago

  • Status changed from 4 to Closed

Also available in: Atom PDF