Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Loading…

Vagrant downloads the box multiple times in multi VM environment, then fails to add box second time #1467

Closed
kadishmal opened this Issue · 8 comments

4 participants

@kadishmal

This is really not good. Using Vagrant 1.1.1 on Windows 7.

  1. Intentionally removed centos-6.3-x64 box from the current system.
  2. Set:

    config.vm.box = "centos-6.3-x64"
    config.vm.box_url = "http://sourceforge.net/projects/cubrid/files/CUBRID-Demo-Virtual-Machines/Vagrant/vagrant-virtualbox-centos-6.3-x64-minimal.box/download"
    
  3. Defined two nodes.

  4. vagrant up

What Vagrant does is:

  1. node1: informs that centos-6.3-x64 is not found in the current system.
  2. node1: downloads the box from remote URL.
  3. node1: adds the box to the system.
  4. node1: Configures VM.
  5. node2: informs that centos-6.3-x64 is not found in the current system.
  6. node2: downloads the box from remote URL.
  7. node2: Tries to add the box to the system. But fails because The box you're attempting to add already exists.

Am I doing something wrong?

Here is the Vagrantfile:

# -*- mode: ruby -*-
# vi: set ft=ruby :

Vagrant.configure("2") do |config|
  config.vm.box = "centos-6.3-x64"
  config.vm.box_url = "http://sourceforge.net/projects/cubrid/files/CUBRID-Demo-Virtual-Machines/Vagrant/vagrant-virtualbox-centos-6.3-x64-minimal.box/download"

  config.vm.define :node1 do |node1|
    node1.vm.hostname = "node1"
    node1.vm.network :private_network, ip: "10.11.12.13"
  end

  config.vm.define :node2 do |node2|
    node2.vm.hostname = "node2"
    node2.vm.network :private_network, ip: "10.11.12.14"
  end

  config.vm.provision :chef_solo do |chef|
    chef.recipe_url = "http://sourceforge.net/projects/cubrid/files/CUBRID-Demo-Virtual-Machines/Vagrant/chef-cookbooks.tar.gz/download"

    chef.add_recipe "java"
  end
end
@mitchellh
Owner

Sounds like a good bug! Working on confirming now then will fix.

@kadishmal

While you're fixing, I've just read your two blogs. Got to know you better and appreciate your work even more. I'd like to say thank you for your devotion to your users.

@mitchellh
Owner

Thanks! :) I've fixed the bug and pushed the fix. It will be part of 1.1.3 which will be released next week.

@mitchellh mitchellh closed this
@mitchellh
Owner

Wait, wrong bug fixed. Haha, this one is still open .:) Fixed #1468

@mitchellh mitchellh reopened this
@hughsaunders

heh, I was reading that commit and wondering how it could be relevant.. I've also run into this bug, but don't know where to start for a fix.

@kadishmal

@mitchellh, any updates for this issue?

@devdave

Just guessing this might be a doozy to fix because vm.define ignores the :symbol and rely instead on the vm.box value for generating a new provision.

@mitchellh
Owner

Fixed! Will be part of 1.2.2

@mitchellh mitchellh closed this
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.