Fwd: Re: Re: Re: Chef Client .... not doing anything


#1

On 12/5/14, 10:09 AM, Douglas Garstang wrote:

From https://docs.getchef.com/release_notes.html

“Splay and interval values are applied before the chef-client run The
–interval and --splay values are applied before the chef-client run
when using the chef-client and chef-solo executables.”

I would love to hear the justification for this? Why would someone
want to wait 30 minutes for the chef-client to do it’s FIRST run?

Because if you run chef-client on the command line as part of a
bootstrapping process and you have the chef-client cookbook installed
which manages itself and starts a daemon process to manage chef-client
then you generally do not want the daemonized chef-client immediately
launching another chef-client converge while the current one is
executing. This can cause issues with subsequent bootstrapping code
since the daemonized asynchronous chef-client process can get into
fights over things like yum locks. So the first run of chef-client
should not be with interval or sleep options and will run immediately,
you should only use the sleeps with daemonized runs, and
sleeping-first-then-running causes issues with initial asynchronous
chef-client runs.


#2

My bootstrapping process doesn’t run chef-client on the command line.
It runs it as a service.

On Fri, Dec 5, 2014 at 11:50 AM, Lamont Granquist lamont@chef.io wrote:

On 12/5/14, 10:09 AM, Douglas Garstang wrote:

From https://docs.getchef.com/release_notes.html

“Splay and interval values are applied before the chef-client run The
–interval and --splay values are applied before the chef-client run
when using the chef-client and chef-solo executables.”

I would love to hear the justification for this? Why would someone
want to wait 30 minutes for the chef-client to do it’s FIRST run?

Because if you run chef-client on the command line as part of a
bootstrapping process and you have the chef-client cookbook installed
which manages itself and starts a daemon process to manage chef-client
then you generally do not want the daemonized chef-client immediately
launching another chef-client converge while the current one is
executing. This can cause issues with subsequent bootstrapping code
since the daemonized asynchronous chef-client process can get into
fights over things like yum locks. So the first run of chef-client
should not be with interval or sleep options and will run immediately,
you should only use the sleeps with daemonized runs, and
sleeping-first-then-running causes issues with initial asynchronous
chef-client runs.


Regards,

Douglas Garstang
http://www.linkedin.com/in/garstang
Email: doug.garstang@gmail.com
Cell: +1-805-340-5627