Lorenzo wrote:
> at this point 'systemctl status runit.service' shows the service as
> active and enabled, and i can also see the runsvdir process with
> pstree.
> 
> A few wild guess on why the service is not enabled for you:
> 
> * Maybe you disabled the service at some point before the upgrade?
>
>   Note that with systemd 'enabled' and 'started' are decoupled, so
>   if you disable the service it will continue to run until the next
>   reboot.

No, I've never disabled runit.

> * You are upgrading from an old version of runit (<2.1.2-31)?
> 
>   there's been a change in the directory that is watched by runsvdir
>   when runit is not init: it was /etc/runit/runsvdir/default, now
>   it's /etc/runit/runsvdir/svmanaged; again you will notice this
>   only on after a reboot: the runit.service is enabled and running  
>   but there will be no services supervised

Actually my /etc/service is a directory not a symlink at all, always
has been.  Here's every upgrade of the package going back 6 years:

root@ruth:~# grep 'upgrade runit' /var/log/dpkg.log 
2014-07-30 23:12:17 upgrade runit:amd64 2.1.1-6.2 2.1.1-7
2014-08-02 11:33:30 upgrade runit:amd64 2.1.1-7 2.1.1-8
2014-08-15 20:45:37 upgrade runit:amd64 2.1.1-8 2.1.2-1
2014-10-27 20:53:26 upgrade runit:amd64 2.1.2-1 2.1.2-2
2014-12-31 18:38:32 upgrade runit:amd64 2.1.2-2 2.1.2-3
2016-08-02 00:54:53 upgrade runit:amd64 2.1.2-3 2.1.2-5
2016-08-24 00:13:26 upgrade runit:amd64 2.1.2-5 2.1.2-6
2016-09-13 22:16:06 upgrade runit:amd64 2.1.2-5 2.1.2-8
2016-10-15 14:45:55 upgrade runit:amd64 2.1.2-8 2.1.2-9
2017-06-04 18:55:24 upgrade runit:amd64 2.1.2-9 2.1.2-9.2
2018-04-12 20:43:05 upgrade runit-systemd:all 2.1.2-9.2 2.1.2-10
2018-04-12 20:43:07 upgrade runit:amd64 2.1.2-9.2 2.1.2-10
2018-04-15 20:05:02 upgrade runit-helper:all 2.7.1 2.7.2
2018-04-15 20:05:03 upgrade runit-systemd:all 2.1.2-10 2.1.2-11
2018-04-15 20:05:05 upgrade runit:amd64 2.1.2-10 2.1.2-11
2018-04-23 00:03:50 upgrade runit-systemd:all 2.1.2-11 2.1.2-12
2018-04-23 00:03:51 upgrade runit:amd64 2.1.2-11 2.1.2-12
2018-05-14 21:53:35 upgrade runit-systemd:all 2.1.2-12 2.1.2-13
2018-05-14 21:53:36 upgrade runit:amd64 2.1.2-12 2.1.2-13
2018-05-27 14:25:26 upgrade runit-helper:all 2.7.2 2.7.3
2018-05-27 14:25:27 upgrade runit-systemd:all 2.1.2-13 2.1.2-14
2018-05-27 14:25:29 upgrade runit:amd64 2.1.2-13 2.1.2-14
2018-06-02 20:07:39 upgrade runit-systemd:all 2.1.2-14 2.1.2-15
2018-06-02 20:07:45 upgrade runit:amd64 2.1.2-14 2.1.2-15
2018-10-09 22:09:24 upgrade runit-systemd:all 2.1.2-15 2.1.2-16
2018-10-09 22:09:26 upgrade runit:amd64 2.1.2-15 2.1.2-16
2018-10-28 11:58:15 upgrade runit-systemd:all 2.1.2-16 2.1.2-17
2018-10-28 11:58:19 upgrade runit:amd64 2.1.2-16 2.1.2-17
2018-11-08 01:13:27 upgrade runit-systemd:all 2.1.2-17 2.1.2-18
2018-11-08 01:13:29 upgrade runit:amd64 2.1.2-17 2.1.2-18
2018-11-25 00:56:45 upgrade runit-systemd:all 2.1.2-18 2.1.2-19
2018-11-25 00:56:48 upgrade runit:amd64 2.1.2-18 2.1.2-19
2019-01-05 20:50:34 upgrade runit:amd64 2.1.2-19 2.1.2-21
2019-01-07 19:06:11 upgrade runit-systemd:all 2.1.2-19 2.1.2-22
2019-01-07 19:06:12 upgrade runit:amd64 2.1.2-21 2.1.2-22
2019-01-20 22:55:40 upgrade runit-helper:all 2.7.3 2.8.2
2019-01-23 20:58:40 upgrade runit-helper:all 2.8.2 2.8.3
2019-02-06 22:50:02 upgrade runit-helper:all 2.8.3 2.8.4
2019-02-10 21:49:13 upgrade runit-helper:all 2.8.4 2.8.5
2019-02-17 22:03:52 upgrade runit-helper:all 2.8.5 2.8.6
2019-03-08 19:45:02 upgrade runit-systemd:all 2.1.2-22 2.1.2-24
2019-03-08 19:45:04 upgrade runit:amd64 2.1.2-22 2.1.2-24
2019-03-11 22:05:05 upgrade runit-systemd:all 2.1.2-24 2.1.2-25
2019-03-11 22:05:07 upgrade runit:amd64 2.1.2-24 2.1.2-25
2019-07-12 22:17:30 upgrade runit-helper:all 2.8.6 2.8.13.1
2019-07-13 11:25:35 upgrade runit-helper:all 2.8.13.1 2.8.13.2
2019-07-17 10:00:04 upgrade runit-systemd:all 2.1.2-25 2.1.2-32
2019-07-17 10:00:06 upgrade runit:amd64 2.1.2-25 2.1.2-32
2019-08-16 20:56:34 upgrade runit-systemd:all 2.1.2-32 2.1.2-33
2019-08-16 20:56:36 upgrade runit:amd64 2.1.2-32 2.1.2-33
2019-09-02 13:44:41 upgrade runit-helper:all 2.8.13.2 2.8.14
2019-09-28 21:19:22 upgrade runit-systemd:all 2.1.2-33 2.1.2-35
2019-09-28 21:19:24 upgrade runit:amd64 2.1.2-33 2.1.2-35
2020-03-15 22:49:23 upgrade runit-systemd:all 2.1.2-35 2.1.2-36
2020-03-15 22:49:26 upgrade runit:amd64 2.1.2-35 2.1.2-36
2020-03-15 22:49:26 upgrade runit-helper:all 2.8.14 2.8.15
2020-07-26 14:51:57 upgrade runit-helper:all 2.8.15 2.9.0
2020-11-14 07:47:35 upgrade runit-helper:all 2.9.0 2.10.1
2020-11-22 20:43:00 upgrade runit-helper:all 2.10.1 2.10.2
2020-11-25 18:25:00 upgrade runit:amd64 2.1.2-36 2.1.2-38

It's not the critical difference, though of the 3 systems running
unstable that I've seen this failure on, all 3 were converted to
systemd from sysvinit and have been in existance for a long enough
time that /etc/service is not a symlink.  Ultimately it makes no
real difference to /etc/runit/2, and it's not going to be a
particularly uncommon scenario for those of us who've used this
software for a long time.

> With "fails to enable the runit.service" you mean that an error
> happened during the upgrade, or that the upgrade is successfull but
> at the end the service is disabled?

Upgrade is successful, no error messages, runit is still running at
the end of the process though it has been restarted, but post reboot
it doesn't start automatically becuase systemctl status shows disabled.

> What does 'systemctl status runit.service' say? (note the second line
> 'vendor preset: enabled')

● runit.service - Runit service supervision
     Loaded: loaded (/lib/systemd/system/runit.service; disabled; vendor 
preset: enabled)
     Active: inactive (dead)
       Docs: http://smarden.org/runit/



If I re-install runit-systemd:

root@ruth:~# dpkg --purge runit-run
(Reading database ... 25360 files and directories currently installed.)
Removing runit-run (2.1.2-38) ...
Purging configuration files for runit-run (2.1.2-38) ...
root@ruth:~# dpkg -i runit-systemd_2.1.2-36_all.deb 
(Reading database ... 25353 files and directories currently installed.)
Preparing to unpack runit-systemd_2.1.2-36_all.deb ...
Unpacking runit-systemd (2.1.2-36) over (2.1.2-36) ...
Setting up runit-systemd (2.1.2-36) ...
Created symlink /etc/systemd/system/multi-user.target.wants/runit.service → 
/lib/systemd/system/runit.service.

and sure enough, runit is running again, systemctl status shows enabled.  I
reboot, and it comes up automatically.  I roll runit-run forward
again:

debconf: delaying package configuration, since apt-utils is not installed
(Reading database ... 25354 files and directories currently installed.)
Removing runit-systemd (2.1.2-36) ...
Selecting previously unselected package runit-run.
(Reading database ... 25348 files and directories currently installed.)
Preparing to unpack .../runit-run_2.1.2-38_all.deb ...
Unpacking runit-run (2.1.2-38) ...
Setting up runit-run (2.1.2-38) ...
(Reading database ... 25355 files and directories currently installed.)
Purging configuration files for runit-systemd (2.1.2-36) ...

systemctl status shows disabled.  This happens regardless of if
/etc/service is a symlink to /etc/runit/runsvdir/current or not (I
updated one of my systems just to see).

I suspect you couldn't repro it becuase you didn't purge
runit-systemd, you probably only removed it, which clearly has
different logic in runit-systemd's postrm script:

#!/bin/sh
set -e
# Automatically added by dh_installsystemd/12.9
if [ -d /run/systemd/system ]; then
        systemctl --system daemon-reload >/dev/null || true
fi
# End automatically added section
# Automatically added by dh_installsystemd/12.9
if [ "$1" = "remove" ]; then
        if [ -x "/usr/bin/deb-systemd-helper" ]; then
                deb-systemd-helper mask 'runit.service' >/dev/null || true
        fi
fi

if [ "$1" = "purge" ]; then
        if [ -x "/usr/bin/deb-systemd-helper" ]; then
                deb-systemd-helper purge 'runit.service' >/dev/null || true
                deb-systemd-helper unmask 'runit.service' >/dev/null || true
        fi
fi
# End automatically added section


-- 
Jamie Heilman                     http://audible.transient.net/~jamie/

Reply via email to