cephadm: use dashes for container names
podman adds the current container name to the /etc/hosts
file. Turns out, python's `socket.getfqdn()` differs from
`hostname -f`, when we have the container names containing
dots in it.:
[root@sebastians-laptop /]# cat /etc/hosts
127.0.0.1 localhost
::1 localhost
127.0.1.1 sebastians-laptop foo.bar.baz.com
[root@sebastians-laptop /]# hostname -f
sebastians-laptop
[root@sebastians-laptop /]# python3 -c 'import socket; print(socket.getfqdn())'
foo.bar.baz.com
Fascinatingly, this doesn't happen when using dashes.
Fixes: https://tracker.ceph.com/issues/51590
Signed-off-by: Sebastian Wagner <sewagner@redhat.com>
(cherry picked from commit
67abea15b12c1a60a9da2db35e3470d8d8a128f7)