Trusty instances get same machine-id
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
cloud-images |
Fix Released
|
Undecided
|
Unassigned |
Bug Description
I'm using MAAS for testing, but somebody else tested with plain kvm locally, and in their openstack STSstack cloud, and the same happens there.
tl;dr
deploy trusty
$ cat /var/lib/
21ccdbe57cf13cb
All your trusty instances will have that machine-id in /var/lib/
In xenial it's different in each instance:
ubuntu@56-40:~$ cat /var/lib/
6d26080b84e9496
ubuntu@87-69:~$ cat /var/lib/
d9ebc0cb4d6f484
The reason I'm bringing this up is because when one installs livepatch on trusty, that pulls in systemd, which in turns generates a /etc/machine-id based on several sources, the first one being that /var/lib/
Livepatch uses /etc/machine-id to uniquely identify each client, and on trusty that now means 21ccdbe57cf13cb
Here is the livepatch bug about it: https:/
Currently we are seeing that only on trusty VMs.
Here is some inconclusive brainstorming:
Xenial also has that value in /etc/machine-id, whereas trusty doesn't have that file. Probably because xenial ships systemd.
A quick grep in /etc/init.d shows that the dbus service creates it on trusty:
ubuntu@10-e2:~$ grep machine-id /etc/init.d/*
/etc/init.d/dbus: # Create machine-id file
But because there is no dbus-daemon executable, the file doesn't get created:
ubuntu@10-e2:~$ sudo sh -x /etc/init.d/dbus start
+ set -e
+ DAEMON=
+ UUIDGEN=
+ UUIDGEN_
+ NAME=dbus
+ DAEMONUSER=
+ PIDDIR=
+ PIDFILE=
+ DESC=system message bus
+ test -x /usr/bin/
+ exit 0
It's actually in /bin:
ubuntu@10-e2:~$ which dbus-daemon
/bin/dbus-daemon
But there is a dbus-daemon process running, so something else probably started it, outside of that initscript:
root@10-
831 ? Ss 0:00 dbus-daemon --system --fork
root@10-
lrwxrwxrwx 1 root root 0 Nov 9 14:24 /proc/831/exe -> /bin/dbus-daemon*
root@10-
I don't know what in xenial regenerates the machine-id in /var/lib/dbus.
Installation of the dbus package in trusty generates /var/lib/ dbus/machine- id. The cloud image build scripts need to wipe this file as part of the image creation.