- From: Mike <
>
- To: AJ Christensen <
>
- Cc: Chef Dev <
>
- Subject: [chef-dev] Re: Re: why-run requires an init script for 'service' resrouce
- Date: Mon, 10 Dec 2012 21:02:06 -0500
I'm not asking for a workaround.
I'm stating that I think that the 'service' resource, which accepts
"start", "stop", et al, variables, and does not require an ini script,
fails a Chef run on any version with why-run mode - not the resource
itself - and this seems like a failing to me.
-M
On Mon, Dec 10, 2012 at 8:57 PM, AJ Christensen
<
>
wrote:
>
You could explicitly use the Init or Simple service provider instead of
>
using the Redhat one, if you aren't using enable/disable, etc. These
>
obviously won't work without the presence of an init script (no?)
>
>
Cheers,
>
>
--AJ
>
>
>
On 11 December 2012 14:53, Mike
>
<
>
>
wrote:
>
>
>
> Anyone care to chime in on this? Is this a legit bug, or am I seeing
>
> something wrong?
>
>
>
> On Fri, Dec 7, 2012 at 1:42 PM, Mike
>
> <
>
>
> wrote:
>
> > Recently I came across an oddity in Chef 10.14.x/10.16.x, that looks
>
> > like a regression in behavior.
>
> >
>
> > I looked around for any existing tickets on this particular topic, and
>
> > couldn't find anyone with this specific issue.
>
> >
>
> > Running a recipe like this[0] that declares a service resource based
>
> > on parameters available[1] runs correctly on 10.12, but then breaks on
>
> > anything past that [2].
>
> >
>
> > Error message on my CentOS system comed from here[3].
>
> >
>
> > It looks as though the assumption is that the service provider will
>
> > always have an init script, typically to do the `action :enable`
>
> >
>
> > Since this is not the case, maybe one fix would be to modify this
>
> > line[4] to only cover 'enable', and handle checking for a
>
> > start_command, stop_command, etc and if none are provided, then use
>
> > the init.d script logic.
>
> >
>
> > I am curious to know if anyone else is using non-init service
>
> > invocations and have come across this, also if anyone wants to fix it,
>
> > I'm happy to help out.
>
> >
>
> > -Mike Fiedler
>
> >
>
> > [0]: https://gist.github.com/4235082#file_default.rb
>
> > [1]: http://docs.opscode.com/resource_service.html
>
> > [2]: https://gist.github.com/4235082#file_chef_10.14.4_output.txt
>
> > [3]:
>
> > https://github.com/opscode/chef/blob/10-stable/chef/lib/chef/provider/service/redhat.rb#L50
>
> > [4]:
>
> > https://github.com/opscode/chef/blob/10-stable/chef/lib/chef/provider/service/redhat.rb#L48
>
>
Archive powered by MHonArc 2.6.16.