Your message dated Tue, 14 Feb 2017 11:09:52 -0200
with message-id <[email protected]>
and subject line Re: Libvirt/LXC Vagrant box for Stretch
has caused the Debian Bug report #838637,
regarding vagrant-libvirt: vagrant libvirt-boxes cannot boot properly when the 
network is configured via systemd-networkd
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 [email protected]
immediately.)


-- 
838637: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=838637
Debian Bug Tracking System
Contact [email protected] with problems
--- Begin Message ---
Package: vagrant-libvirt
Version: 0.0.33-1
Severity: important
Tags: upstream

vmdebootstrap switched to systemd-networkd for newly created images, some time 
ago
( could not find a changelog entry for that but it's mentionned in #831025)

switching to systemd-networkd from ifupdown means the OS uses the systemd 
intern dhcp client instead of ISC dhcp client.
And this breaks vagrant-libvirt in a very subtil way, making vagrant-libvirt 
boot sequences
hanging on:
==> default: Starting domain.
==> default: Waiting for domain to get an IP address...

To login over ssh during the vagrant up sequence, vagrant-libirt needs to know 
the ip
adress of the box, which provided by the dnsmasq server integrated into libvirt.
To get this information, vagrant-libvirt currently parses /proc/net/arp, trying 
to
find here an IP adress which matches the MAC adress registered in the libvirt
domain. ( see 
https://github.com/vagrant-libvirt/vagrant-libvirt/blob/a963ff4c70f5e6ce5bc2589b7e98c1c0671e2ccc/lib/vagrant-libvirt/driver.rb#L35
 )

I don't know the internals of systemd vs ISC dhcp clients, but what happens is 
that
the systemd dhcp client gets an adress from dnsmasq, but the mac adress is not 
registered in the arp cache.
the output of /proc/net/arp becomes of such:

head -2 /proc/net/arp 
IP address       HW type     Flags       HW address            Mask     Device
192.168.121.221  0x1         0x0         00:00:00:00:00:00     *        virbr1

(notice the empty HW address making the match with the mac address of the VM 
domain impossible)
(but as soon as you ping 192.168.121.221 the arp entry get populated and the 
vagrant up
sequence can continue)


Recent version of libvirt allow now to query directly for the IP adress of the 
VM domain,
so IMHO vagrant-libvirt should use this information when available. I get his 
should be accessible via the fog bindinds of the libvirt ruby bindings.

virsh domifaddr vmdebootstrap-libvirt-vagrant_default
 Name       MAC address          Protocol     Address
 -------------------------------------------------------------------------------
  vnet1      52:54:00:d3:d9:78    ipv4         192.168.121.221/24


-- System Information:
Debian Release: stretch/sid
  APT prefers testing
  APT policy: (500, 'testing')
Architecture: amd64 (x86_64)
Foreign Architectures: i386

Kernel: Linux 4.5.0-2-amd64 (SMP w/2 CPU cores)
Locale: LANG=fr_FR.utf8, LC_CTYPE=fr_FR.utf8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
Init: systemd (via /run/systemd/system)

Versions of packages vagrant-libvirt depends on:
ii  ruby                          1:2.3.0+4
ii  ruby-fog-libvirt              0.0.3-1
ii  ruby-nokogiri                 1.6.8-2
ii  ruby1.9.1 [ruby-interpreter]  1.9.3.194-8.1+deb7u2
ii  ruby2.1 [ruby-interpreter]    2.1.5-4
ii  ruby2.2 [ruby-interpreter]    2.2.4-1

vagrant-libvirt recommends no packages.

vagrant-libvirt suggests no packages.

-- no debconf information

--- End Message ---
--- Begin Message ---
On Fri, Feb 10, 2017 at 03:04:38PM +0100, Emmanuel Kasper wrote:
> Hi Leonard
> 
> > Stretch recently entered the last phase of the freeze and is just around 
> > the corner. Up until now we use the “official” debian/jessie64 box[1][2] 
> > from Hashicorp’s Atlas but would like to start testing our stuff with 
> > Stretch. I checked out the repository[3] of the build scripts and 
> > everything seems to be in place for building a box for Stretch, too, 
> > although my quick local make failed, probably due to shenanigans. 
> > 
> > May I inquire if anyone is already working on this and when to expect this 
> > and/or if and what help is required?
> > 
> > Thank you and have a nice weekend!
> 
> IIRC the recent releases of vmdeboostrap create jessie/stretch which
> don't work with vagrant because of
> 
> https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=838637

FTR, I built a libvirt strecth box here, and it just works. My guess would be
that this got fixed in systemd-networkd since then.

# cat /proc/net/arp
IP address       HW type     Flags       HW address            Mask     Device
192.168.121.1    0x1         0x2         52:54:00:48:59:fe     *        ens5
                                         -----------------

I have just uploaded the libvirt box, and lxc will follow.

Attachment: signature.asc
Description: PGP signature


--- End Message ---
_______________________________________________
Pkg-ruby-extras-maintainers mailing list
[email protected]
http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/pkg-ruby-extras-maintainers

Reply via email to