Hi,
I’m having trouble understanding why Chef isn’t detecting that a service is
failing to start. I’m attempting to get Pound (proxy) to work. The package
installs fine and I have a service declaration that says the service is
started when it’s not. I’m running via chef solo at the moment (it’s a
vagrant box) and running a chef-solo run with debug logging produces the
following:
[2015-05-12T01:45:50+00:00] DEBUG: service[pound] you have specified a
status command, running…pound is stoppedpound 0:off
1:off 2:on 3:on 4:on 5:on 6:offStarting Pound:
starting…[FAILED]Starting Pound: starting…[FAILED]Starting Pound:
starting…[FAILED]Starting Pound: starting…[FAILED]Starting Pound:
starting…[FAILED][2015-05-12T01:45:52+00:00] INFO: service[pound]
started- start service service[pound]
This are my recipe declaration:
# Install pound and deploy configuration file from templatepackage 'Pound’
do options ‘–enablerepo=epel’endtemplate ‘/etc/pound.cfg’ do source
’pound.cfg.erb’ mode 0644endservice ‘pound’ do supports :restart =>
false, :reload => false, :status => true action [:start, :enable]end
I have tried using the init_command and status_command options, as well as
disabling and enabling the supports :status => true option
If I put the above service declaration into a test file and run it
with *chef-apply
*then it fails as it should:
[2015-05-12T01:56:28+00:00] FATAL: Mixlib::ShellOut::ShellCommandFailed:
service[pound] ((chef-apply cookbook)::(chef-apply recipe) line 5) had an
error: Mixlib::ShellOut::ShellCommandFailed: Expected process to exit with
[0], but received ‘1’---- Begin output of /sbin/service pound start
----STDOUT: Starting Pound: [FAILED]STDERR: starting…---- End output of
/sbin/service pound start ----Ran /sbin/service pound start returned 1
The pound init script is set up to run correctly, a non-zero exit code is
returned on unsuccessful start of pound.
There are no processes called pound running on the system and there are no
other service declarations called pound in all of my cookbooks.
What am I missing?
Cheers
–
Yoshi Spendiff
Ops Engineer
Indochino
Mobile: +1 778 952 2025
Email: yoshi.spendiff@indochino.com