Project

General

Profile

Bug #48261

cephadm ceph-volume inventory -- --format json-pretty: INFO:cephadm:/usr/bin/podman:stderr ceph-volume inventory: error:

Added by Sebastian Wagner about 2 months ago. Updated 11 days ago.

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

0%

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

Description

#/usr/sbin/cephadm ceph-volume inventory -- --format json-pretty
INFO:cephadm:Inferring fsid aceca220-084a-11eb-9539-0017a477f032
INFO:cephadm:Using recent ceph image registry.suse.com/ses/7/ceph/ceph:latest
INFO:cephadm:/usr/bin/podman:stderr WARNING: The same type, major and minor should not be used for multiple devices.
INFO:cephadm:/usr/bin/podman:stderr usage: ceph-volume inventory [-h] [--format {plain,json,json-pretty}]
INFO:cephadm:/usr/bin/podman:stderr                              [--filter-for-batch]
INFO:cephadm:/usr/bin/podman:stderr                              [path]
INFO:cephadm:/usr/bin/podman:stderr ceph-volume inventory: error: unrecognized arguments: json-pretty
Traceback (most recent call last):
  File "/usr/sbin/cephadm", line 5758, in <module>
    r = args.func()
  File "/usr/sbin/cephadm", line 1136, in _infer_fsid
    return func()
  File "/usr/sbin/cephadm", line 1195, in _infer_image
    return func()
  File "/usr/sbin/cephadm", line 3335, in command_ceph_volume
    out, err, code = call_throws(c.run_cmd(), verbose=True)
  File "/usr/sbin/cephadm", line 874, in call_throws
    raise RuntimeError('Failed command: %s' % ' '.join(command))
RuntimeError: Failed command: /usr/bin/podman run --rm --net=host --ipc=host --privileged --group-add=disk -e CONTAINER_IMAGE=registry.suse.com/ses/7/ceph/ceph:latest -e NODE_NAME=sesblade10 -v /var/run/ceph/aceca220-084a-11eb-9539-0017a477f032:/var/run/ceph:z -v /var/log/ceph/aceca220-084a-11eb-9539-0017a477f032:/var/log/ceph:z -v /var/lib/ceph/aceca220-084a-11eb-9539-0017a477f032/crash:/var/lib/ceph/crash:z -v /dev:/dev -v /run/udev:/run/udev -v /sys:/sys -v /run/lvm:/run/lvm -v /run/lock/lvm:/run/lock/lvm --entrypoint /usr/sbin/ceph-volume registry.suse.com/ses/7/ceph/ceph:latest inventory -- --format json-pretty

The problem is the '--' in the generated `podman run .. ceph-volume [IMAGE] inventory` command. Manually removing these dashes, allows the command to run successfully. In other words:

FAILS: ceph-volume inventory -- --format json-pretty
WORKS: ceph-volume inventory --format json-pretty

History

#1 Updated by Dimitri Savineau about 2 months ago

It's kind of expected.

Why one would pass "--" to the cephadm ceph-volume command ?

I mean, using cephadm ceph-volume xxxx will run a container using ceph-volume as the entrypoint and xxxx as command args. And because ceph-volume doesn't support '--' it fails.

Am I missing something here ?

#2 Updated by Sebastian Wagner about 1 month ago

Right, the problem seems to be that we're generating the wrong command. Otoh, I haven't seen this in a while. I'm not sure we have a bug at all here.

#3 Updated by Jean Wasilewski 11 days ago

Not entirely sure how to reproduce properly but I hope this might help.
I encountered the same issue with the following scenario:
  • Start an upgrade to 15.2.8 (from 15.2.5) with `ceph orch upgrade start --ceph-version 15.2.8`
  • Stop after mon are upgraded but not OSD
  • Try to restart an OSD with `ceph orch daemon redeploy osd.3`
  • The error message should arrive

Also available in: Atom PDF