Project

General

Profile

Bug #45097

cephadm: UX: Traceback, if `orch host add mon1` fails.

Added by Sebastian Wagner 6 months ago. Updated 3 months ago.

Status:
Resolved
Priority:
High
Assignee:
Category:
cephadm (binary)
Target version:
% Done:

0%

Source:
Tags:
low-hanging-fruit ux
Backport:
Regression:
No
Severity:
3 - minor
Reviewed:
Affected Versions:
ceph-qa-suite:
Pull request ID:
Crash signature:

Description

This should not show a Traceback:

[root@mon1 ~]# cephadm bootstrap --mon-ip 10.10.101.5
INFO:cephadm:Verifying podman|docker is present...
INFO:cephadm:Verifying lvm2 is present...
INFO:cephadm:Verifying time synchronization is in place...
INFO:cephadm:Unit chronyd.service is enabled and running
INFO:cephadm:Repeating the final host check...
INFO:cephadm:podman|docker (/bin/docker) is present
INFO:cephadm:systemctl is present
INFO:cephadm:lvcreate is present
INFO:cephadm:Unit chronyd.service is enabled and running
INFO:cephadm:Host looks OK
INFO:root:Cluster fsid: f8edc08a-7f17-11ea-8707-000c2915dd98
INFO:cephadm:Verifying IP 10.10.101.5 port 3300 ...
INFO:cephadm:Verifying IP 10.10.101.5 port 6789 ...
INFO:cephadm:Mon IP 10.10.101.5 is in CIDR network 10.0.0.0/8
INFO:cephadm:Pulling latest docker.io/ceph/ceph:v15 container...
INFO:cephadm:Extracting ceph user uid/gid from container image...
INFO:cephadm:Creating initial keys...
INFO:cephadm:Creating initial monmap...
INFO:cephadm:Creating mon...
INFO:cephadm:Non-zero exit code 1 from /bin/firewall-cmd --permanent --query-service ceph-mon
INFO:cephadm:/bin/firewall-cmd:stdout no
INFO:cephadm:Enabling firewalld service ceph-mon in current zone...
INFO:cephadm:Waiting for mon to start...
INFO:cephadm:Waiting for mon...
INFO:cephadm:Assimilating anything we can from ceph.conf...
INFO:cephadm:Generating new minimal ceph.conf...
INFO:cephadm:Restarting the monitor...
INFO:cephadm:Setting mon public_network...
INFO:cephadm:Creating mgr...
INFO:cephadm:Non-zero exit code 1 from /bin/firewall-cmd --permanent --query-service ceph
INFO:cephadm:/bin/firewall-cmd:stdout no
INFO:cephadm:Enabling firewalld service ceph in current zone...
INFO:cephadm:Non-zero exit code 1 from /bin/firewall-cmd --permanent --query-port 8080/tcp
INFO:cephadm:/bin/firewall-cmd:stdout no
INFO:cephadm:Enabling firewalld port 8080/tcp in current zone...
INFO:cephadm:Non-zero exit code 1 from /bin/firewall-cmd --permanent --query-port 8443/tcp
INFO:cephadm:/bin/firewall-cmd:stdout no
INFO:cephadm:Enabling firewalld port 8443/tcp in current zone...
INFO:cephadm:Non-zero exit code 1 from /bin/firewall-cmd --permanent --query-port 9283/tcp
INFO:cephadm:/bin/firewall-cmd:stdout no
INFO:cephadm:Enabling firewalld port 9283/tcp in current zone...
INFO:cephadm:Wrote keyring to /etc/ceph/ceph.client.admin.keyring
INFO:cephadm:Wrote config to /etc/ceph/ceph.conf
INFO:cephadm:Waiting for mgr to start...
INFO:cephadm:Waiting for mgr...
INFO:cephadm:mgr not available, waiting (1/10)...
INFO:cephadm:mgr not available, waiting (2/10)...
INFO:cephadm:Enabling cephadm module...
INFO:cephadm:Waiting for the mgr to restart...
INFO:cephadm:Waiting for Mgr epoch 5...
INFO:cephadm:Setting orchestrator backend to cephadm...
INFO:cephadm:Generating ssh key...
INFO:cephadm:Wrote public SSH key to to /etc/ceph/ceph.pub
INFO:cephadm:Adding key to root@localhost's authorized_keys...
INFO:cephadm:Adding host mon1...
INFO:cephadm:Non-zero exit code 2 from /bin/docker run --rm --net=host -e CONTAINER_IMAGE=docker.io/ceph/ceph:v15 -e NODE_NAME=mon1 -v /var/log/ceph/f8edc08a-7f17-11ea-8707-000c2915dd98:/var/log/ceph:z -v /tmp/ceph-tmp7k819c_n:/etc/ceph/ceph.client.admin.keyring:z -v /tmp/ceph-tmp8_mtgn16:/etc/ceph/ceph.conf:z --entrypoint /usr/bin/ceph docker.io/ceph/ceph:v15 orch host add mon1
INFO:cephadm:/usr/bin/ceph:stderr Error ENOENT: Failed to connect to mon1 (mon1).  Check that the host is reachable and accepts connections using the cephadm SSH key
INFO:cephadm:/usr/bin/ceph:stderr you may want to run:
INFO:cephadm:/usr/bin/ceph:stderr > ssh -F =(ceph cephadm get-ssh-config) -i =(ceph config-key get mgr/cephadm/ssh_identity_key) root@mon1
Traceback (most recent call last):
  File "/sbin/cephadm", line 4282, in <module>
    r = args.func()
  File "/sbin/cephadm", line 972, in _default_image
    return func()
  File "/sbin/cephadm", line 2382, in command_bootstrap
    cli(['orch', 'host', 'add', host])
  File "/sbin/cephadm", line 2243, in cli
    ).run(timeout=timeout)
  File "/sbin/cephadm", line 1976, in run
    self.run_cmd(), desc=self.entrypoint, timeout=timeout)
  File "/sbin/cephadm", line 700, in call_throws
    raise RuntimeError('Failed command: %s' % ' '.join(command))
RuntimeError: Failed command: /bin/docker run --rm --net=host -e CONTAINER_IMAGE=docker.io/ceph/ceph:v15 -e NODE_NAME=mon1 -v /var/log/ceph/f8edc08a-7f17-11ea-8707-000c2915dd98:/var/log/ceph:z -v /tmp/ceph-tmp7k819c_n:/etc/ceph/ceph.client.admin.keyring:z -v /tmp/ceph-tmp8_mtgn16:/etc/ceph/ceph.conf:z --entrypoint /usr/bin/ceph docker.io/ceph/ceph:v15 orch host add mon1

Also,

ssh -F =(ceph cephadm get-ssh-config) -i =(ceph config-key get mgr/cephadm/ssh_identity_key)

is a zshism, which often doesn't work.

Also, we should point to the docs

Prio = high, as it creats lots of support


Related issues

Related to Orchestrator - Documentation #44905: cephadm troubleshooting SSH errors Resolved
Related to Orchestrator - Bug #44830: cpehadm bootstrap: improve error message, if `host add` fails Duplicate

History

#1 Updated by Sebastian Wagner 6 months ago

#2 Updated by Sebastian Wagner 6 months ago

  • Description updated (diff)

#3 Updated by Sebastian Wagner 6 months ago

  • Subject changed from cephadm: Traceback, if `orch host add mon1` fails. to cephadm: UX: Traceback, if `orch host add mon1` fails.

#4 Updated by Sebastian Wagner 6 months ago

  • Related to Bug #44830: cpehadm bootstrap: improve error message, if `host add` fails added

#5 Updated by Sebastian Wagner 5 months ago

  • Tags changed from low-hanging-fruit to low-hanging-fruit ux

#6 Updated by Adam King 4 months ago

  • Status changed from New to In Progress
  • Assignee set to Adam King
  • Pull request ID set to 35547

#7 Updated by Kefu Chai 4 months ago

  • Status changed from In Progress to Resolved

#8 Updated by Sebastian Wagner 3 months ago

  • Target version set to v15.2.5

Also available in: Atom PDF