dpkg-reconfigure unattended-upgrades results in update-rc.d warning that start and stop actions are no longer supported

Bug #1606600 reported by Rod Smith
54
This bug affects 10 people
Affects Status Importance Assigned to Milestone
One Hundred Papercuts
Fix Released
High
Unassigned
unattended-upgrades (Ubuntu)
Fix Released
High
Unassigned

Bug Description

I'm trying to script a change to the automatic updating of servers, and tried the following:

echo "debconf unattended-upgrades/enable_auto_updates boolean false" | debconf-set-selections -
dpkg-reconfigure -fnoninteractive unattended-upgrades

The result, however, is a warning message:

update-rc.d: warning: start and stop actions are no longer supported; falling back to defaults

At this point, the change I tried to make seems to be lost. To show this in an expanded sequence:

root@brennan:/home/ubuntu# debconf-show unattended-upgrades
* unattended-upgrades/origins_pattern: "origin=Debian,codename=${distro_codename},label=Debian-Security";
* unattended-upgrades/enable_auto_updates: true
root@brennan:/home/ubuntu# echo "debconf unattended-upgrades/enable_auto_updates boolean false" | debconf-set-selections -
root@brennan:/home/ubuntu# debconf-show unattended-upgrades
* unattended-upgrades/origins_pattern: "origin=Debian,codename=${distro_codename},label=Debian-Security";
* unattended-upgrades/enable_auto_updates: false
root@brennan:/home/ubuntu# dpkg-reconfigure -fnoninteractive unattended-upgrades
update-rc.d: warning: start and stop actions are no longer supported; falling back to defaults
root@brennan:/home/ubuntu# debconf-show unattended-upgrades
* unattended-upgrades/enable_auto_updates: true
* unattended-upgrades/origins_pattern: "origin=Debian,codename=${distro_codename},label=Debian-Security";

If I omit the "-fnoninteractive" option to dpkg-reconfigure, I still get the warning message, but the change IS accepted and takes effect. Of course, this isn't useful in a script that should be run non-interactively. I've tried the equivalent commands to reconfigure other packages, and they work without error message, so I believe the problem is with unattended-upgrades, not with debconf/dpkg-reconfigure.

This problem affects Ubuntu 16.04.1 (and probably 16.04 GA, but I've not tested it). It works as expected with Ubuntu 14.04. (That version, of course, defeaults to "false" for the unattended-upgrades/enable_auto_updates value. I've tested both with the default "false" value and after changing it to "true," with successful runs both times.)

Version information, as requested:

$ lsb_release -rd
Description: Ubuntu 16.04.1 LTS
Release: 16.04

$ apt-cache policy unattended-upgrades
unattended-upgrades:
  Installed: 0.90
  Candidate: 0.90
  Version table:
 *** 0.90 500
        500 http://192.168.1.2//ubuntu xenial/main amd64 Packages
        500 http://192.168.1.2//ubuntu xenial/main i386 Packages
        100 /var/lib/dpkg/status

$ apt-cache policy debconf
debconf:
  Installed: 1.5.58ubuntu1
  Candidate: 1.5.58ubuntu1
  Version table:
 *** 1.5.58ubuntu1 500
        500 http://192.168.1.2//ubuntu xenial/main amd64 Packages
        500 http://192.168.1.2//ubuntu xenial/main i386 Packages
        100 /var/lib/dpkg/status

Tags: patch xenial
Mathew Hodson (mhodson)
tags: added: xenial
Mathew Hodson (mhodson)
summary: - "dpkg-reconfigure unattended-upgrades" results in error message, no
- change to configuration in Ubuntu 16.04
+ dpkg-reconfigure unattended-upgrades results in update-rc.d warning that
+ start and stop actions are no longer supported
Changed in unattended-upgrades (Ubuntu):
importance: Undecided → Low
importance: Low → Undecided
Revision history for this message
Mathew Hodson (mhodson) wrote :

The warning message is because of the following line in debian/rules.

dh_installinit $@ --no-start -- stop 10 0 6 .

It is just warning that the stop action is now ignored. It shouldn't have any impact. See this announcement.

https://lists.debian.org/debian-devel/2013/05/msg01109.html

Revision history for this message
Rod Smith (rodsmith) wrote :

Matthew, note that the change I was trying to make did not take effect. This might be independent of the warning message, but it's the real problem being reported. As noted, omitting "-fnoninteractive" enables it to work, but as I'm trying to do this in a script, that omission is not a reasonable option.

Revision history for this message
Launchpad Janitor (janitor) wrote :

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

Changed in unattended-upgrades (Ubuntu):
status: New → Confirmed
Revision history for this message
Musbach (frank-musbach) wrote :

Hello,
I am fighting exactly with the same problem. Is there any workaround?
Thanks
BR

Changed in unattended-upgrades (Ubuntu):
importance: Undecided → High
Changed in hundredpapercuts:
status: New → Confirmed
importance: Undecided → High
Revision history for this message
Chris Glass (tribaal) wrote :

I *think* the root of the issue is that the assumption in debian/rules

 # we do not want to run the init script in the postinst/prerm, its
 # really only useful on shutdown, see Debian bug #645919
 dh_installinit $@ --no-start -- stop 10 0 6 .

is wrong.

It is not only useful on shutdown but also when dpkg-reconfigure is invoked.

As a strawman fix, I've uploaded a fixed (xenial) package to https://launchpad.net/~tribaal/+archive/ubuntu/unattended-upgrades

It seems to fix the issue in my limited testing: running "dpkg-reconfigure -fnoninteractive unattended-upgrades" does apply changes passed by debconf-set-selections.

I'll attach a debdiff to this bug as well, and open a pull request upsteam.

Revision history for this message
Chris Glass (tribaal) wrote :

This debdiff should fix the problem.

Revision history for this message
Ubuntu Foundations Team Bug Bot (crichton) wrote :

The attachment "debdiff for xenial" seems to be a debdiff. The ubuntu-sponsors team has been subscribed to the bug report so that they can review and hopefully sponsor the debdiff. If the attachment isn't a patch, please remove the "patch" flag from the attachment, remove the "patch" tag, and if you are member of the ~ubuntu-sponsors, unsubscribe the team.

[This is an automated message performed by a Launchpad user owned by ~brian-murray, for any issue please contact him.]

tags: added: patch
Revision history for this message
Brian Murray (brian-murray) wrote :

You removed your upstream pull request, do you think this still needs sponsoring?

Changed in unattended-upgrades (Ubuntu):
status: Confirmed → Incomplete
Revision history for this message
Chris Glass (tribaal) wrote :

More investigation is needed. The path *does* fix the problem, but in a way that feels like it is a side effect.

Sorry, I should have commented on this bug before.

Revision history for this message
Brian Murray (brian-murray) wrote :

Since this requires more investigation I'm going to unsubscribe the ubuntu-sponsors team.

Revision history for this message
Balint Reczey (rbalint) wrote :

This was fixed in several steps with the last one landing in 0.99. The issue should be fixed now.

Changed in unattended-upgrades (Ubuntu):
status: Incomplete → Fix Released
Changed in hundredpapercuts:
status: Confirmed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.