[PKG-Openstack-devel] Bug#789960: Bug#789960: openstack-debian-images: machine-id files are included in resulting images

Sebastian Pipping sebastian at pipping.org
Fri Jun 26 02:47:08 UTC 2015


Hi!


On 26.06.2015 00:27, Thomas Goirand wrote:
> IMO, that's the kind of things which should be handled by cloud-init, as
> it's possible to clone a VM, and boot another instance of it.

I have experimented and read a little more now.

With /etc/machine-id removed, journald does not seem to start up any
more (speaking of jessie).

With an empty /etc/machine-id ..

 * systemd is writing a random ID to /run/machine-id (tmpfs)

 * bind-mounts that to /etc/machine-id on top.

systemd is calling that bind mount a "transient file".
Now to persist that ID, one could

 # umount /etc/machine-id

 # cp /run/machine-id /etc/

but it would not be atomic.  For an atomic version, there is
systemd-machine-id-commit.service in systemd v218 or later.  Only sid
has systemd that young.

cloud-init may come in too late for setting a machine ID without
breaking the "stays constant for all subsequent boots" of [1] if systemd
already picked an ID before.


> So even if
> we remove the machine-id from the image, the problem could still be there.

Still be there in what way?  Please elaborate.

Thanks and best,



S


[1] http://www.freedesktop.org/software/systemd/man/machine-id.html



More information about the Openstack-devel mailing list