Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

breaks on parallel multi machine #239

Open
xahare opened this issue Aug 3, 2017 · 3 comments
Open

breaks on parallel multi machine #239

xahare opened this issue Aug 3, 2017 · 3 comments

Comments

@xahare
Copy link

xahare commented Aug 3, 2017

up to date (as of a few hours ago) fedora 26, with vagrant 1.97, vagrant-hostmanager 1.8.7, vagrant-libvirt 0.0.40

when hostmanager is enabled, but parallel provisioning is disabled, things work fine. the same vagrant file also works with parallel enabled, and host manager disabled. my ~/.vagrant.d/Vagrantfile has hostmanager enabled, manage guest enabled, manager host disabled.

# -*- mode: ruby -*-
# ENV['VAGRANT_NO_PARALLEL'] = 'yes'

lan = "10.46.5."

Vagrant.configure("2") do |config|
  # config.hostmanager.enabled = false
  config.vm.box = "centos/7"
  (1..3).each do |n|
    config.vm.define "node#{n}" do |node|
      node.vm.hostname = "node#{n}"
      node.vm.network "private_network", ip: "#{lan}#{10+n}"
    end
  end
end

During vagrant up, these pop up, the last line highlighted in red,

==> node3: [vagrant-hostmanager:guests] Updating hosts file on active guest virtual machines...
==> node3: Removing domain...
==> node3: An error occurred. The error will be shown after all tasks complete.

full output to the point where it hangs

without debugging, https://gist.github.com/xahare/bd7794281632297af1901ad82e1f2728

having trouble with gist. will try again later with debugging logs

@abbbi
Copy link

abbbi commented Dec 11, 2017

hi,
i can reproduce this. Hostmanager is reproducible failing on me on paralell provision.
It seems there is a workaround that helps

  1. disable the general plugin and enable it to include offline vm's aswell, in case you need
    all the hosts entries.

config.hostmanager.enabled = false
config.hostmanager.manage_guest = true
config.hostmanager.ignore_private_ip = false
config.hostmanager.include_offline = true

  1. enable the plugin during provision step for each vm:

centos7.vm.provision :hostmanager

this way i get up all my virtual machines in an paralell run without problems :)

@frizop
Copy link

frizop commented Jul 13, 2018

Just writing in to say I also had a similar issue where my VMs would get deleted for some odd reason and making those changes to my config solved it.

My config reads like the following:

config.hostmanager.enabled = false
config.hostmanager.manage_guest = true
config.hostmanager.manage_host = true
config.hostmanager.include_offline = true
# the following is part a specific vm config:
*.vm.provision :hostmanager

@RoSk0
Copy link

RoSk0 commented Mar 16, 2020

Just faced with this as well.

Vagrant 2.2.6
vagrant-hostmanager 1.8.5

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants