fgrehm/vagrant-lxc

make dnsmasq not mandatory

Closed this issue · 4 comments

Hi,
I'm trying to spin a lxc with a simple bridge using a simple network config like the one in the README

Vagrant.configure("2") do |config|
  config.vm.network "private_network", ip: "192.168.2.100", lxc__bridge_name: 'vlxcbr1'
end

However it fails to attach because I don't have dnsmasq installed (because I usually don't need it to assign an IP to container).

Logs:

DEBUG subprocess: Waiting for process to exit. Remaining to timeout: 32000
DEBUG subprocess: Exit status: 0
DEBUG fetch_ip_from_dnsmasq_leases: Attempting to load ip from dnsmasq leases (mac: )
DEBUG fetch_ip_from_dnsmasq_leases: 
DEBUG fetch_ip_from_dnsmasq_leases: Ip could not be parsed from dnsmasq leases file
 INFO subprocess: Starting process: ["/usr/bin/sudo", "lxc-info", "--name", "cozy"]
 INFO subprocess: Command not in installer, restoring original environment...
DEBUG subprocess: Selecting on IO
DEBUG subprocess: stdout: Name:           cozy
State:          RUNNING
PID:            1266

Maybe it is already fixed in master? or do you plan to make something about it?

Thanks!

Same here: should dnsmasq be involved at all when setting up a static IP ?

IMO lxc-info --name SOME_NAME is enough. Vagrant should not look for lease files.

Lease files are used as a fallback mechanism

The dnsmasq lease fallback mechanism has been removed for the upcoming v1.3 as I changed the lxc-attach approach to fetching a box IP address to lxc-info -iH. Closing.