Chef cache location

5,519 views
Skip to first unread message

Thibaut Barrère

unread,
Feb 10, 2011, 5:42:14 AM2/10/11
to Vagrant
Hi,

while working on some recipes, I noticed that
Chef::Config[:file_cache_path] is set to '/tmp/vagrant-chef' by
default.

Some chef recipes use this folder to store downloaded files; if it's
under tmp, after a reboot the download will happen again (which
doesn't happen on the default chef installation).

So I'm just wondering:
- wouldn't it be better to put the vagrant default in a non tmp
folder ? (or are there drawbacks I didn't see) ?

I saw I can switch myself using :provisioning_path and setting it to
chef default (/var/chef/cache), if it helps someone.

Thanks!

-- Thibaut

Thibaut Barrère

unread,
Feb 10, 2011, 5:49:11 AM2/10/11
to Vagrant
Woops! Don't do that actually (setting provisioning_path to /var/chef/
cache) - it looks like it deleted my cookbooks git folder. No hurt I
can revert that back.

-- Thibaut

Thibaut Barrère

unread,
Feb 10, 2011, 5:54:16 AM2/10/11
to Vagrant
> Woops! Don't do that actually (setting provisioning_path to /var/chef/
> cache) - it looks like it deleted my cookbooks git folder. No hurt I
> can revert that back.

Wrong conclusion: I accidentally deleted the previous folder, which
was a shared folder on the machine - so no worries here.

-- Thibaut

Mitchell Hashimoto

unread,
Feb 10, 2011, 12:24:13 PM2/10/11
to vagra...@googlegroups.com
Hello,

On Thu, Feb 10, 2011 at 2:42 AM, Thibaut Barrère
<thibaut...@gmail.com> wrote:
> Hi,
>
> while working on some recipes, I noticed that
> Chef::Config[:file_cache_path] is set to '/tmp/vagrant-chef' by
> default.
>
> Some chef recipes use this folder to store downloaded files; if it's
> under tmp, after a reboot the download will happen again (which
> doesn't happen on the default chef installation).
>
> So I'm just wondering:
> - wouldn't it be better to put the vagrant default in a non tmp
> folder ? (or are there drawbacks I didn't see) ?

This is very easy to make configurable. I'll do that.

Best
Mitchell

Reply all
Reply to author
Forward
0 new messages