]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commit
ceph-disk: trigger must ensure device ownership 12132/head 12136/head
authorLoic Dachary <ldachary@redhat.com>
Tue, 22 Nov 2016 14:26:18 +0000 (15:26 +0100)
committerLoic Dachary <ldachary@redhat.com>
Tue, 22 Nov 2016 14:29:25 +0000 (15:29 +0100)
commit72f0b2aa1eb4b7b2a2222c2847d26f99400a8374
tree554006c88f8d7886c051817a3e984daae9acfd8a
parentd954de5546ea34a07c1e4234b07c1cef6ab74463
ceph-disk: trigger must ensure device ownership

The udev rules that set the owner/group of the OSD devices are racing
with 50-udev-default.rules and depending on which udev event fires last,
ownership may not be as expected.

Since ceph-disk trigger --sync runs as root, always happens after
dm/lvm/filesystem units are complete and before activation, it is a good
time to set the ownership of the device.

It does not eliminate all races: a script running after systemd
local-fs.target and firing a udev event may create a situation where the
permissions of the device are temporarily reverted while the activation
is running.

Fixes: http://tracker.ceph.com/issues/17813
Signed-off-by: Loic Dachary <loic@dachary.org>
src/ceph-disk/ceph_disk/main.py