- From: AJ Christensen <
>
- To:
- Subject: [chef] Re: Re: Re: out-of-the-box chef-client cookbook has no interval dial
- Date: Fri, 7 Oct 2011 14:24:47 +1300
Yo,
On 7 October 2011 14:22,
<
>
wrote:
>
On Fri, 07 Oct 2011, AJ Christensen wrote:
>
>
> Yo,
>
>
>
> >
>
> > cookbooks/chef-client/templates/default/client.rb.erb
>
>
>
> Sounds like a bug in the cookbook.
>
>
>
> > should i modify that template or is there a better "best practices"
>
> > way to handle this?
>
>
>
> You could modify the template locally, open a ticket on the COOK
>
> project, and/or supply the fix!
>
>
will do.
>
>
> Unfortunately, interval takes an integer - not a string. use:
>
>
>
> interval <%= node["chef_client"]["interval"].to_i %>
>
>
i just tried that.. still getting error. i definately appreciate the
>
help here via mailing list, but let me know if i should just head over
>
to opscode jira..
>
>
>
the top 3 lines of that client.rb.erb are now:
>
log_level :info
>
log_location STDOUT
>
interval "<%= node["chef_client"]["interval"].to_i %>"
>
>
uploaded the cookbook.
>
>
>
still getting an error.
>
>
[Fri, 07 Oct 2011 01:12:59 +0000] ERROR: TypeError: can't convert String
>
into time interval
>
[Fri, 07 Oct 2011 01:12:59 +0000] FATAL: Stacktrace dumped to
>
/var/cache/chef/chef-stacktrace.out
>
[Fri, 07 Oct 2011 01:12:59 +0000] ERROR: Sleeping for 21600 seconds before
>
trying again
>
/usr/lib/ruby/gems/1.8/gems/chef-0.10.4/bin/../lib/chef/application/client.rb:282:in
>
`select': can't convert String into time interval (TypeError)
>
from
>
/usr/lib/ruby/gems/1.8/gems/chef-0.10.4/bin/../lib/chef/application/client.rb:282:in
>
`client_sleep'
>
from
>
/usr/lib/ruby/gems/1.8/gems/chef-0.10.4/bin/../lib/chef/application/client.rb:263:in
>
`run_application'
>
from
>
/usr/lib/ruby/gems/1.8/gems/chef-0.10.4/bin/../lib/chef/application/client.rb:229:in
>
`loop'
>
from
>
/usr/lib/ruby/gems/1.8/gems/chef-0.10.4/bin/../lib/chef/application/client.rb:229:in
>
`run_application'
>
from
>
/usr/lib/ruby/gems/1.8/gems/chef-0.10.4/bin/../lib/chef/application.rb:67:in
>
`run'
>
from /usr/lib/ruby/gems/1.8/gems/chef-0.10.4/bin/chef-client:26
>
from /usr/bin/chef-client:19:in `load'
>
from /usr/bin/chef-client:19
>
>
10/07
>
01:
>
~]# head -3 /etc/chef/client.rb
>
log_level :info
>
log_location STDOUT
>
interval "21600"
Still getting rendered as a string here. You want that to appear as:
interval 21600
Please paste the relevant contents of your client.erb template.
Cheers,
–AJ
>
>
>
thoughts?
>
>
>
>
for shizzles i've tried both
>
>
"interval": "21600",
>
>
and
>
>
"interval": 21600,
>
>
in my override, like:
>
"override_attributes": {
>
"chef_client": {
>
"init_style": "init",
>
"interval": "21600",
>
"server_url": "https://chef.dev.sushimysavior.com",
>
"validation_client_name": "chef-validator"
>
}
>
}
>
>
>
>
Archive powered by MHonArc 2.6.16.