add nbd module to init script

Bug #1531171 reported by Ben Howard on 2016-01-05
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
launchpad-buildd
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

Scott Moser (smoser) wrote :

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.

Colin Watson (cjwatson) on 2016-01-05
description: updated
Changed in launchpad-buildd:
status: New → In Progress
importance: Undecided → High
assignee: nobody → Colin Watson (cjwatson)
Colin Watson (cjwatson) on 2016-01-08
Changed in launchpad-buildd:
status: In Progress → Fix Committed
Colin Watson (cjwatson) wrote :

launchpad-buildd (137) trusty; urgency=medium

  * Remove handling for pre-karmic versions of Twisted that didn't support
    --umask.
  * Stop cleaning /var/log/launchpad-buildd/ from cron; logrotate handles
    that now.
  * Configure systemd-timesyncd to use the NTP server configured in
    /etc/launchpad-buildd/default.
  * Try to load the nbd module when starting launchpad-buildd
    (LP: #1531171).
  * buildrecipe: Add option parsing framework.
  * Use git-build-recipe to run git-based recipe builds (LP: #1453022).

 -- Colin Watson <email address hidden> Mon, 18 Jan 2016 11:50:05 +0000

Changed in launchpad-buildd:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers