mirror of
https://github.com/ceph/ceph
synced 2025-03-11 02:39:05 +00:00
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>
This commit is contained in:
parent
d954de5546
commit
72f0b2aa1e
@ -4442,6 +4442,8 @@ def main_trigger(args):
|
||||
)
|
||||
return
|
||||
|
||||
if get_ceph_user() == 'ceph':
|
||||
command_check_call(['chown', 'ceph:ceph', args.dev])
|
||||
parttype = get_partition_type(args.dev)
|
||||
partid = get_partition_uuid(args.dev)
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user