]> git.apps.os.sepia.ceph.com Git - ceph.git/commit
cephadm: prevent podman from breaking socket.getfqdn() 40223/head
authorSage Weil <sage@newdream.net>
Thu, 18 Mar 2021 18:26:48 +0000 (14:26 -0400)
committerSage Weil <sage@newdream.net>
Thu, 18 Mar 2021 18:26:48 +0000 (14:26 -0400)
commitcfc1f914ce74f1fd1f45e2efd3ba2ddcb2da129a
tree5428fbd573a1bc38555a9630073c675d7aa78999
parent92522c624b03512c3dc19a30185882d7f8f0844d
cephadm: prevent podman from breaking socket.getfqdn()

socket.getfqdn() will return the reverse lookup for 127.0.1.1, which is
the last item listed for that IP in /etc/hosts.  Podman, by default, will
append the container name (ceph-$fsid-$name) to that line, which is not
a valid hostname, and not what we want the dashbaord to use for the URI
it advertises in the service map.

Pass --no-hosts to podman to disable this.

Docker does not appear to modify /etc/hosts by default--or, more
importantly, does not add the container name there.

Explicitly instruct podman (and docker) to add a

Fixes: https://tracker.ceph.com/issues/49890
Signed-off-by: Sage Weil <sage@newdream.net>
src/cephadm/cephadm