impossible to upgrade package from vivid to wily because of maintainer script reference to upstart job without matching init script
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
isc-dhcp (Ubuntu) |
Triaged
|
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-
initctl: Unable to connect to Upstart: Failed to connect to socket /com/ubuntu/
invoke-rc.d: unknown initscript, /etc/init.
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/
invoke-rc.d: unknown initscript, /etc/init.
dpkg: error processing archive /var/cache/
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.
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.
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:/
ProblemType: Bug
DistroRelease: Ubuntu 15.10
Package: isc-dhcp-server 4.3.1-5ubuntu2.2
ProcVersionSign
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.
mtime.conffile.
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.