- From:
- To:
- Cc: Brad Knowles <
>
- Subject: [chef] Re: Re: initial chef-client run won't exit
- Date: Fri, 2 Dec 2011 12:34:23 -0800
On Fri, 02 Dec 2011, Brad Knowles wrote:
>
On Dec 2, 2011, at 1:08 PM,
>
>
wrote:
>
>
> my client is Centos 5.7, chef 0.10.4-1. the way i intialize chef on the
>
> client is by running:
>
>
>
> chef-client -j /etc/chef/first-boot.json -L /var/log/chef/client.log -l
>
> debug --once
>
>
>
> but that first chef-client run never exits, it hangs onto the tty (if
>
> there is one). or when it's run at first boot via an init script, i see
>
> the same hang.
>
>
The last time I saw anything like that, it was because someone had changed
>
their knife.rb to default chef to staying resident and not exiting, which
>
apparently does not get over-ridden by command-line options like "--once".
(yeah that was me back on Nov 2nd)
>
>
>
> ~]# cat /etc/chef/client.rb
>
> log_level :info
>
> log_location STDOUT
>
> interval 21600
>
>
Oh, sorry -- it must have been this option in the client.rb, not in
>
knife.rb. But notice that the chef process below is running with a "-i
>
21600" argument, which is why all the chef-client runs will sleep at the
>
end of the run instead of terminating.
>
>
Try removing this option.
but that option is actually not present for the very first chef-client
run. (sorry that wasn't clear from my initial post). the first run to
bootstrap the system runs with a client.rb in place like this:
~]# cat /etc/chef/client.rb-first-boot-here-y0h
log_level :info
log_location STDOUT
ssl_verify_mode :verify_none
chef_server_url "
https://10.doop.burf.113"
file_cache_path "/var/cache/chef"
file_backup_path "/var/lib/chef/backup"
pid_file "/var/run/chef/client.pid"
cache_options({ :path => "/var/cache/chef/checksums", :skip_expires => true})
signing_ca_user "chef"
Mixlib::Log::Formatter.show_time = true
environment "dev"
there is no interval stated there. the client.rb that shows the interval
is a result of the chef-client recipe running during that first
chef-client run.
and even if the first chef-client run used a client.rb with an interval set,
shouldn't using --once override the looping? that's what i understood from
Dan DeLeo's response here:
http://lists.opscode.com/sympa/arc/chef/2011-11/msg00025.html
i'm running this again on a fresh system from the top:
~]# chef-client -c /etc/chef/client.rb-first-boot-here-y0h -j
/etc/chef/first-boot.json -L /var/log/chef/client.log -l debug --once
and the result is the same behavior as before.
kallen
Archive powered by MHonArc 2.6.16.