cephadm logs an invalid stat command
When I run "cephadm bootstrap", I see the following in the log:
INFO:cephadm:Extracting ceph user uid/gid from container image... DEBUG:cephadm:['/usr/bin/podman', 'run', '--rm', '--net=host', '-e', 'CONTAINER_IMAGE=registry.opensuse.org/filesystems/ceph/octopus/images/ceph/ceph', '-e', 'NODE_NAME=admin', '--entrypoint', 'stat', 'registry.opensuse.org/filesystems/ceph/octopus/images/ceph/ceph', '-c', '%u %g', '/var/lib/ceph'] DEBUG:cephadm:Running command: /usr/bin/podman run --rm --net=host -e CONTAINER_IMAGE=registry.opensuse.org/filesystems/ceph/octopus/images/ceph/ceph -e NODE_NAME=admin --entrypoint stat registry.opensuse.org/filesystems/ceph/octopus/images/ceph/ceph -c %u %g /var/lib/ceph
But the actual command being run is:
"/usr/bin/podman" "run" "--rm" "--net=host" "-e" "CONTAINER_IMAGE=registry.opensuse.org/filesystems/ceph/octopus/images/ceph/ceph" "-e" "NODE_NAME=admin" "--entrypoint stat registry.opensuse.org/filesystems/ceph/octopus/images/ceph/ceph" "-c" "%u %g" "/var/lib/ceph"
This is important because
stat -c %u %g /var/lib/ceph is syntactically incorrect and will produce an error if you try to run it by copying the command as cephadm logs it.
#8 Updated by Nathan Cutler 8 months ago
- Status changed from Need More Info to In Progress
- Priority changed from Normal to Low
I still have this on my plate. The "fix" here is to include the double quotes in the log message. This isn't a bug per se (cephadm issues the command with double quotes, but logs it without).