add nbd module to init script
Bug #1531171 reported by
Ben Howard
This bug affects 1 person
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
launchpad-buildd |
Fix Released
|
High
|
Colin Watson |
Bug Description
The Cloud Team is moving builds from KVM-based builders to buildds in Launchpad. Some of the targets that we build are derivatives of the upstream cloud image and are variants of disk formats (i.e. VMDK, VHD, VDI, etc). One of the targets. Further, the MAAS image generation code uses qemu-nbd. In order to facilitate all Cloud image deliverables being generated in buildds we would like the nbd module to be loaded in the buildd host.
i.e.
modprobe nbd || true
Related branches
lp:~cjwatson/launchpad-buildd/modprobe-nbd
- William Grant (community): Approve (code)
-
Diff: 26 lines (+6/-0)2 files modifieddebian/changelog (+2/-0)
debian/launchpad-buildd.init (+4/-0)
description: | updated |
Changed in launchpad-buildd: | |
status: | New → In Progress |
importance: | Undecided → High |
assignee: | nobody → Colin Watson (cjwatson) |
Changed in launchpad-buildd: | |
status: | In Progress → Fix Committed |
To post a comment you must log in.
for justification, the maas build process basically does this:
qemu-img create -f qcow2 -b pristine- readonly. img trash.img
qemu-nbd --connect /dev/nbd0 trash.img
mount /dev/nbd0 /mnt
chroot /mnt apt-get install ....
cp /mnt/boot/vmlinuz .
umount /mnt
rm -f trash.img
we dont *need* it, but using qemu-nbd there is faster at least initially then copying 'pristine- readonly. img' which may be large. If loading nbd was non-trivial for security or some other reason then i'd be fine to work around that.
note, selection of a /dev/nbd0 is done by mount-image- callback, which attempts to find an unused device and clean up after.