chef is calling update-rc.d with the deprecated "-n" flag

Bug #1766786 reported by Coops on 2018-04-25
This bug affects 7 people
Affects Status Importance Assigned to Milestone
chef (Ubuntu)

Bug Description

After upgrading to 18.06 LTS, chef (specifically chef-solo) breaks when trying to enable services.

The "-n" flag was removed from "update-rc.d" upstream here:

However chef (12.14.60-3ubuntu1) still uses it, which breaks configs. Example chef error:

    * service[xinetd] action enable
    * /usr/sbin/update-rc.d -n -f xinetd failed - #<Process::Status: pid 23972 exit 1>

Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in chef (Ubuntu):
status: New → Confirmed
James Judd (jjudd) wrote :

This issue was fixed in this commit in Chef. It's a 6 character diff.

I'm not sure how to go about submitting a patch to a package in Ubuntu, but I'll look into it.

Vinson Lee (vlee) wrote :


Consider using upstream Chef >= 14.1.1 instead of the Chef package from the Ubuntu repository. Upstream Chef has Ubuntu 18.04 support.

Easier said than done, seeing as AWS ubuntu 18.04 currently only has support up to Chef 12.18.31. IOW, it's impossible to do an OpsWorks run command that tries to do a update-rc.d -n ... (so much for no-ops)

Peter Schiffer (pschiffe) wrote :

@ellayararwhy you can workaround this by setting the service provider to systemd, like:

service 'example_service' do
  provider Chef::Provider::Service::Systemd
  action [:enable, :start]

To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers