Why can’t systemd reload unit files automatically?

Sometimes I forget to run systemctl daemon-reload after editing some unit file, and I get a warning about it when doing systemctl restart ***.service.

Why it was decided to only issue a warning instead of reloading the unit automatically? (the warning happens, so change was detected and so it is possible to simply auto-reload the file).


It appears to be a specific design choice, based around race conditions and the complexity of reading the entire conf tree.

However, one approach is to use systemctl edit, which triggers a unit reload after it exits.

Some discussion of the issue here, and here.

Leave a Reply

Your email address will not be published. Required fields are marked *