Set ownership of OSD partitions in a udev rule of its own #109

Merged
vitalif merged 1 commits from koolkhel/vitastor:udev-owner-rule into master 2026-10-28 00:17:45 +03:00
Contributor

Description

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 /dev/disk/by-partuuid still points at the path partition. Assign ownership by partition type alone (in mon/scripts/ and docker/); the alias symlink and the OSD start still need a valid superblock.

Tested: udevadm test on 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 back root:disk before and owned by the OSD user after.

Contributor Name

Yury Luneff (MIND Software LLC, https://mindsw.io)

CLA

### Description 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 `/dev/disk/by-partuuid` still points at the path partition. Assign ownership by partition type alone (in `mon/scripts/` and `docker/`); the alias symlink and the OSD start still need a valid superblock. Tested: `udevadm test` on 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 back `root:disk` before and owned by the OSD user after. ### Contributor Name Yury Luneff (MIND Software LLC, https://mindsw.io) ### CLA - [x] I accept Vitastor CLA agreement: https://git.yourcmc.ru/vitalif/vitastor/src/branch/master/CLA-en.md
koolkhel added 1 commit 2026-10-26 21:08:22 +03:00
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.
vitalif merged commit bbcfe3e258 into master 2026-10-28 00:17:45 +03:00
Sign in to join this conversation.
No Reviewers
No Label
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: vitalif/vitastor#109
No description provided.