Timer Disabling on Package Update? (is: #922031)

Michael Biebl biebl at debian.org
Sun Mar 10 17:02:16 GMT 2019


Am 10.03.19 um 17:59 schrieb Michael Biebl:
> Am 10.03.19 um 17:54 schrieb Michael Biebl:
>> Am 10.03.19 um 17:36 schrieb Harlan Lieberman-Berg:
>>> On Sun, Mar 10, 2019 at 12:29 PM Michael Biebl <biebl at debian.org> wrote:
>>>> Can you provide the output of
>>>> systemctl status certbot.timer
>>>> journalctl -u certbot.timer
>>>
>>> The output of `systemctl show certbot.timer` is at
>>> https://bugs.debian.org/cgi-bin/bugreport.cgi?att=1;bug=922031;filename=systemctl-show-certbot.timer.txt;msg=20
>>> .  One of the reporters will have to follow up with the output of
>>> journalctl -u certbot.timer, as I can't replicate the problem.
>>>
>>>> Is certbot.timer restarted as part of the package update?
>>>
>>> Not unless dh_installsystemd is doing it automagically, no.
>>
>> I had a quick look, it's a bug in your package.
>> What happens is roughly this:
>>
>> 0.12 used and older compat level where
>> dh_systemd_start defaults to stop in old/prerm, and start in
>> new/postinst. So during the upgrade, certbot.prerm stops certbot.timer.
> 
> Check 0.10.12's /var/lib/dpkg/info/certbot.prerm:
> 
> if [ -d /run/systemd/system ]; then
>         deb-systemd-invoke stop certbot.timer >/dev/null
> fi
> 
> Your timer is stopped at this point.
> 
>> Your newer certbot package uses a newer compat level which defaults to
>> restart after upgrade.
>> If you check /var/lib/dpkg/info/certbot.postinst, you'll see a
>> systemctl try-restart certbot-timer.
>> This will only restart systemd if it was started.
>> Since the old package stopped certbot timer in prerm, your certbot.timer
>> is not (re)started on upgrades.
> 
> 0.28.0's /var/lib/dpkg/info/certbot.postinst
> 
> # Automatically added by dh_systemd_start
> if [ -d /run/systemd/system ]; then
>         systemctl --system daemon-reload >/dev/null || true
>         if [ -n "$2" ]; then
>                 _dh_action=try-restart
>         else
>                 _dh_action=start
>         fi
>         deb-systemd-invoke $_dh_action certbot.timer >/dev/null || true
> fi
> 
> from man systemctl:
> 
>        try-restart PATTERN...
>            Restart one or more units specified on the command line if
> the units are running. This does nothing if units are not running.
> 

restart-after-upgrade is the default starting with compat level 10.
See the debhelper man page.


-- 
Why is it that all of the instruments seeking intelligent life in the
universe are pointed away from Earth?

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: OpenPGP digital signature
URL: <http://alioth-lists.debian.net/pipermail/pkg-systemd-maintainers/attachments/20190310/8188b9a1/attachment.sig>


More information about the Pkg-systemd-maintainers mailing list