From: Patrick Donnelly Date: Sat, 27 Jun 2020 17:49:08 +0000 (-0700) Subject: vstart.sh: use output of hostname for cephadm X-Git-Tag: v15.2.5~136^2~5 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=d705718f0ca89f28f37c232d85ab91fa6e908006;p=ceph.git vstart.sh: use output of hostname for cephadm Otherwise I get this error on a dev machine: /home/pdonnell/ceph/build/bin/ceph -c /home/pdonnell/ceph/build/ceph.conf -k /home/pdonnell/ceph/build/keyring orch host add senta03 Error ENOENT: New host senta03 (senta03) failed check: ['INFO:cephadm:podman|docker (/bin/podman) is present', 'INFO:cephadm:systemctl is present', 'INFO:cephadm:lvcreate is present', 'INFO:cephadm:Unit chronyd.service is enabled and running', 'INFO:cephadm:Hostname "senta03" matches what is expected.', 'ERROR: hostname "senta03.front.sepia.ceph.com" does not match expected hostname "senta03"'] If `hostname` is configured to give the fqdn, we get the above error from cephadm. Signed-off-by: Patrick Donnelly (cherry picked from commit 4aba413337e4f9041ade9b5b9e9daee9a08eb419) --- diff --git a/src/vstart.sh b/src/vstart.sh index 0fd752d62f11..9b50348b5d6d 100755 --- a/src/vstart.sh +++ b/src/vstart.sh @@ -986,7 +986,7 @@ EOF ceph_adm config-key set mgr/cephadm/ssh_identity_pub -i ~/.ssh/id_rsa.pub ceph_adm mgr module enable cephadm ceph_adm orch set backend cephadm - ceph_adm orch host add $HOSTNAME + ceph_adm orch host add "$(hostname)" ceph_adm orch apply crash '*' ceph_adm config set mgr mgr/cephadm/allow_ptrace true fi