impossible to upgrade package from vivid to wily because of maintainer script reference to upstart job without matching init script

Bug #1485396 reported by Steve Langasek
30
This bug affects 5 people
Affects Status Importance Assigned to Milestone
isc-dhcp (Ubuntu)
Fix Released
Critical
Mathieu Trudel-Lapierre

Bug Description

The isc-dhcp-server package is not upgradable on a real machine (vs. a chroot) in vivid or wily, because it installs two upstart jobs in the usual debhelper way, but only one of them has a matching init script. As a result, on a system with systemd as init, isc-dhcp-server will fail to even unpack over a running system:

Preparing to unpack .../isc-dhcp-server_4.3.1-5ubuntu3_amd64.deb ...
initctl: Unable to connect to Upstart: Failed to connect to socket /com/ubuntu/upstart: Connection refused
invoke-rc.d: unknown initscript, /etc/init.d/isc-dhcp-server6 not found.
dpkg: warning: subprocess old pre-removal script returned error exit status 100
dpkg: trying script from the new package instead ...
initctl: Unable to connect to Upstart: Failed to connect to socket /com/ubuntu/upstart: Connection refused
invoke-rc.d: unknown initscript, /etc/init.d/isc-dhcp-server6 not found.
dpkg: error processing archive /var/cache/apt/archives/isc-dhcp-server_4.3.1-5ubuntu3_amd64.deb (--unpack):
 subprocess new pre-removal script returned error exit status 100

This is because both new and old packages include the following in the prerm:

# Automatically added by dh_installinit
if [ -x "/etc/init.d/isc-dhcp-server6" ] || [ -e "/etc/init/isc-dhcp-server6.conf" ]; then
        invoke-rc.d isc-dhcp-server6 stop || exit $?
fi
# End automatically added section

This code will never succeed on a system running systemd.

It may be that debhelper's behavior here should be changed. However, as we have two upstart jobs in the package for a reason, I think the more important fix is to split the init script. This will then also require some particular upgrade handling in the prerm since the prerm runs before any new /etc/init.d/isc-dhcp-server6 script would be unpacked.

It's also worth noting that this problem was apparently not picked up by the reports about packages missing init scripts; presumably because the isc-dhcp-server has an init script, but not init scripts matching all of the included upstart jobs.
 https://people.canonical.com/~jhunt/systemd/packages-to-convert/2015-08-17.txt

ProblemType: Bug
DistroRelease: Ubuntu 15.10
Package: isc-dhcp-server 4.3.1-5ubuntu2.2
ProcVersionSignature: Ubuntu 3.19.0-25.26-generic 3.19.8-ckt2
Uname: Linux 3.19.0-25-generic x86_64
ApportVersion: 2.18-0ubuntu6
Architecture: amd64
CurrentDesktop: Unity
Date: Mon Aug 17 02:58:14 2015
InstallationDate: Installed on 2010-09-24 (1787 days ago)
InstallationMedia: Ubuntu 10.04.1 LTS "Lucid Lynx" - Release amd64 (20100816.1)
SourcePackage: isc-dhcp
UpgradeStatus: Upgraded to wily on 2015-08-17 (0 days ago)
modified.conffile..etc.dhcp.dhcpd.conf: [modified]
mtime.conffile..etc.dhcp.dhcpd.conf: 2013-09-19T21:48:37.910820

Revision history for this message
Steve Langasek (vorlon) wrote :
Changed in isc-dhcp (Ubuntu):
importance: Undecided → Critical
status: New → Triaged
assignee: nobody → Mathieu Trudel-Lapierre (mathieu-tl)
milestone: none → ubuntu-15.10
Revision history for this message
Steve Langasek (vorlon) wrote :

Also of note: several other packages failed with similar issues on my system, but with a failure on postinst rather than prerm. It seems a later version of invoke-rc.d "handles" this case:

$ sudo dpkg --configure -a
[sudo] password for vorlon:
Setting up modemmanager (1.4.10-1) ...
Setting up nfs-common (1:1.2.8-9ubuntu9) ...
invoke-rc.d: gssd.service doesn't exist but the upstart job does. Nothing to start or stop until a systemd or init job is present.
invoke-rc.d: idmapd.service doesn't exist but the upstart job does. Nothing to start or stop until a systemd or init job is present.

So an upgrade solution may be to pre-depend on the newer invoke-rc.d.

Revision history for this message
Benjamin Drung (bdrung) wrote :

Ubuntu 15.10 (wily) reached end-of-life on July 28, 2016.

See this document for currently supported Ubuntu releases:
https://wiki.ubuntu.com/Releases

Since this bug only affected upgrades, the time to fix has passed. So I am marking this bug as invalid.

Changed in isc-dhcp (Ubuntu):
status: Triaged → Invalid
Revision history for this message
Steve Langasek (vorlon) wrote :

Well also this bug was fixed in later releases, the package doesn't fail to unpack on systems with systemd as init

Changed in isc-dhcp (Ubuntu):
status: Invalid → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

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