Set ownership of OSD partitions in a udev rule of its own #109
Reference in New Issue
Block a user
No description provided.
Delete Branch "koolkhel/vitastor:udev-owner-rule"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Description
udev skips every key of a rule whose
IMPORT{program}fails,OWNERandGROUPincluded, andvitastor-disk udevexits 1 when it rejects the superblock. A freshly added partition whose check failed stayedroot:disk, and an OSD opening it as user vitastor got EACCES. This happens with dm-multipath: the dm partition's ready event is checked while/dev/disk/by-partuuidstill points at the path partition. Assign ownership by partition type alone (inmon/scripts/anddocker/); the alias symlink and the OSD start still need a valid superblock.Tested:
udevadm teston systemd 249 and 252 with a failing IMPORT — before: no OWNER/GROUP/SYMLINK; after: OWNER/GROUP applied, SYMLINK not. On a VM, a partition re-added by PCI remove/rescan while another device carried its PARTUUID came backroot:diskbefore and owned by the OSD user after.Contributor Name
Yury Luneff (MIND Software LLC, https://mindsw.io)
CLA
udev skips every key of a rule whose IMPORT{program} fails, OWNER and GROUP included, and vitastor-disk udev exits 1 when it rejects the superblock. A freshly added partition whose check failed stayed root:disk, and an OSD opening it as user vitastor got EACCES. This happens with dm-multipath: the dm partition's ready event is checked while by-partuuid still points at the path partition. Assign ownership by partition type alone; the alias symlink still needs a valid superblock.