fgrehm / vagrant-cachier

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

Fails under Vagrant 1.5 #96

Closed lox closed 10 years ago

lox commented 10 years ago

My config looks like so:

  if Vagrant.has_plugin?("vagrant-cachier")
    puts "configuring vagrant-cachier"
    config.cache.synced_folder_opts = {
      type: :nfs
    }
    config.cache.scope = :box
    config.cache.auto_detect = false
    config.cache.enable :apt
    config.cache.enable :gem
    config.cache.enable :npm
    config.cache.enable :composer
    config.cache.enable :apt_cacher
  end

I get the following error:

==> default: Configuring cache buckets...
/Applications/Vagrant/embedded/gems/gems/vagrant-1.5.0/lib/vagrant/plugin/v2/config.rb:73:in `method_missing': undefined method `enable_nfs' for #<VagrantPlugins::Cachier::Config:0x00000102653d28> (NoMethodError)
    from /Users/lachlan/.vagrant.d/gems/gems/vagrant-cachier-0.6.0/lib/vagrant-cachier/bucket/apt_cacher.rb:14:in `install'
    from /Users/lachlan/.vagrant.d/gems/gems/vagrant-cachier-0.6.0/lib/vagrant-cachier/bucket.rb:24:in `install'
    from /Users/lachlan/.vagrant.d/gems/gems/vagrant-cachier-0.6.0/lib/vagrant-cachier/action/install_buckets.rb:38:in `block in configure_cache_buckets'
    from /Users/lachlan/.vagrant.d/gems/gems/vagrant-cachier-0.6.0/lib/vagrant-cachier/action/install_buckets.rb:36:in `each'
    from /Users/lachlan/.vagrant.d/gems/gems/vagrant-cachier-0.6.0/lib/vagrant-cachier/action/install_buckets.rb:36:in `configure_cache_buckets'
    from /Users/lachlan/.vagrant.d/gems/gems/vagrant-cachier-0.6.0/lib/vagrant-cachier/action/install_buckets.rb:19:in `call'
    from /Applications/Vagrant/embedded/gems/gems/vagrant-1.5.0/lib/vagrant/action/warden.rb:34:in `call'
    from /Applications/Vagrant/embedded/gems/gems/vagrant-1.5.0/lib/vagrant/action/builtin/provision.rb:76:in `call'
    from /Applications/Vagrant/embedded/gems/gems/vagrant-1.5.0/lib/vagrant/action/warden.rb:34:in `call'
    from /Users/lachlan/.vagrant.d/gems/gems/vagrant-cachier-0.6.0/lib/vagrant-cachier/action/configure_bucket_root.rb:20:in `call'
    from /Applications/Vagrant/embedded/gems/gems/vagrant-1.5.0/lib/vagrant/action/warden.rb:34:in `call'
    from /Applications/Vagrant/embedded/gems/gems/vagrant-1.5.0/plugins/providers/virtualbox/action/clear_forwarded_ports.rb:15:in `call'
    from /Applications/Vagrant/embedded/gems/gems/vagrant-1.5.0/lib/vagrant/action/warden.rb:34:in `call'
    from /Applications/Vagrant/embedded/gems/gems/vagrant-1.5.0/plugins/providers/virtualbox/action/set_name.rb:48:in `call'
    from /Applications/Vagrant/embedded/gems/gems/vagrant-1.5.0/lib/vagrant/action/warden.rb:34:in `call'
    from /Applications/Vagrant/embedded/gems/gems/vagrant-1.5.0/plugins/providers/virtualbox/action/clean_machine_folder.rb:17:in `call'
    from /Applications/Vagrant/embedded/gems/gems/vagrant-1.5.0/lib/vagrant/action/warden.rb:34:in `call'
    from /Applications/Vagrant/embedded/gems/gems/vagrant-1.5.0/plugins/providers/virtualbox/action/check_accessible.rb:18:in `call'
    from /Applications/Vagrant/embedded/gems/gems/vagrant-1.5.0/lib/vagrant/action/warden.rb:34:in `call'
    from /Applications/Vagrant/embedded/gems/gems/vagrant-1.5.0/lib/vagrant/action/warden.rb:95:in `block in finalize_action'
    from /Applications/Vagrant/embedded/gems/gems/vagrant-1.5.0/lib/vagrant/action/warden.rb:34:in `call'
    from /Applications/Vagrant/embedded/gems/gems/vagrant-1.5.0/lib/vagrant/action/warden.rb:34:in `call'
    from /Applications/Vagrant/embedded/gems/gems/vagrant-1.5.0/lib/vagrant/action/builder.rb:116:in `call'
    from /Applications/Vagrant/embedded/gems/gems/vagrant-1.5.0/lib/vagrant/action/runner.rb:69:in `block in run'
    from /Applications/Vagrant/embedded/gems/gems/vagrant-1.5.0/lib/vagrant/util/busy.rb:19:in `busy'
    from /Applications/Vagrant/embedded/gems/gems/vagrant-1.5.0/lib/vagrant/action/runner.rb:69:in `run'
    from /Applications/Vagrant/embedded/gems/gems/vagrant-1.5.0/lib/vagrant/action/builtin/call.rb:51:in `call'
    from /Applications/Vagrant/embedded/gems/gems/vagrant-1.5.0/lib/vagrant/action/warden.rb:34:in `call'
    from /Applications/Vagrant/embedded/gems/gems/vagrant-1.5.0/lib/vagrant/action/warden.rb:95:in `block in finalize_action'
    from /Applications/Vagrant/embedded/gems/gems/vagrant-1.5.0/lib/vagrant/action/warden.rb:34:in `call'
    from /Applications/Vagrant/embedded/gems/gems/vagrant-1.5.0/lib/vagrant/action/warden.rb:34:in `call'
    from /Applications/Vagrant/embedded/gems/gems/vagrant-1.5.0/lib/vagrant/action/builder.rb:116:in `call'
    from /Applications/Vagrant/embedded/gems/gems/vagrant-1.5.0/lib/vagrant/action/runner.rb:69:in `block in run'
    from /Applications/Vagrant/embedded/gems/gems/vagrant-1.5.0/lib/vagrant/util/busy.rb:19:in `busy'
    from /Applications/Vagrant/embedded/gems/gems/vagrant-1.5.0/lib/vagrant/action/runner.rb:69:in `run'
    from /Applications/Vagrant/embedded/gems/gems/vagrant-1.5.0/lib/vagrant/action/builtin/call.rb:51:in `call'
    from /Applications/Vagrant/embedded/gems/gems/vagrant-1.5.0/lib/vagrant/action/warden.rb:34:in `call'
    from /Applications/Vagrant/embedded/gems/gems/vagrant-1.5.0/lib/vagrant/action/warden.rb:95:in `block in finalize_action'
    from /Applications/Vagrant/embedded/gems/gems/vagrant-1.5.0/lib/vagrant/action/warden.rb:34:in `call'
    from /Applications/Vagrant/embedded/gems/gems/vagrant-1.5.0/lib/vagrant/action/warden.rb:34:in `call'
    from /Applications/Vagrant/embedded/gems/gems/vagrant-1.5.0/lib/vagrant/action/builder.rb:116:in `call'
    from /Applications/Vagrant/embedded/gems/gems/vagrant-1.5.0/lib/vagrant/action/runner.rb:69:in `block in run'
    from /Applications/Vagrant/embedded/gems/gems/vagrant-1.5.0/lib/vagrant/util/busy.rb:19:in `busy'
    from /Applications/Vagrant/embedded/gems/gems/vagrant-1.5.0/lib/vagrant/action/runner.rb:69:in `run'
    from /Applications/Vagrant/embedded/gems/gems/vagrant-1.5.0/lib/vagrant/action/builtin/call.rb:51:in `call'
    from /Applications/Vagrant/embedded/gems/gems/vagrant-1.5.0/lib/vagrant/action/warden.rb:34:in `call'
    from /Applications/Vagrant/embedded/gems/gems/vagrant-1.5.0/lib/vagrant/action/builtin/box_check_outdated.rb:34:in `call'
    from /Applications/Vagrant/embedded/gems/gems/vagrant-1.5.0/lib/vagrant/action/warden.rb:34:in `call'
    from /Applications/Vagrant/embedded/gems/gems/vagrant-1.5.0/lib/vagrant/action/builtin/config_validate.rb:25:in `call'
    from /Applications/Vagrant/embedded/gems/gems/vagrant-1.5.0/lib/vagrant/action/warden.rb:34:in `call'
    from /Applications/Vagrant/embedded/gems/gems/vagrant-1.5.0/plugins/providers/virtualbox/action/check_virtualbox.rb:17:in `call'
    from /Applications/Vagrant/embedded/gems/gems/vagrant-1.5.0/lib/vagrant/action/warden.rb:34:in `call'
    from /Applications/Vagrant/embedded/gems/gems/vagrant-1.5.0/lib/vagrant/action/builtin/call.rb:57:in `call'
    from /Applications/Vagrant/embedded/gems/gems/vagrant-1.5.0/lib/vagrant/action/warden.rb:34:in `call'
    from /Applications/Vagrant/embedded/gems/gems/vagrant-1.5.0/plugins/providers/virtualbox/action/check_virtualbox.rb:17:in `call'
    from /Applications/Vagrant/embedded/gems/gems/vagrant-1.5.0/lib/vagrant/action/warden.rb:34:in `call'
    from /Applications/Vagrant/embedded/gems/gems/vagrant-1.5.0/lib/vagrant/action/builtin/config_validate.rb:25:in `call'
    from /Applications/Vagrant/embedded/gems/gems/vagrant-1.5.0/lib/vagrant/action/warden.rb:34:in `call'
    from /Applications/Vagrant/embedded/gems/gems/vagrant-1.5.0/lib/vagrant/action/warden.rb:95:in `block in finalize_action'
    from /Applications/Vagrant/embedded/gems/gems/vagrant-1.5.0/lib/vagrant/action/warden.rb:34:in `call'
    from /Applications/Vagrant/embedded/gems/gems/vagrant-1.5.0/lib/vagrant/action/warden.rb:34:in `call'
    from /Applications/Vagrant/embedded/gems/gems/vagrant-1.5.0/lib/vagrant/action/builder.rb:116:in `call'
    from /Applications/Vagrant/embedded/gems/gems/vagrant-1.5.0/lib/vagrant/action/runner.rb:69:in `block in run'
    from /Applications/Vagrant/embedded/gems/gems/vagrant-1.5.0/lib/vagrant/util/busy.rb:19:in `busy'
    from /Applications/Vagrant/embedded/gems/gems/vagrant-1.5.0/lib/vagrant/action/runner.rb:69:in `run'
    from /Applications/Vagrant/embedded/gems/gems/vagrant-1.5.0/lib/vagrant/action/builtin/call.rb:51:in `call'
    from /Applications/Vagrant/embedded/gems/gems/vagrant-1.5.0/lib/vagrant/action/warden.rb:34:in `call'
    from /Applications/Vagrant/embedded/gems/gems/vagrant-1.5.0/plugins/providers/virtualbox/action/check_virtualbox.rb:17:in `call'
    from /Applications/Vagrant/embedded/gems/gems/vagrant-1.5.0/lib/vagrant/action/warden.rb:34:in `call'
    from /Applications/Vagrant/embedded/gems/gems/vagrant-1.5.0/lib/vagrant/action/builder.rb:116:in `call'
    from /Applications/Vagrant/embedded/gems/gems/vagrant-1.5.0/lib/vagrant/action/runner.rb:69:in `block in run'
    from /Applications/Vagrant/embedded/gems/gems/vagrant-1.5.0/lib/vagrant/util/busy.rb:19:in `busy'
    from /Applications/Vagrant/embedded/gems/gems/vagrant-1.5.0/lib/vagrant/action/runner.rb:69:in `run'
    from /Applications/Vagrant/embedded/gems/gems/vagrant-1.5.0/lib/vagrant/machine.rb:157:in `action'
    from /Applications/Vagrant/embedded/gems/gems/vagrant-1.5.0/plugins/commands/reload/command.rb:37:in `block in execute'
    from /Applications/Vagrant/embedded/gems/gems/vagrant-1.5.0/lib/vagrant/plugin/v2/command.rb:200:in `block in with_target_vms'
    from /Applications/Vagrant/embedded/gems/gems/vagrant-1.5.0/lib/vagrant/plugin/v2/command.rb:194:in `each'
    from /Applications/Vagrant/embedded/gems/gems/vagrant-1.5.0/lib/vagrant/plugin/v2/command.rb:194:in `with_target_vms'
    from /Applications/Vagrant/embedded/gems/gems/vagrant-1.5.0/plugins/commands/reload/command.rb:36:in `execute'
    from /Applications/Vagrant/embedded/gems/gems/vagrant-1.5.0/lib/vagrant/cli.rb:42:in `execute'
    from /Applications/Vagrant/embedded/gems/gems/vagrant-1.5.0/lib/vagrant/environment.rb:244:in `cli'
    from /Applications/Vagrant/bin/../embedded/gems/gems/vagrant-1.5.0/bin/vagrant:147:in `<main>'

Without NFS specified, nothing seems to happen, I get no mounted volumes, no cache directories created when I call vagrant reload.

fgrehm commented 10 years ago

The problem is not vagrant 1.5, it's the apt-cacher bucket that needs to be fixed, if you disable that bucket things should work fine.

Tagging this as a bug

lox commented 10 years ago

Bummer, apt-cacher is the one that really reduces build times!

fgrehm commented 10 years ago

This was fixed and will be available on the next version of the plugin. Thanks for reaching out!