- From: "Julian C. Dunn" <
>
- To:
- Subject: [chef] Re: [chef-dev] debian services enable on every run
- Date: Tue, 17 Dec 2013 23:33:15 -0500
Is this the same problem as
https://tickets.opscode.com/browse/CHEF-4782 ?
- Julian
On Tue, Dec 17, 2013 at 10:38 PM, Joseph Holsten
<
>
wrote:
>
I was trying to kill spurious resource updating, and noticed that on ubuntu
>
the nginx cookbook will re-enable the nginx resource on every run.
>
>
So far as I can tell, everything comes down to this line in
>
Chef::Provider::Service::Debian#action_enable:
>
https://github.com/opscode/chef/blob/master/lib/chef/provider/service/debian.rb#L116
>
>
The trick is that it not only verifies that the service is enabled (duh)
>
but that the desired priority matches the current priority.
>
>
But looking at the service resource's initializer:
>
https://github.com/opscode/chef/blob/master/lib/chef/resource/service.rb#L44
>
and #priority:
>
https://github.com/opscode/chef/blob/master/lib/chef/resource/service.rb#L153
>
>
You can see that the default
>
>
will be nil, whereas the default
>
>
for a sane enabled service will be something like:
>
{
>
0 => :stop,
>
1 => :stop,
>
2 => :start,
>
3 => :start,
>
4 => :start,
>
5 => :start,
>
6 => :stop
>
}
>
>
What's the reasonable thing to do? Have init-style services explicitly
>
define their priorities (not-newb-friendly)? Only check if the service is
>
enabled (that is, enabled in any of run levels 2-5)? Set a non-nil default
>
priority for init services? Something else?
>
--
>
~j
--
[ Julian C. Dunn
<
>
* Sorry, I'm ]
[ WWW:
http://www.aquezada.com/staff/julian * only Web 1.0 ]
[
gopher://sdf.org/1/users/keymaker/ * compliant! ]
[ PGP: 91B3 7A9D 683C 7C16 715F 442C 6065 D533 FDC2 05B9 ]
- [chef] Re: [chef-dev] debian services enable on every run, Julian C. Dunn, 12/17/2013
Archive powered by MHonArc 2.6.16.