Chris's Wiki :: blog/linux/SystemdUbuntuRebootWorkaround Commentshttps://utcc.utoronto.ca/~cks/space/blog/linux/SystemdUbuntuRebootWorkaround?atomcommentsDWiki2019-09-25T12:32:37ZRecent comments in Chris's Wiki :: blog/linux/SystemdUbuntuRebootWorkaround.By Chris Siebenmann on /blog/linux/SystemdUbuntuRebootWorkaroundtag:CSpace:blog/linux/SystemdUbuntuRebootWorkaround:a2859c30752697ccbfa6bf0785b0a7113de51597Chris Siebenmann<div class="wikitext"><p>A number of standard Ubuntu systemd units are explicitly set to
<code>KillMode=process</code>, most notably cron. This is sensible and even desirable
behavior for something like cron, where you don't normally want currently
running cron jobs being killed if you restart the daemon itself (as the
system might automatically do during things like package updates).</p>
<p>Now that I look at our systems, 18.04 has fewer of them than I thought,
which would explain why 18.04 has been less problematic here for us. The
only two that stand out as dangerous are cron and slurmd. Apache, Exim,
and even atd now leave it at the default and so terminate everything
when the service is shut down.</p>
</div>2019-09-25T12:32:37ZBy aioeu on /blog/linux/SystemdUbuntuRebootWorkaroundtag:CSpace:blog/linux/SystemdUbuntuRebootWorkaround:f8267fc6e191309444c0abc6268415b0624e246eaioeu<div class="wikitext"><p>This is presumably only a problem with services still using initscripts, since systemd will generate units for those with <code>KillMode=process</code> to match pre-systemd behaviour.</p>
<p>Why not just use <code>systemctl edit</code> on those generated units and set <code>KillMode=control-group</code> permanently?</p>
</div>2019-09-25T05:23:52Z