Project

General

Profile

Bug #44559

cephadm logs an invalid stat command

Added by Nathan Cutler 9 months ago. Updated 4 months ago.

Status:
In Progress
Priority:
Low
Assignee:
Category:
-
Target version:
-
% Done:

0%

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

Description

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.

History

#1 Updated by Nathan Cutler 9 months ago

  • Description updated (diff)
  • Status changed from New to Fix Under Review
  • Pull request ID set to 33881

#2 Updated by Kristoffer Gronlund 9 months ago

Shouldn't that be

stat -c "%u %g" /var/lib/ceph

?

Seems like a strange thing to differ between distributions..

#3 Updated by Nathan Cutler 9 months ago

  • Subject changed from cephadm tries to run invalid "stat" command inside the ceph container to cephadm logs an invalid stat command
  • Description updated (diff)

#4 Updated by Nathan Cutler 9 months ago

Thanks Kris - updated the bug description.

#5 Updated by Nathan Cutler 9 months ago

  • Status changed from Fix Under Review to New
  • Pull request ID deleted (33881)

#6 Updated by Sebastian Wagner 9 months ago

just to clarify,

stat -c %u %g /var/lib/ceph

is incorrect and

stat -c "%u %g" /var/lib/ceph

is correct?

#7 Updated by Sebastian Wagner 8 months ago

  • Status changed from New to Need More Info

#8 Updated by Nathan Cutler 4 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).

Also available in: Atom PDF