]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
vstart.sh: use output of hostname for cephadm
authorPatrick Donnelly <pdonnell@redhat.com>
Sat, 27 Jun 2020 17:49:08 +0000 (10:49 -0700)
committerSebastian Wagner <sebastian.wagner@suse.com>
Wed, 15 Jul 2020 08:50:52 +0000 (10:50 +0200)
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 <pdonnell@redhat.com>
(cherry picked from commit 4aba413337e4f9041ade9b5b9e9daee9a08eb419)

src/vstart.sh

index 0fd752d62f11f5803595aed16888b16c5ffa971c..9b50348b5d6d264886c3d257d4be0b69611dbd64 100755 (executable)
@@ -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