- From: Daniel DeLeo <
>
- To:
- Subject: [chef] Re: Re: Disable chef-client?
- Date: Wed, 22 Oct 2014 15:13:33 -0700
On Wednesday, October 22, 2014 at 12:18 PM, Peter Burkholder wrote:
>
Lockfile? See
>
https://www.getchef.com/blog/2013/02/06/chef-11-in-depth-client-improvements/
>
and
>
>
# In client.rb or solo.rb
>
lockfile "/not-nfs/chef-lockfile.pid"
Chef uses flocks to ensure that there is a live “owner” of this lockfile, and
depending on configuration, the default behavior if the lock isn’t available
is for chef to wait, so this isn’t really a good option.
>
>
>
>
On Wed, Oct 22, 2014 at 11:49 AM, Douglas Garstang
>
<
>
>
(mailto:
)>
>
wrote:
>
> All,
>
>
>
> When the chef-client is running as a daemon, is there a way to keep the
>
> client running as a daemon, but temporarily put it into NOOP mode?
>
>
>
> Doug
Doug,
There’s nothing built-in to do this. You could maybe experiment with using a
data bag item to drive recipe code that would set `Chef::Config[:why_run]` to
true, but I’m not sure it will work. Though we do something similar with a
“suicide” cookbook that makes chef-client abort early if a certain data bag
item contains a specific value (and we added some scripts to change the data
bag item easily from the command line.
HTH,
--
Daniel DeLeo
Archive powered by MHonArc 2.6.16.