Skip to content
New issue

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

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

Already on GitHub? # to your account

Parallel bootstrapping of multiple machine won't work #148

Closed
dguerri opened this issue Oct 11, 2014 · 11 comments
Closed

Parallel bootstrapping of multiple machine won't work #148

dguerri opened this issue Oct 11, 2014 · 11 comments
Assignees
Labels

Comments

@dguerri
Copy link

dguerri commented Oct 11, 2014

Parallel provisioning of multiple machine won't work if machines have one or more private networks.
This is probably a race condition for interface creation on the Vagrant host.

@dguerri
Copy link
Author

dguerri commented Oct 11, 2014

Actually I am not sure that the issue verifies for private networks.
In my setup I have both extra public and private networks for 3 different machines.

I am using version 1.3.1

@legal90
Copy link
Collaborator

legal90 commented Oct 11, 2014

@dguerri So, what is the error you have got?
I've verified parallel vagrant up for machines with private and public networks, and it was worked fine.

Please, show your Vagrantfile (full or partial), the command you're typing and the output.

@dguerri
Copy link
Author

dguerri commented Oct 11, 2014

Hi @legal90 , thanks for your reply.
Here is the log of the errors I am getting: https://gist.github.com/dguerri/638b7b1a249ba3c759ac

I am using the Vagrant file from this project, so this Vagrantfile
You can safely ignore the provisioning part, as the error occurs before it.

I think that the "key" is this message:

Stderr: Failed to add Virtual Network vagrant-vnet0: A virtual network named vagrant-vnet0 already exists. Specify another name for this virtual network.

It seems a race condition on the selection of the name for virtual networks also because I can't reproduce it every time.

If I run vagrant up --no-parallel everything works as expected.

@dguerri
Copy link
Author

dguerri commented Oct 11, 2014

My setup:
Parallels 10 for Mac
Mac OSX 10.9.5
Vagrant 1.6.5
Parallels provider 1.3.1

@legal90 legal90 added the bug label Oct 12, 2014
@legal90 legal90 self-assigned this Oct 12, 2014
@legal90 legal90 changed the title Parallel provisioning of multiple machine won't work Parallel bootstraping of multiple machine won't work Oct 12, 2014
@legal90 legal90 changed the title Parallel bootstraping of multiple machine won't work Parallel bootstrapping of multiple machine won't work Oct 12, 2014
@legal90
Copy link
Collaborator

legal90 commented Oct 12, 2014

@dguerri, thanks for details! I've reproduced this issue and just fixed it in v1.3.2.
Please, check it on your environment.

@legal90 legal90 closed this as completed Oct 12, 2014
@dguerri
Copy link
Author

dguerri commented Oct 12, 2014

Thank you @legal90 !
Unfortunately, after updating Parallels provider plugin, I am still getting the same error:

(ve-hpcloud)(davide:murray)-[0]-(~/D/a/vagrant-ansible-openstack) # ./go.sh 
Bringing machine 'controller' up with 'parallels' provider...
Bringing machine 'network' up with 'parallels' provider...
Bringing machine 'compute1' up with 'parallels' provider...
==> compute1: Importing base box 'precise64'...
==> controller: Importing base box 'precise64'...
==> network: Importing base box 'precise64'...
==> compute1: Setting the name of the VM: vagrant-ansible-openstack_compute1_1413130158073_25142
==> network: Setting the name of the VM: vagrant-ansible-openstack_network_1413130158148_22192
==> controller: Setting the name of the VM: vagrant-ansible-openstack_controller_1413130158245_90054
==> network: Fixed port collision for 22 => 2222. Now on port 2200.
==> controller: Fixed port collision for 22 => 2222. Now on port 2201.
==> network: An error occurred. The error will be shown after all tasks complete.
==> controller: An error occurred. The error will be shown after all tasks complete.
==> compute1: Preparing network interfaces based on configuration...
    compute1: Adapter 0: shared
    compute1: Adapter 1: hostonly
    compute1: Adapter 2: hostonly
==> compute1: Clearing any previously set network interfaces...
==> compute1: Forwarding ports...
==> compute1: Setting power consumption mode: "Longer battery life"
==> compute1: Running 'pre-boot' VM customizations...
==> compute1: Booting VM...
==> compute1: Waiting for machine to boot. This may take a few minutes...
    compute1: SSH address: 10.211.55.167:22
    compute1: SSH username: vagrant
    compute1: SSH auth method: private key
==> compute1: Machine booted and ready!
==> compute1: Checking for Parallels Tools installed on the VM...
==> compute1: Parallels Tools installed on this VM are outdated! In most cases
==> compute1: this is fine but in rare cases it can cause things such as shared
==> compute1: folders to not work properly. If you see shared folder errors,
==> compute1: please update Parallels Tools within the virtual machine and 
==> compute1: reload your VM.
==> compute1: Setting hostname...
==> compute1: Configuring and enabling network interfaces...
==> compute1: Mounting shared folders...
    compute1: /vagrant => /Users/davide/Developer/ansible/vagrant-ansible-openstack
    compute1: /tmp/vagrant-cache => /Users/davide/Developer/ansible/vagrant-ansible-openstack/.vagrant/machines/compute1/cache
==> compute1: Configuring cache buckets...
==> compute1: Machine not provisioning because `--no-provision` is specified.
An error occurred while executing multiple actions in parallel.
Any errors that occurred are shown below.

An error occurred while executing the action on the 'controller'
machine. Please handle this error then try again:

There was an error while command execution. The command and stderr is shown below.

Command: ["prlsrvctl", "net", "add", "vagrant-vnet0", "--type", "host-only"]

Stderr: Failed to add Virtual Network vagrant-vnet0: A virtual network named vagrant-vnet0 already exists. Specify another name for this virtual network.


An error occurred while executing the action on the 'network'
machine. Please handle this error then try again:

There was an error while command execution. The command and stderr is shown below.

Command: ["prlsrvctl", "net", "add", "vagrant-vnet0", "--type", "host-only"]

Stderr: Failed to add Virtual Network vagrant-vnet0: A virtual network named vagrant-vnet0 already exists. Specify another name for this virtual network.

@legal90
Copy link
Collaborator

legal90 commented Oct 12, 2014

@dguerri Hm... It is very strange. Could you please double-check that plugin has been updated?

vagrant plugin uninstall vagrant-parallels
vagrant plugin install vagrant-parallels

If the issue still exists, please, provide a debug log (vagrant up --debug) via gist or send it to me by e-mail (my address is in profile)

@dguerri
Copy link
Author

dguerri commented Oct 15, 2014

@legal90 http://pastebin.com/ExwGGkts
I could reproduce this error only 2 out of 4 tries... So, I think there is still a race condition somewhere.
Unfortunately, at the moment, I don't have the time to look into this issue (I usually prefer to propose fixes rather than opening bugs report :-P), sorry about that.

Thanks!

@legal90 legal90 reopened this Oct 15, 2014
legal90 added a commit that referenced this issue Oct 16, 2014
@legal90
Copy link
Collaborator

legal90 commented Oct 16, 2014

@dguerri Seems like I've just fixed it. Could you please check it on v1.3.3.rc1? Use this command to install it:

vagrant plugin install vagrant-parallels --plugin-version 1.3.3.rc1

If it works good, then I will release it as 1.3.3 soon.

@dguerri
Copy link
Author

dguerri commented Oct 16, 2014

@legal90 brilliant. It seems to work.
Thanks for fixing it!

@legal90
Copy link
Collaborator

legal90 commented Oct 16, 2014

Yay! 1.3.3 is released with this fix.

@legal90 legal90 closed this as completed Oct 16, 2014
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants