Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow the ability to explicitly enable caching #346

Open
jakauppila opened this issue Mar 7, 2018 · 9 comments
Open

Allow the ability to explicitly enable caching #346

jakauppila opened this issue Mar 7, 2018 · 9 comments
Assignees

Comments

@jakauppila
Copy link
Contributor

With #303 cache is only available when using utilizing known bento boxes through a whitelist even though I'm explicitly specifying cachier: true. This took a while of digging as it was previously working on some Windows boxes.

What is the correct course of action to allow the ability to utilize the cache when not using bento boxes? I'd be happy to slap in another config option if that's what's needed.

@cheeseplus
Copy link
Contributor

cheeseplus commented Mar 7, 2018

cachier is super specifically vagrant-cachier which is an entirely specific thing. That PR specifically has to do with disabling these things by default unless we know it's a bento box

Otherwise, just reference https://github.com/test-kitchen/kitchen-vagrant#-cache_directory and set cache_directory to get the chef-client caching. Mind you this only works if the instance supports shared folders through your provider, otherwise you're still hosed.

@jakauppila
Copy link
Contributor Author

If I'm reading this right, even if I specify cache_directory it's not going to work since I'm not using a bento box.

https://github.com/test-kitchen/kitchen-vagrant/blob/master/lib/kitchen/driver/vagrant.rb#L252

@coderanger
Copy link
Contributor

That is correct, the feature is only supported on specific boxes we know it works on.

@jakauppila
Copy link
Contributor Author

Sure, but for cases where I know the feature works for a non-bento box, shouldn't there be a config option that I can explicitly allow it? Definitely understand if it's disabled by default.

@coderanger
Copy link
Contributor

Mostly we didn't want to deal with the support burden because the caching system was more than a bit unstable at first. I think it had settled down enough that we would be open to a patch to allow it, though I'm not sure of the best approach.

@cheeseplus cheeseplus self-assigned this Mar 9, 2018
@cheeseplus
Copy link
Contributor

Happy to look at a patch, to be honest I thought we'd left it so that a user could explicitly set the dir still so I'm happy to fix this one. I was mostly cleaning up other folks code which was a bit more liberal about enabling as @coderanger mentions so this was probably erring on the side of safety at the time without realizing it.

@jakauppila
Copy link
Contributor Author

Do you have a preference for how it's implemented?

  • Just allowing the existence of cache_directory to enable it
  • Explicit configuration option to enable
  • 'Safe' box name override configuration option

@cheeseplus
Copy link
Contributor

In my mind we should honor cache_directory if explicitly set and only automatically enable it when it's one of the blessed sub-set of bento boxes.

cheeseplus pushed a commit that referenced this issue Apr 24, 2018
Signed-off-by: Seth Thomas <[email protected]>
@jakauppila
Copy link
Contributor Author

Any chance we could resurrect #357 or at a minimum add the @tas50 Windows boxes to the safe_share? list?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants