[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#868679: marked as done (cloud.debian.org: Multiple identical vagrant boxes appear as the same machine to libvirt's dnsmasq dhcp provider)

Your message dated Thu, 27 Jul 2017 17:33:53 -0300
with message-id <20170727203353.sjz7v32dkqn44w6o@debian.org>
and subject line Re: Bug#868679: (no subject)
has caused the Debian Bug report #868679,
regarding cloud.debian.org: Multiple identical vagrant boxes appear as the same machine to libvirt's dnsmasq dhcp provider
to be marked as done.

This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
Bug report if necessary, and/or fix the problem forthwith.

(NB: If you are a system administrator and have no idea what this
message is talking about, this may indicate a serious mail system
misconfiguration somewhere. Please contact owner@bugs.debian.org

868679: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=868679
Debian Bug Tracking System
Contact owner@bugs.debian.org with problems
--- Begin Message ---
Package: cloud.debian.org
Severity: important
Tags: newcomer

Dear Maintainer,

   * What led up to the situation?

I've been having problems using the supplied vagrant boxes in more complex
setups (where a Vagrantfile brings up more than one identical
machine). They effectively end up stealing each other's management IP
address (and potentially others that are DHCP managed).

   * What exactly did you do (or not do) that was effective (or

Use a Vagrantfile a bit like this:


def main()
  Vagrant.configure("2") do |config|
    config.vm.box = "debian/stretch64"
    config.vm.box_check_update = false

    config.vm.provider :libvirt do |lv|
    config.vm.synced_folder ".", "/vagrant", disabled: true
  make_box "box-a"
  make_box "box-b"

def make_box(name)
  Vagrant.configure("2") do |config|
    config.vm.define name do |box|
      box.vm.provider :libvirt do |lv|
        lv.memory = 1024
        lv.cpus = 2


Try bringing up both hosts at once. You might need to wait a bit.

   * What was the outcome of this action?

You'll see each host snaffle the allocated DHCP management address.

The same client-id is reported in dnsmasq's lease file on the host machine.

   * What outcome did you expect instead?

Each host should identify itself differently to dnsmasq; if you check the
leases file, each box appears to supply the same client-id (although
they have different MAC addresses).

   * Diagnosis:

It appears that the client-id is supplied by the systemd network client. This
is derived, I believe, from /etc/machine-id and in turn
/var/lib/dbus/machine-id. These files are present with *fixed
contents* on the box image that I've used; each instance gets the same

The box image should not include those files (it suffices to delete them prior
to packaging the image). This causes each instance to mint its own new
UUID, which in turn results in distinct client-ids being supplied by

(I don't think systemd is strictly at fault here; the contents of machine-id
should be distinct per distinct host.)


-- System Information:
Debian Release: stretch/sid
Architecture: amd64 (x86_64)
Foreign Architectures: i386
Init: systemd (via /run/systemd/system)

--- End Message ---
--- Begin Message ---
On Fri, Jul 21, 2017 at 02:32:02PM -0300, Antonio Terceiro wrote:
> On Fri, Jul 21, 2017 at 03:42:21PM +0200, Emmanuel Kasper wrote:
> > I commited the fix above in
> > git.debian.org:/git/cloud/debian-vm-templates.git
> Thanks!
> > the next box rebuild will have this included.
> > 
> FWIW, I am planning to rebuild boxes for libvirt and lxc over the
> weekend

Updated boxes including the have been uploaded, so I am closing this

Attachment: signature.asc
Description: PGP signature

--- End Message ---

Reply to: