vaultlocker does not ensure that udev is triggered to create /dev/disk/by-uuid/<uuid-in-luks-header> symlink and fails
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
vaultlocker |
Fix Released
|
Critical
|
James Page | ||
cryptsetup (Ubuntu) |
Incomplete
|
Undecided
|
Unassigned | ||
lvm2 (Ubuntu) |
Incomplete
|
Undecided
|
Unassigned | ||
systemd (Ubuntu) |
Invalid
|
Undecided
|
Unassigned |
Bug Description
When an encrypted device is setup up a UUID (osd_fsid) is passed from the charm to be used in the cryptsetup command which accepts a UUID to place into the LUKS header (shown in cryptsetup luksDump <path-to-
https:/
UUID comes from osd_fsid
https:/
# else statement is used here
block_uuid = str(uuid.uuid4()) if not args.uuid else args.uuid
dmcrypt.
# ...
dmcrypt.
This UUID is visible in blkid output
/dev/sdc: UUID="<
and a udev rule exists to create a /dev/disk/
https:/
ENV{ID_
Where vaultlocker fails is in luks_open command (right after luks_format)
# cryptsetup --batch-mode --key-file - open UUID=<luks-
because it tries to access /dev/disk/
This happens since udev rules are not re-triggered to create this symlink after a LUKS device is created.
Solution: call the command below after luks_format before luks_open
udevadm settle --exit-
Changed in vaultlocker: | |
status: | New → Confirmed |
assignee: | nobody → David Ames (thedac) |
Changed in vaultlocker: | |
status: | In Progress → Fix Released |
Changed in vaultlocker: | |
status: | Fix Released → In Progress |
assignee: | David Ames (thedac) → James Page (james-page) |
importance: | Undecided → Critical |
Changed in vaultlocker: | |
status: | In Progress → Fix Released |
tags: | added: id-5b9a8473a5864f4a45e1c7b6 |
tags: | added: fr-630 |
Subscribed ~field-critical as this blocks a deployment in-progress.
The bug has been discussed in field-support (status added for awareness/ filtering) .