livefs: unable to run cryptsetup inside livecd-rootfs

Bug #2013339 reported by Isaac True
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
NemOS Project
Fix Released
High
Isaac True
launchpad-buildd
Fix Released
Low
Unassigned

Bug Description

I'm trying to create a new livecd-rootfs project and build on Launchpad but I'm running into an issue with cryptsetup. Namely I'm getting this error when trying to initialise the disk:

Device /dev/mapper/temporary-cryptsetup-442c22cd-dca6-4b87-957f-1b3a5f6f7cc9_dif does not exist or access denied.

Full cryptsetup command line:

cryptsetup -q --key-file /var/tmp/kiwi_j6vt0i5z --type luks2 --cipher aes-gcm-random --integrity aead --pbkdf pbkdf2 luksFormat /dev/mapper/loop3p8

The source code/merge proposal for building this livecd-rootfs can be found here:

https://code.launchpad.net/~itrue/livecd-rootfs/+git/livecd-rootfs/+merge/439825

I've narrowed it down to this line in the cryptsetup source code:

https://git.launchpad.net/ubuntu/+source/cryptsetup/tree/lib/utils_device.c?h=applied/ubuntu/lunar#n206

After some more debugging, the open() call returns ENOENT. This seems to show that the device file cannot be opened by cryptsetup after the mapping has been successfully initialised. My current thinking is that cryptsetup is creating some device nodes which are blocked for reading by some (cgroups?) security policy on Launchpad.

Cryptsetup seems to have been able to successfully create the device nodes, but it just can't open them afterwards. Is there some way to adjust the security policy to allow these device nodes?

Isaac True (itrue)
description: updated
Colin Watson (cjwatson)
affects: launchpad → launchpad-buildd
Guruprasad (lgp171188)
Changed in launchpad-buildd:
status: New → Triaged
importance: Undecided → Low
Isaac True (itrue)
Changed in nemos:
assignee: nobody → Isaac True (itrue)
importance: Undecided → High
Revision history for this message
Isaac True (itrue) wrote :

This seems to have been resolved as a side effect of some other fix - cannot reproduce anymore as of today.

Changed in nemos:
status: New → Fix Released
Changed in launchpad-buildd:
status: Triaged → Fix Released
Revision history for this message
Dimitri John Ledkov (xnox) wrote :

I don't know when you last tried it but likely after https://code.launchpad.net/~vorlon/launchpad-buildd/+git/launchpad-buildd/+merge/442776 got eventually landed and deployed on all builders and lots of other things were fixed in livecd-rootfs to use actually real /dev not a fake one, lots of stuff w.r.t. loop mounts got resolved.

And dm-crypt likely was fixed as a side-effect. Probably sometime in the last few weeks of mantic (see all the fighting in livecd-rootfs changelog uploads)

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.