Up until test-kitchen 1.3.1 I could use vagrant-cachier to cache the whole /tmp/busser/gems directory by adding this to my global ~/.vagrant.d/Vagrantfile:
ruby
# global Vagrant configuration
Vagrant.configure("2") do |config|
# enable cachier globally
if Vagrant.has_plugin?("vagrant-cachier")
config.cache.scope = :box
# cache bussers for test-kitchen
config.cache.enable :generic, {
"busser" => { cache_dir: "/tmp/busser/gems" }
}
end
end
This gave me a noteable speedup for running the kitchenci tests. Without caching, it would download and install the bussers for every kitchenci run again.
I have noticed that the path changed to /tmp/verifier/gems now, but once I try to cache this path with 1.4.0.beta.2 the kitchen run will fail with some write permission error.
I'm still investigating the exact cause for it as it worked without problems with 1.3.1. One thing that looks suspicious to me is the ownership of the files in /tmp/verifier/gems/[bin/cache/gems] directories:
vagrant-ubuntu-1204:~$ ll /tmp/verifier/gems/gems/
total 72
drwxrwxr-x 18 vagrant vagrant 4096 Mar 29 14:12 ./
drwxrwxr-x 9 vagrant vagrant 4096 Mar 29 14:12 ../
drwxr-xr-x 5 root root 4096 Mar 29 14:12 bundler-1.9.1/
drwxrwxr-x 7 vagrant vagrant 4096 Mar 29 14:12 busser-0.7.0/
drwxr-xr-x 4 root root 4096 Mar 29 14:12 busser-serverspec-0.5.3/
drwxr-xr-x 7 root root 4096 Mar 29 14:12 diff-lcs-1.2.5/
drwxr-xr-x 3 root root 4096 Mar 29 14:12 multi_json-1.11.0/
drwxr-xr-x 4 root root 4096 Mar 29 14:12 net-scp-1.2.1/
drwxr-xr-x 5 root root 4096 Mar 29 14:12 net-ssh-2.9.2/
drwxr-xr-x 3 root root 4096 Mar 29 14:12 rspec-3.2.0/
drwxr-xr-x 4 root root 4096 Mar 29 14:12 rspec-core-3.2.2/
drwxr-xr-x 3 root root 4096 Mar 29 14:12 rspec-expectations-3.2.0/
drwxr-xr-x 6 root root 4096 Mar 29 14:12 rspec-its-1.2.0/
drwxr-xr-x 3 root root 4096 Mar 29 14:12 rspec-mocks-3.2.1/
drwxr-xr-x 3 root root 4096 Mar 29 14:12 rspec-support-3.2.2/
drwxr-xr-x 5 root root 4096 Mar 29 14:12 serverspec-2.13.0/
drwxr-xr-x 5 root root 4096 Mar 29 14:12 specinfra-2.27.0/
drwxrwxr-x 5 vagrant vagrant 4096 Mar 29 14:12 thor-0.19.0/
Except for the busser gem itself they are all root owned. Is this as expected?
该提问来源于开源项目:test-kitchen/test-kitchen