[systemd-devel] Does "systemctl daemon-reload" discard service information?

Lennart Poettering mznyfn at 0pointer.de
Mon Jun 17 14:46:33 UTC 2019


On Mo, 20.05.19 20:07, Andrei Borzenkov (arvidjaar at gmail.com) wrote:

> 20.05.2019 16:36, Ulrich Windl пишет:
> > Hi!
> >
> > I have had the effect that a "systectl status" before and after a
> > "daemon-reload" is different, while the service in question wasn't restarted:
> >
> ...>
> > Is that intentional?
> >
>
> daemon-reload is known to lose state for years. Some problems get fixed,
> new problems appear. Problems range from cosmetic to losing state of
> units and jobs causing callers of systemd to "hang" waiting for job
> completion.

Humm. Have you filed bugs about these? I thought we covered everything
now. I am not aware about "new problems appearing"...

> Unfortunately daemon-reload is often the only answer to
> other reported problems (like in "systemd does not see fstab changes?
> Run daemon-reload, where is the problem").

/etc/fstab changes require a "systemctl daemon-reload" to take effect
in systemd's unit dep tree. That's because the generators need to be
rerun and the generated units reread by systemd. This is
documented here:

https://www.freedesktop.org/wiki/Software/systemd/Incompatibilities/?updated

Distros should probably include a comment about that in the default
/etc/fstab they ship. If yours doesn't, please file a bug against it,
asking them to do so.

On Fedora you will find a comment like this in /etc/fstab:

  # After editing this file, run 'systemctl daemon-reload' to update systemd
  # units generated from this file.

Lennart

--
Lennart Poettering, Berlin


More information about the systemd-devel mailing list