Project

General

Profile

Bug #44830

cpehadm bootstrap: improve error message, if `host add` fails

Added by Sebastian Wagner almost 4 years ago. Updated almost 4 years ago.

Status:
Duplicate
Priority:
Normal
Assignee:
-
Category:
cephadm (binary)
Target version:
-
% Done:

0%

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

Description

 sudo cephadm bootstrap --mon-ip 51.38.177.40 --skip-mon-network
INFO:cephadm:Verifying podman|docker is present...
INFO:cephadm:Verifying lvm2 is present...
INFO:cephadm:Verifying time synchronization is in place...
INFO:cephadm:Unit ntp.service is enabled and running
INFO:cephadm:Repeating the final host check...
INFO:cephadm:podman|docker (/usr/bin/podman) is present
INFO:cephadm:systemctl is present
INFO:cephadm:lvcreate is present
INFO:cephadm:Unit ntp.service is enabled and running
INFO:cephadm:Host looks OK
INFO:root:Cluster fsid: 008d3602-7326-11ea-ba3d-fa163ee4dee1
INFO:cephadm:Verifying IP 51.38.177.40 port 3300 ...
INFO:cephadm:Verifying IP 51.38.177.40 port 6789 ...
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: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:Creating mgr...
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:mgr not available, waiting (3/10)...
INFO:cephadm:mgr not available, waiting (4/10)...
INFO:cephadm:mgr not available, waiting (5/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 vps767688...
INFO:cephadm:Non-zero exit code 2 from /usr/bin/podman run --rm --net=host -e CONTAINER_IMAGE=docker.io/ceph/ceph:v15 -e NODE_NAME=vps767688 -v /var/log/ceph/008d3602-7326-11ea-ba3d-fa163ee4dee1:/var/log/ceph:z -v /tmp/ceph-tmpwsrur6qb:/etc/ceph/ceph.client.admin.key
ring:z -v /tmp/ceph-tmpwfhyqpvq:/etc/ceph/ceph.conf:z --entrypoint /usr/bin/ceph docker.io/ceph/ceph:v15 orch host add vps767688
INFO:cephadm:/usr/bin/ceph:stderr Error ENOENT: Failed to connect to vps767688 (vps767688).  Check that the host is reachable and accepts connections using the cephadm SSH key
Traceback (most recent call last):
  File "/usr/sbin/cephadm", line 4245, in <module>
    r = args.func()
  File "/usr/sbin/cephadm", line 966, in _default_image
    return func()
  File "/usr/sbin/cephadm", line 2378, in command_bootstrap
    cli(['orch', 'host', 'add', host])
  File "/usr/sbin/cephadm", line 2239, in cli
    ).run(timeout=timeout)
  File "/usr/sbin/cephadm", line 1972, in run
    self.run_cmd(), desc=self.entrypoint, timeout=timeout)
  File "/usr/sbin/cephadm", line 694, in call_throws
    raise RuntimeError('Failed command: %s' % ' '.join(command))
RuntimeError: Failed command: /usr/bin/podman run --rm --net=host -e CONTAINER_IMAGE=docker.io/ceph/ceph:v15 -e NODE_NAME=vps767688 -v /var/log/ceph/008d3602-7326-11ea-ba3d-fa163ee4dee1:/var/log/ceph:z -v /tmp/ceph-tmpwsrur6qb:/etc/ceph/ceph.client.admin.keyring:z -v
 /tmp/ceph-tmpwfhyqpvq:/etc/ceph/ceph.conf:z --entrypoint /usr/bin/ceph docker.io/ceph/ceph:v15 orch host add vps767688

We should provide a better error message, if the user needs to setup a custom ssh config when calling bootstrap.

e.g. add `--skip-ssh` and then later run

cpeh orch set backend cephadm
cpeh cephadm set-ssh-config -i ...
cpeh orch add host $(hostname)

Related issues

Related to Orchestrator - Bug #45097: cephadm: UX: Traceback, if `orch host add mon1` fails. Resolved

History

#1 Updated by Sebastian Wagner almost 4 years ago

  • Related to Bug #45097: cephadm: UX: Traceback, if `orch host add mon1` fails. added

#2 Updated by Sebastian Wagner almost 4 years ago

  • Status changed from New to Duplicate

Also available in: Atom PDF