fgrehm / vagrant-cachier

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

Box caching saves to project root directory instead of ~/.vagrant.d/ #97

Closed gauravspatel closed 10 years ago

gauravspatel commented 10 years ago

I'm using Vagrant 1.5.1 with the 0.6.0 vagrant-cachier on CentOS 6.5. When I run vagrant up, vagrant provision, etc, the cache files end up saved in my code's directory.

  if Vagrant.has_plugin?("vagrant-cachier")
    config.cache.scope = :box
  end

Below is a small snippet of the ls of my code's directory.

vagrant20140329-1996-1bzouma         vagrant20140329-5163-c4lpx0
vagrant20140329-1996-1bzouma2        vagrant20140329-5163-c4lpx02
vagrant20140329-1996-1bzouma2.lock   vagrant20140329-5163-c4lpx02.lock
vagrant20140329-1996-fz5f8y          vagrant20140329-5488-1kjj4hq
vagrant20140329-1996-fz5f8y1         vagrant20140329-5488-1kjj4hq2
vagrant20140329-21161-1o2ucmy        vagrant20140329-5488-1kjj4hq2.lock

setting VAGRANT_HOME or TMPDIR does not help the location of the cache files. I was expecting (based on the documentation) that the files be saved to ~/.vagrant.d/cache or ~/.vagrant.d/boxes (both directories are created and chowned to my user).

Any ideas on which setting I could set or what is going on? Having vagrant* files litter my code directory seems like odd behavior.

fgrehm commented 10 years ago

This is REALLY weird and I can't reproduce it down here with the lxc or virtualbox providers. Can you show us your full Vagrantfile? Thanks!

fgrehm commented 10 years ago

Also, could you please give another try with the latest vagrant and vagrant-cachier? thanks in advance

gauravspatel commented 10 years ago

So I did another test on a fresh install of vagrant (1.5.3) without vagrant-cachier and the files are being created. It looks like it isn't vagrant-cachier causing the files to be created. I'm going to move my bug over to the vagrant github. Setting VAGRANT_LOG=debug didn't get me any closer.

Thanks for checking into this.

fgrehm commented 10 years ago

Thanks for reporting back!