That script on Ubuntu 14.04 has no output and exits with a status of 1. I attempted to run the same thing manually from the command line on one of the servers and had the same result, no output and an exit status of 1. I did some searching and found other people are running into this same issue with various other services. I did find the command 'service ssh restart' would do the right thing and not throw an error. Since it seemed like this is an Ubuntu or Debian bug with the start scripts I decided to just modify my Chef scripts to use the service command instead.
By default Chef attempts run the scripts in /etc/init.d when starting and stopping services. The service resource in Chef has some attributes that let you modify how services are started. The attributes start_command, stop_command, restart_command and reload_command let you define an alternate command for these actions. Here are the changes I made to get my Chef scripts working again on Ubuntu 14.04.
service "rsyslog" do supports :restart => true action [:enable,:start] end
service "rsyslog" do restart_command "service rsyslog restart" start_command "service rsyslog start" supports :restart => true action [:enable,:start] end
This change is backwards compatible with older versions of Ubuntu so I don't have to worry about special casing this just for 14.04 boxes.
After reading a bit more I'm starting to suspect Ubuntu and/or Debian has purposely deprecated running the scripts in /etc/init.d to force people to use Upstart. Apparently these init scripts have been broken since Ubuntu 13.10.
@retr0h gave me a cleaner way of accomplishing this:
service "rsyslog" do provider Chef::Provider::Service::Upstart supports :restart => true action [:enable,:start] end
This does the same thing without having to define each command individually.
@jtimberman informed me that this problem will be fixed in Chef 11.14. In that version Chef will automatically use Upstart for Ubuntu 13.10 and higher. (Chef support ticket) (Git commit)