Bug #59082
closedcephadm: cephadm does not handle services that are not supported on image being bootstrapped well
0%
Description
During bootstrap, there are some services we will try to apply if certain flags are or are not passed. However, since it's common, at least prior to the compile cephadm work which is landing in reef, for users to pull cephadm from github. This means the cephadm binary might be coded thinking certain services exist, while they aren't actually there in the image being bootstrapped. This has happened recently with ceph-exporter. Trying to bootstrap with the latest quincy version of the binary results in
Deploying ceph-exporter service with default placement... Non-zero exit code 22 from /usr/bin/podman run --rm --ipc=host --stop-signal=SIGTERM --net=host --entrypoint /usr/bin/ceph --init -e CONTAINER_IMAGE=quay.io/ceph/ceph:v17 -e NODE_NAME=ceph-01 -e CEPH_USE_RANDOM_NONCE=1 -v /var/log/ceph/e460fb6a-c315-11ed-8abc-02000a52470b:/var/log/ceph:z -v /tmp/ceph-tmpdj4jpaw8:/etc/ceph/ceph.client.admin.keyring:z -v /tmp/ceph-tmpqrstws24:/etc/ceph/ceph.conf:z quay.io/ceph/ceph:v17 orch apply ceph-exporter /usr/bin/ceph: stderr Error EINVAL: Usage: /usr/bin/ceph: stderr ceph orch apply -i <yaml spec> [--dry-run] /usr/bin/ceph: stderr ceph orch apply <service_type> [--placement=<placement_string>] [--unmanaged] /usr/bin/ceph: stderr Traceback (most recent call last): File "/usr/local/bin/cephadm", line 9653, in <module> main() File "/usr/local/bin/cephadm", line 9641, in main r = ctx.func(ctx) ^^^^^^^^^^^^^ File "/usr/local/bin/cephadm", line 2205, in _default_image return func(ctx) ^^^^^^^^^ File "/usr/local/bin/cephadm", line 5774, in command_bootstrap prepare_ssh(ctx, cli, wait_for_mgr_restart) File "/usr/local/bin/cephadm", line 5275, in prepare_ssh cli(['orch', 'apply', t]) File "/usr/local/bin/cephadm", line 5714, in cli ).run(timeout=timeout, verbosity=verbosity) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/local/bin/cephadm", line 4144, in run out, _, _ = call_throws(self.ctx, self.run_cmd(), ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/local/bin/cephadm", line 1853, in call_throws raise RuntimeError('Failed command: %s' % ' '.join(command)) RuntimeError: Failed command: /usr/bin/podman run --rm --ipc=host --stop-signal=SIGTERM --net=host --entrypoint /usr/bin/ceph --init -e CONTAINER_IMAGE=quay.io/ceph/ceph:v17 -e NODE_NAME=ceph-01 -e CEPH_USE_RANDOM_NONCE=1 -v /var/log/ceph/e460fb6a-c315-11ed-8abc-02000a52470b:/var/log/ceph:z -v /tmp/ceph-tmpdj4jpaw8:/etc/ceph/ceph.client.admin.keyring:z -v /tmp/ceph-tmpqrstws24:/etc/ceph/ceph.conf:z quay.io/ceph/ceph:v17 orch apply ceph-exporter
and the bootstrap fails. That is because the current latst quincy release (17.2.5) does not support the ceph-exporter, but the latest quincy code for the cephadm binary does (ceph-exporter will be available in 17.2.6). Cephadm should handle these types of mismatches where possible.
Updated by Adam King about 1 year ago
- Status changed from In Progress to Pending Backport
Updated by Backport Bot about 1 year ago
- Copied to Backport #59302: quincy: cephadm: cephadm does not handle services that are not supported on image being bootstrapped well added
Updated by Adam King about 1 year ago
- Status changed from Pending Backport to Resolved
resolved, but not until after the 17.2.6 release