- From: KC Braunschweig <
>
- To:
- Subject: [chef] Re: trouble getting service to start
- Date: Sat, 18 Feb 2012 11:55:46 -0800
- Authentication-results: mr.google.com; spf=pass (google.com: domain of
designates 10.152.48.69 as permitted sender)
; dkim=pass
Debug output should help make it more clear, but check if your init
script works properly. On RedHat, the provider assumes the init script
will support a status command. It will try to do a status check to see
if the service is running before starting it. If the status command
isn't supported or implemented wrong (doesn't set expected exit
status), chef may get the impression the service is running when it
isn't and therefore not try to start it.
If you can't fix the init script, you can make chef use the generic
init provider and then grep the process list rather than use status
(this is to work around
http://tickets.opscode.com/browse/CHEF-2345).
It looks like:
service "brisk" do
action [:enable, :start]
provider Chef::Provider::Service::Init
pattern 'brisk'
end
KC
On Sat, Feb 18, 2012 at 11:26 AM,
<
>
wrote:
>
>
Chef folks,
>
>
I’m having trouble getting a service to start using the chef service
>
resource. If I do either of the following
>
>
service "brisk" do
>
action [:enable, :start]
>
end
>
>
service "brisk" do
>
action [:enable, :start]
>
start_command "/etc/init.d/brisk start"
>
end
>
>
then brisk doesn’t start, and I see no signs anywhere of trouble, except
>
that
>
the service isn’t running, and there’s no log file for brisk. But if
>
instead I do
>
>
execute "start_brisk" do
>
command "/etc/init.d/brisk start"
>
action :run
>
end
>
>
then brisk starts up the way it should. Any thoughts about what I’m doing
>
wrong? If it makes a difference, the target machine is RedHat 5.5.
>
>
Thanks in advance for the help,
>
>
Jeff Stroomer
Archive powered by MHonArc 2.6.16.