6

Within CentOS-7 does a change in the options within /etc/systemd/system.conf of systemd require a reboot or will "systemctl daemon-reload" suffice?

9

No, daemon-reload will reload all unit files, not the configuration for systemd itself. However, # systemctl daemon-reexec will re-execute systemd and cause it to digest its new configuration in the process.

From the systemctl man page:

daemon-reexec
       Reexecute the systemd manager. This will serialize the manager
       state, reexecute the process and deserialize the state again. This
       command is of little use except for debugging and package upgrades.
       Sometimes, it might be helpful as a heavy-weight daemon-reload.
       While the daemon is being reexecuted, all sockets systemd listening
       on behalf of user configuration will stay accessible.

When the man page says daemon-reexec is useful for package upgrades, it in large part means that this command executes whatever new binaries there are and re-processes its configs. HOWEVER, the RPM that we use to upgrade systemd already contains a script to do this, so it is usually never needed in the case of a normal upgrade.

Or you can reboot. Either will do.

  • 2
    Note that the systemd RPM package includes a scriptlet that will already daemon-reexec when the package is upgraded, so you don't need to do this manually in that situation. – Michael Hampton Sep 28 '16 at 2:25
  • 1
    Just about the only thing that really needs a reboot anymore is the kernel. Most if not all services restart themselves (if they were already running) from within RPM scripts during upgrade using systemctl try-restart. – Michael Hampton Sep 28 '16 at 2:45
  • 2
    @MichaelHampton it is really a little more tricky: not only kernel, but also libc (and, sometime, device-mapper userland also) upgrades require a full reboot. Sure, you can pin-point and restart each affected services, but as basically all services are linked against libc, well, it is generally faster to reboot... – shodanshok Sep 28 '16 at 7:37
  • 1
    @Motivated libc is not a service, rather the GNU C Library, which is linked by almost all linux executable. So, after a libc upgrade, you should restart any running program/process; the easier method is to reboot the machine. – shodanshok Feb 3 at 8:11
  • 1
    @Motivated The answer is speaking of scripts in RPM packages, which are used by Red Hat derived distributions, but not by Debian derived distributions. These use different packaging methods, but also call systemctl to restart services or systemd itself. – Michael Hampton Feb 3 at 14:45

Your Answer

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Not the answer you're looking for? Browse other questions tagged or ask your own question.