[chef] Re: Re: Re: Chef 10.14.0.rc.1 fails on disabling non-existent services


Chronological Thread 
  • From: Andrea Campi < >
  • To:
  • Subject: [chef] Re: Re: Re: Chef 10.14.0.rc.1 fails on disabling non-existent services
  • Date: Thu, 30 Aug 2012 08:36:20 +0200

On Thu, Aug 30, 2012 at 6:19 AM, John Alberts 
< >
 wrote:
> That's great to hear.  Thanks
>
>
>
> On Wed, Aug 29, 2012 at 10:26 PM, Daniel DeLeo 
> < >
>  wrote:
>>
>> Definitely a bug and probably an easy fix. I'll make sure it gets
>> attention.

I commented on the ticket—I strongly believe the current behavior is
correct. Here it is for convenience:


There have been questions before, people wondering why Chef doesn't
create an init script—and the general consensus was that the service
resource should assume everything is set up correctly, including an
init script.

Following that line of reasoning, if I ask Chef to stop a service and
the init script is missing, Chef won't be able to stop it—and that's a
fatal error if there ever was one.
The stop action cannot assume the recipe is also calling disable—maybe
the recipe is stopping it to apply some changes and then start it
again. If the service doesn't stop, all bets are off; subsequent
actions may corrupt data and so on.

The disable action is different.
On most distros it doesn't depend on the init script at all, in which
case I agree it can ignore the absence of the init script.
The bottom line is, the service shouldn't swallow exceptions.

I think that's already the case, so here's my vote for rejecting this ticket.

(Note that I'm not arguing the implementation is perfect—if a
distro-specific init system doesn't need the init script to disable
the service yet it fails, then the distro-specific provider should be
fixed. I'm only arguing this shouldn't leak into the generic provider)



Archive powered by MHonArc 2.6.16.

§