[Bug 1959054] Re: debhelper restarts services marked --no-restart-on-upgrade
Andreas Hasenack
1959054 at bugs.launchpad.net
Fri Feb 18 16:53:17 UTC 2022
I hit a problem in a dep8 test that relies on slapd (from openldap) to
be restarted after a "dpkg-reconfigure slapd". This restart stopped
happening in 2.5.11+dfsg-1~exp1ubuntu3, which was built with
13.6ubuntu1.
See how the authentication only works after I restart slapd manually:
root at j-slapd:~# pidof slapd
3570
root at j-slapd:~# /home/ubuntu/set-selections.sh
info: Trying to set 'slapd/domain' [string] to 'example.com'
info: Loading answer for 'slapd/domain'
info: Trying to set 'shared/organization' [string] to 'example'
info: Loading answer for 'shared/organization'
info: Trying to set 'slapd/password1' [password] to 'secret'
info: Loading answer for 'slapd/password1'
info: Trying to set 'slapd/password2' [password] to 'secret'
info: Loading answer for 'slapd/password2'
root at j-slapd:~# rm -rf /var/backups/*slapd* /var/backups/unknown*ldapdb
root at j-slapd:~# dpkg-reconfigure -fnoninteractive -pcritical slapd
Backing up /etc/ldap/slapd.d in /var/backups/slapd-2.5.11+dfsg-1~exp1ubuntu3... done.
Moving old database directory to /var/backups:
- directory unknown... done.
Creating initial configuration... done.
Creating LDAP directory... done.
root at j-slapd:~# pidof slapd
3570
root at j-slapd:~# ldapwhoami -x -D cn=admin,dc=example,dc=com -w secret
ldap_bind: Invalid credentials (49)
root at j-slapd:~# systemctl restart slapd
root at j-slapd:~# ldapwhoami -x -D cn=admin,dc=example,dc=com -w secret
dn:cn=admin,dc=example,dc=com
root at j-slapd:~#
With the packages from the release pocket, slapd is restarted after the dpkg-reconfigure and the test works.
I'm attaching a diff between the prelease and proposed maintainerscripts
for slapd.
** Patch added: "slapd-scripts.diff"
https://bugs.launchpad.net/ubuntu/+source/debhelper/+bug/1959054/+attachment/5561893/+files/slapd-scripts.diff
--
You received this bug notification because you are a member of Ubuntu
Foundations Bugs, which is subscribed to debhelper in Ubuntu.
https://bugs.launchpad.net/bugs/1959054
Title:
debhelper restarts services marked --no-restart-on-upgrade
Status in debhelper package in Ubuntu:
Confirmed
Status in docker.io package in Ubuntu:
Confirmed
Status in libvirt package in Ubuntu:
Triaged
Status in debhelper source package in Jammy:
Confirmed
Status in docker.io source package in Jammy:
Confirmed
Status in libvirt source package in Jammy:
Triaged
Status in debhelper package in Debian:
New
Bug description:
Debian bug #994204 (https://bugs.debian.org/cgi-
bin/bugreport.cgi?bug=994204) describes a flaw in debhelper that
results in the postinst being generated in such a fashion that
services marked --no-stop-on-upgrade (or its deprecated alias --no-
restart-on-upgrade), restart anyway.
Please note: this is nothing to do with the --no-restart-after-upgrade
flag (which is, somewhat confusingly IMO, unrelated).
I've confirmed that the flaw appears to be present in the jammy
version of debhelper (though not impish) and that packages generated
with it appear to contain the flawed postinst (I first encountered
this whilst working on the open-iscsi merge), though I haven't yet
managed to test that the flaw exhibits itself on upgrade (though I'd
say from the presence of the flaw in the postinst, that it's a
reasonable inference that it will).
In dbus (the merge of which I'm currently working on), Debian has
worked around this but given I've now run into two affected packages
(open-iscsi and dbus), only one of which has a work-around, I'd much
rather we got debhelper fixed up and rebuilt affected packages?
To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/debhelper/+bug/1959054/+subscriptions
More information about the foundations-bugs
mailing list