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
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
Lockfile? See
and
lockfile "/not-nfs/chef-lockfile.pid"
On Wed, Oct 22, 2014 at 11:49 AM, Douglas Garstang doug.garstang@gmail.com
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
On Wednesday, October 22, 2014 at 12:18 PM, Peter Burkholder wrote:
Lockfile? See Chef 11 In-Depth: Client Improvements - Chef Blog | Chef 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 <doug.garstang@gmail.com (mailto:doug.garstang@gmail.com)> 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
My point of view: I would use a tag or an attribute and a top level (in run list) recipe aborting (gracefully if possible, can't remember this) the chef run if the tag is present.
---- Douglas Garstang a écrit ----
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
you may even use the resource "omnibus chef killer" from
as a starting point for yours.
Le 2014-10-23 00:22, Tensibai Zhaoying a écrit :
My point of view: I would use a tag or an attribute and a top level (in run list) recipe aborting (gracefully if possible, can't remember this) the chef run if the tag is present.
---- Douglas Garstang a écrit ----
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