]> git.apps.os.sepia.ceph.com Git - ceph.git/commit
ceph-disk: run the right executables from udev 1156/head
authorJosh Durgin <josh.durgin@inktank.com>
Wed, 29 Jan 2014 01:26:58 +0000 (17:26 -0800)
committerJosh Durgin <josh.durgin@inktank.com>
Wed, 29 Jan 2014 01:27:21 +0000 (17:27 -0800)
commitd7b0c7faafd37e4ae8a1680edfa60c22b419cbd8
tree617eca2362d9b15105b2b9e84304c8947e326ef4
parentf1b5309356da26803238610a6ca14265e0176730
ceph-disk: run the right executables from udev

When run by the udev rules, PATH is not defined. Thus,
ceph-disk-activate relies on its which() function to locate the
correct executable.  The which() function used os.defpath if none was
set, and this worked for anything using it.

ad6b4b4b08b6ef7ae8086f2be3a9ef521adaa88c added a new default value to
PATH, so only /usr/bin was checked by callers that did not use
which(). This resulted in the mount command not being found when
ceph-disk-activate was run by udev, and thus osds failing to start
after being prepared by ceph-deploy.

Make ceph-disk consistently use the existing helpers (command() and
command_check_call()) that use which(), so lack of PATH does not
matter. Simplify _check_output() to use command(),
another wrapper around subprocess.Popen.

Fixes: #7258
Signed-off-by: Josh Durgin <josh.durgin@inktank.com>
src/ceph-disk