[systemd-devel] suggestion: auto reload as the default to help packagers?

Reindl Harald h.reindl at thelounge.net
Fri May 31 11:55:49 UTC 2019


Am 31.05.19 um 13:28 schrieb Michael Chapman:
> On Fri, 31 May 2019, Reindl Harald wrote:
>> Am 31.05.19 um 12:31 schrieb Michael Chapman:
>>> For RPM on Fedora, the systemd package has %transfiletriggerin and 
>>> %transfiletriggerun scriptlets that run automatically at the end of the 
>>> RPM transaction if units were installed or removed. This is the cleanest 
>>> approach since it means all changes from all updated packages are applied 
>>> at once.
>>
>> sadly that's all theory given that all services in Fedora are
>> automatically hard restartet when packages are updated and "at the end"
>> is too late when the service got restarted with the old unit but new binary
> 
> I actually got it slightly wrong: %transfiletriggerin and 
> %transfiletriggerun occur in the _middle_ of the transaction, in between 
> installation of new packages (or new versions of packages) and removal of 
> old packages (or old versions of packages). While %transfiletriggerin 
> does perform a daemon-reload, %transfiletriggerun simply stores a 
> flag that's picked up by a separate %filetriggerpostun scriptlet. That 
> reloads systemd.
> 
> So overall there shouldn't be any issues there. I don't recall seeing the 
> errors you're talking about.
[harry at srv-rhsoft:/downloads/f28-f29]$ ls
insgesamt 7,9M
-rw-r----- 1 harry verwaltung  764 2019-04-23 14:24 log-all-backups.txt
-rw-r----- 1 harry verwaltung 1,4K 2019-04-24 20:22 log-all-live.txt
-rw-r----- 1 harry verwaltung 404K 2019-04-24 20:01 log-arrakis.txt
-rw-r----- 1 harry verwaltung 209K 2019-04-23 14:24
log-arrakisvm.rhsoft.net.txt
-rw-r----- 1 harry verwaltung 404K 2019-04-23 14:17 log-backup-arrakis.txt
-rw-r----- 1 harry verwaltung 749K 2019-04-23 13:50
log-backup-buildserver.txt
-rw-r----- 1 harry verwaltung 325K 2019-04-23 14:23 log-backup-caladan.txt
-rw-r----- 1 harry verwaltung 250K 2019-04-23 14:22 log-backup-dbmail.txt
-rw-r----- 1 harry verwaltung 237K 2019-04-23 14:18
log-backup-prometheus.txt
-rw-r----- 1 harry verwaltung 281K 2019-04-23 14:20 log-backup-thebe.txt
-rw-r----- 1 harry verwaltung 286K 2019-04-23 14:19 log-backup-thx1138.txt
-rw-r----- 1 harry verwaltung 763K 2019-04-23 11:21 log-buildserver.txt
-rw-r----- 1 harry verwaltung 325K 2019-04-23 20:17 log-caladan.txt
-rw-r----- 1 harry verwaltung 250K 2019-04-23 22:43 log-dbmail.txt
-rw-r----- 1 harry verwaltung 225K 2019-04-24 19:23 log-fileserver.txt
-rw-r----- 1 harry verwaltung 283K 2019-04-24 20:22 log-firewall.txt
-rw-r----- 1 harry verwaltung 284K 2019-04-23 20:38 log-mail-gw.txt
-rw-r----- 1 harry verwaltung 208K 2019-04-23 17:01 log-master.txt
-rw-r----- 1 harry verwaltung 219K 2019-04-23 15:31 log-ns2.txt
-rw-r----- 1 harry verwaltung 237K 2019-04-23 21:14 log-openvas.txt
-rw-r----- 1 harry verwaltung 237K 2019-04-23 16:28 log-prometheus.txt
-rw-r----- 1 harry verwaltung 214K 2019-04-24 19:36 log-proxy.txt
-rw-r----- 1 harry verwaltung 209K 2019-04-23 16:18 log-sftp.txt
-rw-r----- 1 harry verwaltung 264K 2019-04-23 17:52 log-south.txt
-rw-r----- 1 harry verwaltung 264K 2019-04-23 15:56 log-stock-home.txt
-rw-r----- 1 harry verwaltung 281K 2019-04-24 19:53 log-thebe.txt
-rw-r----- 1 harry verwaltung 287K 2019-04-23 20:04 log-thx1138.txt
-rw-r----- 1 harry verwaltung 284K 2019-04-23 18:05 log-voip.txt
[harry at srv-rhsoft:/downloads/f28-f29]$ cat *.txt | grep -i "changed on disk"
Warning: The unit file, source configuration file or drop-ins of
mlocate-updatedb.timer changed on disk. Run 'systemctl daemon-reload' to
reload units.
Warning: The unit file, source configuration file or drop-ins of
mlocate-updatedb.timer changed on disk. Run 'systemctl daemon-reload' to
reload units.
Warning: The unit file, source configuration file or drop-ins of
mlocate-updatedb.timer changed on disk. Run 'systemctl daemon-reload' to
reload units.
Warning: The unit file, source configuration file or drop-ins of
mlocate-updatedb.timer changed on disk. Run 'systemctl daemon-reload' to
reload units.
Warning: The unit file, source configuration file or drop-ins of
mlocate-updatedb.timer changed on disk. Run 'systemctl daemon-reload' to
reload units.
Warning: The unit file, source configuration file or drop-ins of
mlocate-updatedb.timer changed on disk. Run 'systemctl daemon-reload' to
reload units.
Warning: The unit file, source configuration file or drop-ins of
mlocate-updatedb.timer changed on disk. Run 'systemctl daemon-reload' to
reload units.
Warning: The unit file, source configuration file or drop-ins of
mlocate-updatedb.timer changed on disk. Run 'systemctl daemon-reload' to
reload units.
Warning: The unit file, source configuration file or drop-ins of
mlocate-updatedb.timer changed on disk. Run 'systemctl daemon-reload' to
reload units.
Warning: The unit file, source configuration file or drop-ins of
mlocate-updatedb.timer changed on disk. Run 'systemctl daemon-reload' to
reload units.
Warning: The unit file, source configuration file or drop-ins of
mlocate-updatedb.timer changed on disk. Run 'systemctl daemon-reload' to
reload units.
Warning: The unit file, source configuration file or drop-ins of
mlocate-updatedb.timer changed on disk. Run 'systemctl daemon-reload' to
reload units.
Warning: The unit file, source configuration file or drop-ins of
mlocate-updatedb.timer changed on disk. Run 'systemctl daemon-reload' to
reload units.
Warning: The unit file, source configuration file or drop-ins of
mlocate-updatedb.timer changed on disk. Run 'systemctl daemon-reload' to
reload units.
Warning: The unit file, source configuration file or drop-ins of
mlocate-updatedb.timer changed on disk. Run 'systemctl daemon-reload' to
reload units.
Warning: The unit file, source configuration file or drop-ins of
mlocate-updatedb.timer changed on disk. Run 'systemctl daemon-reload' to
reload units.
Warning: The unit file, source configuration file or drop-ins of
mlocate-updatedb.timer changed on disk. Run 'systemctl daemon-reload' to
reload units.
Warning: The unit file, source configuration file or drop-ins of
mlocate-updatedb.timer changed on disk. Run 'systemctl daemon-reload' to
reload units.
Warning: The unit file, source configuration file or drop-ins of
mlocate-updatedb.timer changed on disk. Run 'systemctl daemon-reload' to
reload units.
Warning: The unit file, source configuration file or drop-ins of
mlocate-updatedb.timer changed on disk. Run 'systemctl daemon-reload' to
reload units.
Warning: The unit file, source configuration file or drop-ins of
mlocate-updatedb.timer changed on disk. Run 'systemctl daemon-reload' to
reload units.
Warning: The unit file, source configuration file or drop-ins of
mlocate-updatedb.timer changed on disk. Run 'systemctl daemon-reload' to
reload units.
Warning: The unit file, source configuration file or drop-ins of
mlocate-updatedb.timer changed on disk. Run 'systemctl daemon-reload' to
reload units.
Warning: The unit file, source configuration file or drop-ins of
mlocate-updatedb.timer changed on disk. Run 'systemctl daemon-reload' to
reload units.
[harry at srv-rhsoft:/downloads/f28-f29]$

you can turn it how you like and it will still be error prone because in
a big transaction with a so-name bump in a library you still have the
problem of the service restart were things are crashing and it's
impossible to make sure everything is ordered in a way that it don't
happen because you easily end in a deadlock



More information about the systemd-devel mailing list