[chef] Re: Re: Re: Re: Re: using /var/chef/tmp instead of /tmp as a workspace for recipes


Chronological Thread 
  • From: Bryan Berry < >
  • To:
  • Subject: [chef] Re: Re: Re: Re: Re: using /var/chef/tmp instead of /tmp as a workspace for recipes
  • Date: Thu, 14 Jun 2012 15:11:42 +0200

hmm, sounds like this calls for a new primitive

Dir.chef_tmpdir  that creates a tmpdir in the caching path that chef configured to use

On Thu, Jun 14, 2012 at 2:44 PM, Hedge Hog < " target="_blank"> > wrote:
On Thu, Jun 14, 2012 at 4:16 PM, Bryan Berry < "> > wrote:
> sounds like there is consensus
>
> Would this make for a good foodcritic rule?
>

Just a heads up on:

http://tickets.opscode.com/browse/CHEF-2786

Which can result in issues like this:

https://github.com/fnichol/chef-ruby_build/issues/2

The workaround for which is:

https://github.com/hedgehog/chef-ruby_build/commit/3ad58600f16d24e7aa51fa0ec66f51ba2ba62038

HTH

> Dir.mktmpdir   w/out arguments creates a directory in /tmp
>
> Dir.mktmpdir("/foo/bar")    creates a tmpdir in /foo/bar/
>
> a foodcritic rule would flag  Dir.mktmpdir   w/out a prefix
>
> Would such a rule be useful to anyone besides me?
>
>
> On Thu, Jun 14, 2012 at 8:11 AM, Steven Danna < "> > wrote:
>>
>> Hi,
>>
>> On Wed, Jun 13, 2012 at 11:05 PM, Ranjib Dey < "> >
>> wrote:
>> > i prefer to use the Chef::Config[:file_cache_path] (which usually points
>> > to
>> > /var/chef/cache) for similar use cases
>>
>> I'm also a fan of of using Chef::Config[:file_cache_path] for things
>> like this.  It is also helpful in cases where /tmp is being mounted as
>> a tmpfs and avoid chef-client runs periodically taking longer after
>> something cleared out /tmp.
>>
>> Cheers,
>>
>> Steven
>
>



--
πόλλ' οἶδ ἀλώπηξ, ἀλλ' ἐχῖνος ἓν μέγα
[The fox knows many things, but the hedgehog knows one big thing.]
  Archilochus, Greek poet (c. 680 BC – c. 645 BC)
http://hedgehogshiatus.com




Archive powered by MHonArc 2.6.16.

§