Closed tknerr closed 10 years ago
No clue what's going on, but what I can say is:
vagrant up
after ´rm -rf ~/.vagrant.d/cache`Might it be some HTTP redirect which vagrant-cachier does not follow?
I guess the root cause for this is #106
After disabling the :apt_lists
bucket the Chef run is successful again. Cleaning the cache and enabling :apt_lists
causes the Chef run to reliably fail.
As a temporary workaround to disable the :apt_lists
bucket I put this at the top of my global ~/.vagrant.d/Vagrantfile
:
# monkey-patch / disable the :apt_lists bucket until this is fixed:
# https://github.com/fgrehm/vagrant-cachier/issues/113
module VagrantPlugins
module Cachier
class Bucket
class AptLists < Bucket
def self.capability
:none
end
end
end
end
end
Vagrant.configure("2") do |config|
# enable cachier globally
if Vagrant.has_plugin?("vagrant-cachier")
config.cache.scope = :box
end
end
/cc @chrisvire @snowch
@tknerr - thanks for this! Does this completely disable apt caching, or does it just disable one feature of apt caching (apt_lists)?
@snowch only :apt_lists
, the apt packages are still being cached (via the :apt
bucket)
P.S.: the monkeypatch should be better inside the Vagrant.has_plugin
guard btw:
# global Vagrant configuration
Vagrant.configure("2") do |config|
# enable cachier globally
if Vagrant.has_plugin?("vagrant-cachier")
# monkey-patch / disable the :apt_lists bucket until this is fixed:
# https://github.com/fgrehm/vagrant-cachier/issues/113
module VagrantPlugins
module Cachier
class Bucket
class AptLists < Bucket
def self.capability
:none
end
end
end
end
end
config.cache.scope = :box
end
end
Awesome! Thank you!
If the root cause is the windows host, I think we can keep this closed and keep track of a possible fix on GH-106
@tknerr thanks for all the info and tracking it down!
I can reproducably make the Chef provisioning of this sample cookbook fail just by enabling cachier: https://github.com/tknerr/sample-toplevel-cookbook
The Chef run fails with that output:
This happens both with either
:box
and:machine
scope. There was no parallel provisioning either.Steps to reproduce:
git clone https://github.com/tknerr/sample-toplevel-cookbook
cd sample-toplevel-cookbook
vagrant up
=> worksconfig.cache.scope = :box
vagrant destroy -f
vagrant up
=> Chef run fails with above outputThis happens on Win7 (64bit), Vagrant 1.6.3, vagrant-cachier 0.7.2 (+ vagrant-omnibus 1.4.1, vagrant-berkshelf 2.0.1)
Any ideas?