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

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

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: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=856415

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. https://github.com/chef/chef/commit/5320cbf9b41789a46a5c5c0a2d818966c9716405?diff=unified#diff-8561ad40ccb208ff3c3f12bf88746df2

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 :

@jjudd

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

https://docs.chef.io/release_notes.html#what-s-new-in-14-1-1

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]
end

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

Other bug subscribers