]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
vstart.sh: use output of hostname for cephadm 35813/head
authorPatrick Donnelly <pdonnell@redhat.com>
Sat, 27 Jun 2020 17:49:08 +0000 (10:49 -0700)
committerPatrick Donnelly <pdonnell@redhat.com>
Tue, 30 Jun 2020 14:13:07 +0000 (07:13 -0700)
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>
src/vstart.sh

index b23f80cab96c9ed619f2b8cc557f931a084a4bca..49339b8810d78da6526fb500e3703d71d823b45a 100755 (executable)
@@ -992,7 +992,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