Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chef run fails when using upstart #134

Closed
aarondodd opened this issue Aug 20, 2014 · 2 comments

Comments

Projects
None yet
3 participants
@aarondodd
Copy link

commented Aug 20, 2014

I explicitly set :rabbitmq:job_control to "upstart" and afterwards I get the the following error on chef runs (error on second to last line):

[2014-08-20T17:41:58+00:00] INFO: template[/etc/rabbitmq/rabbitmq.config] not queuing delayed action restart on servicerabbitmq-server, as it's already been queued
[2014-08-20T17:41:58+00:00] INFO: template[/etc/rabbitmq/rabbitmq.config] not queuing delayed action restart on servicerabbitmq-server, as it's already been queued
[2014-08-20T17:41:58+00:00] INFO: Processing service[stop rabbitmq-server] action stop (rabbitmq::default line 186)
[2014-08-20T17:41:58+00:00] INFO: Running queued delayed notifications before re-raising exception
[2014-08-20T17:41:58+00:00] INFO: template[/etc/rabbitmq/rabbitmq-env.conf] sending restart action to servicerabbitmq-server
[2014-08-20T17:41:58+00:00] INFO: Processing service[rabbitmq-server] action restart (rabbitmq::default line 73)
[2014-08-20T17:42:01+00:00] INFO: service[rabbitmq-server] restarted
[2014-08-20T17:42:01+00:00] ERROR: Running exception handlers
[2014-08-20T17:42:01+00:00] ERROR: Exception handlers complete
[2014-08-20T17:42:01+00:00] FATAL: Stacktrace dumped to /var/chef/cache/chef-stacktrace.out
[2014-08-20T17:42:01+00:00] ERROR: service[stop rabbitmq-server](rabbitmq::default line 186) had an error: Errno::ENOENT: No such file or directory - /etc/init.d/rabbitmq-server stop
[2014-08-20T17:42:01+00:00] ERROR: Chef::Exceptions::ChildConvergeError: Chef run process exited unsuccessfully (exit code 1)

Checking the default.rb, I believe the issue is because it's missing a check for upstart as done previously. I.e. near the top:

Configure job control

if node['rabbitmq']['job_control'] == 'upstart'
...
service node['rabbitmq']['service_name'] do
provider Chef::Provider::Service::Upstart
action [:enable, :start]
# restart_command "stop #{node['rabbitmq']['service_name']} && start #{node['rabbitmq']['service_name']}"
end

but line 186 has no such check before hand and chef is defaulting to initd.

@jjasghar

This comment has been minimized.

Copy link
Collaborator

commented Nov 26, 2014

Chef-client 12 should resolved this. When chef-client 12 is GA'd and released please test it and see if it resolves it.

@cheeseplus

This comment has been minimized.

Copy link
Contributor

commented Dec 5, 2014

Just dropping a note that Chef 12 has hit GA today and the issue is no longer present.

@jjasghar jjasghar closed this Dec 5, 2014

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.