[chef] Re: Re: Re: Chef Client .... not doing anything.


Chronological Thread 
  • From: Tiago Cruz < >
  • To: " " < >
  • Subject: [chef] Re: Re: Re: Chef Client .... not doing anything.
  • Date: Fri, 5 Dec 2014 17:11:55 -0200

My first run is when the machine starts (I've created a service to do this)


On Fri, Dec 5, 2014 at 4:09 PM, Douglas Garstang < " target="_blank"> > 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?

Doug.

On Fri, Dec 5, 2014 at 10:02 AM, Douglas Garstang < " target="_blank"> > wrote:
Jordan,

Did something change regarding this behavior in say, the last 24 hours? With the ominibus install, you never know what your going to get. I'm pretty sure this behavior is new. I used to (ie yesterday) be able to start the client in daemon mode and it would run somewhere between immediately and the splay period. It makes no sense to me that the timing of the initial run would be the splay period PLUS the interval.

Are you sure this is expected behavior? The FATAL messages are from when I stopped the daemon.

Doug.

On Fri, Dec 5, 2014 at 9:55 AM, Jordan Wesolowski < " target="_blank"> > wrote:
Looks like you are running chef-client in daemon mode. The reason for the sleep of 1970 seconds is it takes your interval (-i 1800) and adds a variable splay (-s 300) to sleep between chef runs. So the sleeping seems to be working as expected. What is the run list set to on this node?

Kill that daemonized chef-client run and instead run just:
chef-client

Do you get any more information why the FATAL is happening?




On Fri, Dec 5, 2014 at 10:49 AM, Douglas Garstang < " target="_blank"> > wrote:

This is chef version chef-12.0.0-1.

My client.rb contains:

ssl_verify_mode         :verify_peer
log_level               :debug
log_location            STDOUT
chef_server_url         'https://chef01.prod.slicetest.com:443'
validation_client_name  'chef-validator'
validation_key           "/etc/chef/validator-chef01.prod.slicetest.com.pem"

Running the chef-client service gets me a process that looks like:

root      2405     1  0 17:39 ?        00:00:00 /opt/chef/embedded/bin/ruby /usr/bin/chef-client -d -c /etc/chef/client.rb -L /var/log/chef/client.log -P /var/run/chef/client.pid -i 1800 -s 300

And the pièce de résistance is this in /var/log/chef/client.log:

# Logfile created on 2014-12-05 17:39:28 +0000 by logger.rb/44203
[2014-12-05T17:39:28+00:00] INFO: Daemonizing..
[2014-12-05T17:39:28+00:00] INFO: Forked, in 2405. Privileges: 0 0
[2014-12-05T17:45:24+00:00] FATAL: SIGTERM received, stopping
[2014-12-05T17:45:30+00:00] INFO: Daemonizing..
[2014-12-05T17:45:30+00:00] INFO: Forked, in 2577. Privileges: 0 0
[2014-12-05T17:45:30+00:00] DEBUG: Sleeping for 1970 seconds


Wut? Why did chef run, do nothing and then decide to sleep for 1970 seconds???

Doug




--



--



--
-- Tiago Cruz




Archive powered by MHonArc 2.6.16.

§