]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commit
ceph-disk: trigger must ensure device ownership
authorLoic Dachary <ldachary@redhat.com>
Tue, 22 Nov 2016 14:26:18 +0000 (15:26 +0100)
committerLoic Dachary <ldachary@redhat.com>
Mon, 5 Dec 2016 08:51:05 +0000 (09:51 +0100)
commite16d756f7def5a3c31878f0f2a422a99e985f787
tree04ce9fde4efcb81412bd5e2cf3ca5ea84ff711d6
parent93e671984b9062b3882d34910a439f99486b5d56
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>
(cherry picked from commit 72f0b2aa1eb4b7b2a2222c2847d26f99400a8374)
src/ceph-disk/ceph_disk/main.py