Bug #6138
closed'ceph-deploy disk list' fails on CentOS 6.4
0%
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.