fgrehm / vagrant-cachier

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

Vagrant-cachier works fine on initial 'vagrant up', but not on subsequent tries #119

Closed varac closed 1 year ago

varac commented 9 years ago

Do i have to manually trigger sth ?

'vagrant reload' does not setup cachining neither.

--- vagrant/buildbox2 » vagrant up     
Vagrant.require_plugin is deprecated and has no effect any longer.
Use `vagrant plugin` commands to manage plugins. This warning will
be removed in the next version of Vagrant.
Bringing machine 'buildbox2' up with 'libvirt' provider...
==> buildbox2: Creating image (snapshot of base box volume).
==> buildbox2: Creating domain with the following settings...
==> buildbox2:  -- Name:          buildbox2_1408099700_161d6921f6373b495353
==> buildbox2:  -- Domain type:   kvm
==> buildbox2:  -- Cpus:          1
==> buildbox2:  -- Memory:        300M
==> buildbox2:  -- Base box:      leap-wheezy
==> buildbox2:  -- Storage pool:  default
==> buildbox2:  -- Image:         /home/varac/kvm/storagepool1/buildbox2_1408099700_161d6921f6373b495353.img
==> buildbox2:  -- Volume Cache:  default
==> buildbox2:  -- Kernel:        
==> buildbox2:  -- Initrd:        
==> buildbox2:  -- Command line : 
==> buildbox2: Pruning invalid NFS exports. Administrator privileges will be required...
==> buildbox2: Starting domain.
==> buildbox2: Waiting for domain to get an IP address...
==> buildbox2: Waiting for SSH to become available...
==> buildbox2: Starting domain.
==> buildbox2: Waiting for domain to get an IP address...
==> buildbox2: Waiting for SSH to become available...
==> buildbox2: Creating shared folders metadata...
network name = vagrant-libvirt
==> buildbox2: Exporting NFS shared folders...
==> buildbox2: Preparing to edit /etc/exports. Administrator privileges will be required...
nfsd running
==> buildbox2: Mounting NFS shared folders...
==> buildbox2: Configuring and enabling network interfaces...
==> buildbox2: Configuring cache buckets...

--- vagrant/buildbox2 » vagrant ssh
Vagrant.require_plugin is deprecated and has no effect any longer.
Use `vagrant plugin` commands to manage plugins. This warning will
be removed in the next version of Vagrant.
Linux leap-wheezy 3.2.0-4-amd64 #1 SMP Debian 3.2.41-2 x86_64

The programs included with the Debian GNU/Linux system are free software;
the exact distribution terms for each program are described in the
individual files in /usr/share/doc/*/copyright.

Debian GNU/Linux comes with ABSOLUTELY NO WARRANTY, to the extent
permitted by applicable law.
Last login: Mon May 13 18:00:41 2013
vagrant@leap-wheezy:~$ ls /tmp/vagrant-cache/
apt  apt_lists  gem
root@leap-wheezy:~# shutdown -h now

Broadcast message from root@leap-wheezy (pts/0) (Fri Aug 15 10:49:54 2014):
The system is going down for system halt NOW!
root@leap-wheezy:~# Connection to 192.168.121.7 closed by remote host.
Connection to 192.168.121.7 closed.

--- vagrant/buildbox2 » vagrant up    
Vagrant.require_plugin is deprecated and has no effect any longer.
Use `vagrant plugin` commands to manage plugins. This warning will
be removed in the next version of Vagrant.
Bringing machine 'buildbox2' up with 'libvirt' provider...
==> buildbox2: Starting domain.
==> buildbox2: Waiting for domain to get an IP address...
==> buildbox2: Waiting for SSH to become available...
==> buildbox2: Creating shared folders metadata...
network name = vagrant-libvirt
==> buildbox2: Exporting NFS shared folders...
==> buildbox2: Preparing to edit /etc/exports. Administrator privileges will be required...
nfsd running
==> buildbox2: Mounting NFS shared folders...

--- vagrant/buildbox2 » vagrant ssh   
Vagrant.require_plugin is deprecated and has no effect any longer.
Use `vagrant plugin` commands to manage plugins. This warning will
be removed in the next version of Vagrant.
Linux leap-wheezy 3.2.0-4-amd64 #1 SMP Debian 3.2.41-2 x86_64

The programs included with the Debian GNU/Linux system are free software;
the exact distribution terms for each program are described in the
individual files in /usr/share/doc/*/copyright.

Debian GNU/Linux comes with ABSOLUTELY NO WARRANTY, to the extent
permitted by applicable law.
Last login: Fri Aug 15 10:49:27 2014 from 192.168.121.1

vagrant@leap-wheezy:~$ ls /tmp/vagrant-cache/
ls: cannot access /tmp/vagrant-cache/: No such file or directory

A few version infos:

--- vagrant/buildbox2 » vagrant plugin list
sahara (0.0.17)
vagrant-cachier (0.9.0)
vagrant-libvirt (0.0.19)
vagrant-login (1.0.1, system)
vagrant-share (1.1.0, system)
--- vagrant/buildbox2 » vagrant --version  
Vagrant 1.6.3
fgrehm commented 9 years ago

could you please gist the vagrantfile you've used and the output of running VAGRANT_LOG=debug vagrant up && VAGRANT_LOG=debug vagrant reload from scratch over there? tks in advance!

varac commented 9 years ago
Vagrant.configure("2") do |config|
  config.vm.define :buildbox2 do |config|
    config.vm.box = "leap-wheezy"
    if Vagrant.has_plugin?('vagrant-cachier')
      config.cache.scope = :box

      config.cache.synced_folder_opts = {
        type: :nfs,
        mount_options: ['rw', 'vers=3', 'tcp', 'nolock']
      }
    end
  end
end

here's the gist: https://gist.github.com/varac/5a3f35082f8226a03956

varac commented 9 years ago

btw, the box i'm using is at https://downloads.leap.se/leap-debian-libvirt.box

fgrehm commented 9 years ago

Weird, for whatever reason the plugin kicks in on initial up but not on reload

Unfortunately I don't have the time to set up my environment for using libvirt ATM =/ If you are willing to dig into this, here's the code used to hook into providers actions, it might be a good start.

fgrehm commented 1 year ago

Hey, sorry for the silence here but this project is looking for maintainers :sweat_smile:

As per https://github.com/fgrehm/vagrant-cachier/issues/193, I've added the ignored label and will close this issue. Thanks for the interest in the project and LMK if you want to step up and take ownership of this project on that other issue :wave: