fgrehm / vagrant-cachier

Caffeine reducer
http://fgrehm.viewdocs.io/vagrant-cachier
MIT License
1.07k stars 111 forks source link

No host IP was given to the Vagrant core NFS helper #76

Closed tuminoid closed 10 years ago

tuminoid commented 10 years ago

Originally filed at Vagrant itself https://github.com/mitchellh/vagrant/issues/2748 , but closed as plugin issue, so recreating it here.

Using Vagrant 1.4.2 on MacOSX and having vagrant-cachier enabled with NFS and launching a default precise64 Virtualbox VM gives me this:

$ vagrant init precise64
$ VAGRANT_DEFAULT_PROVIDER=virtualbox vagrant up
Bringing machine 'default' up with 'virtualbox' provider...
[default] Importing base box 'precise64'...
[default] Matching MAC address for NAT networking...
[default] Setting the name of the VM...
[default] Clearing any previously set forwarded ports...
[default] Clearing any previously set network interfaces...
[default] Preparing network interfaces based on configuration...
[default] Forwarding ports...
[default] -- 22 => 2222 (adapter 1)
[default] Running 'pre-boot' VM customizations...
[default] Booting VM...
[default] Waiting for machine to boot. This may take a few minutes...
[default] Machine booted and ready!
No host IP was given to the Vagrant core NFS helper. This is
an internal error that should be reported as a bug.

Debug log at https://gist.github.com/tuminoid/8234672

It works if in addition to cachier settings you have both

    config.vm.network "private_network", ip: "192.168.50.4"
    config.vm.synced_folder ".", "/vagrant", type: "nfs"

but either alone isn't enough to fix it.

/cc @fgrehm @tmatilai @mitchellh

tmatilai commented 10 years ago

Pinging also @phinze as he's in the NFS SWAT team. I'm not especially familiar with the NFS code.

phinze commented 10 years ago

Hi @tuminoid, when you can reproduce the error are you using a stock Vagrantfile from vagrant init?

Let me know and I can try to repro on my side.

tuminoid commented 10 years ago

Yes. I mentioned that in OP (vagrant init precise64 + vagrant up).

In ~/.vagrant.d/Vagrantfile I have the standard cachier config:

    config.cache.enable_nfs = true
    config.cache.auto_detect = true
    config.cache.scope = :machine

and it blows up.

fgrehm commented 10 years ago

Folks, I just got back from vacations and my next focus will be on getting vagrant-cachier back into shape. I'll try to have a look at this over the week :-)

fgrehm commented 10 years ago

Theres a fix for this coming up on 0.6.0. I've also sent a PR upstream related to it.

Hopefully 0.6.0 will come out over the weekend =]