buildd cloud-images used by Multipass/Snapcraft do not clear /var/lib/dbus/machine-id

Bug #1999415 reported by Christopher Townsend
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Simon Poirier

Bug Description

The Multipass Team has had multiple reports over time of the same IP address being assigned the instances from the same `buildd` series. A user did some digging and reported this:

After some further investigation, the ` /var/lib/dbus/machine-id` file has data in it and is the cause of the issue.

Revision history for this message
John Chittum (jchittum) wrote :

most images using livecd-rootfs include udev, dbus, and a kernel of some sort during the bootstrap phase. Turns out, as a step during the lb_config phase, a series of cleanup actions are taken:

add_chroot_hook update-apt-file-cache
add_chroot_hook update-apt-xapian-index
add_chroot_hook update-mlocate-database
add_chroot_hook remove-dbus-machine-id
add_chroot_hook remove-openssh-server-host-keys
add_chroot_hook remove-udev-persistent-rules

These hooks exist in upstream live-build, which Ubuntu syncs source:

These steps are run after lb_bootstrap during lb_config, before lb_hooks. buildd is a special beast, as its seeds do not contain udev , dbus, or a kernel. buildd was originally designed to run in a container, and didn’t have requirements for those items. however, Bootable Buildd, as a virtual machine, installs them during a the build hook

What ends up happening is the cleanup of /var/lib/dbus/machine never occurs in buildd. and that’s a problem.

We should also check the other cleanup scripts in referenced in livecd-rootfs, pull from live-build. They may be causing other issues with the bootable buildd images.

Changed in cloud-images:
status: New → Confirmed
Revision history for this message
John Chittum (jchittum) wrote :

Also added launchpad-buildd to ensure that removing machine-id will not affect launchpad builders

Simon Poirier (simpoir)
Changed in cloud-images:
assignee: nobody → Simon Poirier (simpoir)
Revision history for this message
Dimitri John Ledkov (xnox) wrote :

$ readlink /var/lib/dbus/machine-id

The correct ubuntu implementation should be that dbus machine-id is a symlink to /etc/machine-id. and that /etc/machine-id on the golden image exists, but is an empty file.

This is the case for all our other preinstalled images. This ideally should be universally checked and we must never produce any preinstalled images that have anything else but that.

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.