Project

General

Profile

Bug #6138

'ceph-deploy disk list' fails on CentOS 6.4

Added by Bryan Stillwell over 10 years ago. Updated over 10 years ago.

Status:
Resolved
Priority:
Urgent
Assignee:
Category:
-
Target version:
-
% Done:

0%

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

Description

When attempting to run 'ceph-deploy disk list den2ceph003' I get the follow error message:

$ ceph-deploy disk list den2ceph003
[ceph_deploy.osd][DEBUG ] Listing disks on den2ceph003...
[ceph_deploy.osd][ERROR ] disk list failed: [Errno 2] No such file or directory

Further testing showed that I could run 'ceph-disk list' on den2ceph003, but doing it through ssh didn't work:

$ ssh den2ceph003 'ceph-disk list'
bash: ceph-disk: command not found

I was able to track this down to /sbin and /usr/sbin not being in the path for non-interactive logins:

$ ssh den2ceph003 'echo $PATH'
/usr/local/bin:/bin:/usr/bin:/opt/dell/srvadmin/bin

But it's there for interactive logins:

[ceph@den2ceph003 ~]$ echo $PATH
/usr/local/bin:/bin:/usr/bin:/usr/local/sbin:/usr/sbin:/sbin:/opt/dell/srvadmin/bin:/home/ceph/bin

I was able to workaround the issue by creating a script in /etc/profile.d which did the following:

if ! echo ${PATH} | /bin/grep -q ':/sbin' ; then
PATH=${PATH}:/sbin
fi
if ! echo ${PATH} | /bin/grep -q ':/usr/sbin' ; then
PATH=${PATH}:/usr/sbin
fi

One solution would be to have ceph-deploy use absolute paths instead of relying on the path being correct.

History

#1 Updated by Ian Colle over 10 years ago

  • Assignee set to Alfredo Deza
  • Priority changed from Normal to Urgent

#2 Updated by Alfredo Deza over 10 years ago

  • Status changed from New to In Progress

#3 Updated by Alfredo Deza over 10 years ago

  • Status changed from In Progress to Fix Under Review

#4 Updated by Alfredo Deza over 10 years ago

  • Status changed from Fix Under Review to Resolved

Merged to ceph-deploy master branch

Hash: 69a765cfa94716813e5d77aa910c3ad21951b93b

Now the $PATH is always passed in as part of the remote command, so all other commands that use the `check_call` helper will benefit from this as well.

Also available in: Atom PDF