Re: [systemd-devel] Is restart gracefull?
On 11/29/2013 08:59 AM, David Timothy Strauss wrote: On Fri, Nov 29, 2013 at 12:53 PM, Lennart Poettering lenn...@poettering.net wrote: On Fri, 29.11.13 00:11, Cecil Westerhof (cecil.wester...@snow.nl) wrote: I have done a trial presentation about systemd. One of the questions there was: when a restart of for example apache is doen, is this restart done graceful? For systemd a restart is actually exactly what the name says: a stop plus a start. reload otoh is up to the implementer of the unit file, whatever he chooses. Just to clarify, stop (and, by extension restart) is also up to the implementer of the unit file. There just happens to be a default, unlike with reload. See the service and exec man pages for details. Regardless, restart and stop usually both involve a full shutdown of every process running the daemon. I think it's possible to override this behavior with certain options, but you shouldn't. There is of-course an important difference. As I understood it, Apache is notorious for processes that escape. (That is one of the reasons that cgroups usage of systemd is such an improvement.) In the old situation nothing happened to those processes. (With potential nasty results.) What happens to those processes under systemd? If you want to explore much deeper, you may also be interested in socket activation, which allows a server socket to remain open even while a daemon is fully shut down (whether because it hasn't started yet, is restarting, or has been stopped). It takes graceful restarts/reloads up to the systemd level. I certainly would. I thinks it is a very important part of systemd. And it is also clearly mentioned in my presentation. But I have a ‘few’ restrictions: - I have to give the presentation on December 5 - I am quite new to systemd and only scanned the surface I am afraid - There are a lot of other things I need to know more about - I am not an administrator, but a developer, so most is Terra Incognita to me How much time would I need to understand these levels? ___ systemd-devel mailing list systemd-devel@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/systemd-devel
Re: [systemd-devel] Is restart gracefull?
On Fri, Nov 29, 2013 at 12:52 PM, Cecil Westerhof cecil.wester...@snow.nl wrote: Just to clarify, stop (and, by extension restart) is also up to the implementer of the unit file. There just happens to be a default, unlike with reload. See the service and exec man pages for details. Regardless, restart and stop usually both involve a full shutdown of every process running the daemon. I think it's possible to override this behavior with certain options, but you shouldn't. There is of-course an important difference. As I understood it, Apache is notorious for processes that escape. (That is one of the reasons that cgroups usage of systemd is such an improvement.) In the old situation nothing happened to those processes. (With potential nasty results.) What happens to those processes under systemd? Unless otherwise configured, as soon as the ExecStop command is finished, systemd terminates all remaining processes. After a grace period, the processes are killed. If there's no ExecStop command defined, termination begins immediately. For many services this is simple and appropriate behavior. ___ systemd-devel mailing list systemd-devel@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/systemd-devel
Re: [systemd-devel] Is restart gracefull?
On 11/29/2013 01:12 PM, Jan Alexander Steffens wrote: On Fri, Nov 29, 2013 at 12:52 PM, Cecil Westerhof cecil.wester...@snow.nl wrote: Just to clarify, stop (and, by extension restart) is also up to the implementer of the unit file. There just happens to be a default, unlike with reload. See the service and exec man pages for details. Regardless, restart and stop usually both involve a full shutdown of every process running the daemon. I think it's possible to override this behavior with certain options, but you shouldn't. There is of-course an important difference. As I understood it, Apache is notorious for processes that escape. (That is one of the reasons that cgroups usage of systemd is such an improvement.) In the old situation nothing happened to those processes. (With potential nasty results.) What happens to those processes under systemd? Unless otherwise configured, as soon as the ExecStop command is finished, systemd terminates all remaining processes. After a grace period, the processes are killed. If there's no ExecStop command defined, termination begins immediately. For many services this is simple and appropriate behavior. Clear. Thanks. By the way: is thanks appreciated or frowned upon? ___ systemd-devel mailing list systemd-devel@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/systemd-devel
Re: [systemd-devel] Is restart gracefull?
On Nov 29, 2013 9:52 PM, Cecil Westerhof cecil.wester...@snow.nl wrote: On 11/29/2013 08:59 AM, David Timothy Strauss wrote: On Fri, Nov 29, 2013 at 12:53 PM, Lennart Poettering lenn...@poettering.net wrote: On Fri, 29.11.13 00:11, Cecil Westerhof (cecil.wester...@snow.nl) wrote: I have done a trial presentation about systemd. One of the questions there was: when a restart of for example apache is doen, is this restart done graceful? For systemd a restart is actually exactly what the name says: a stop plus a start. reload otoh is up to the implementer of the unit file, whatever he chooses. Just to clarify, stop (and, by extension restart) is also up to the implementer of the unit file. There just happens to be a default, unlike with reload. See the service and exec man pages for details. Regardless, restart and stop usually both involve a full shutdown of every process running the daemon. I think it's possible to override this behavior with certain options, but you shouldn't. There is of-course an important difference. As I understood it, Apache is notorious for processes that escape. (That is one of the reasons that cgroups usage of systemd is such an improvement.) In the old situation nothing happened to those processes. (With potential nasty results.) What happens to those processes under systemd? If you want to explore much deeper, you may also be interested in socket activation, which allows a server socket to remain open even while a daemon is fully shut down (whether because it hasn't started yet, is restarting, or has been stopped). It takes graceful restarts/reloads up to the systemd level. I certainly would. I thinks it is a very important part of systemd. And it is also clearly mentioned in my presentation. But I have a ‘few’ restrictions: - I have to give the presentation on December 5 - I am quite new to systemd and only scanned the surface I am afraid - There are a lot of other things I need to know more about - I am not an administrator, but a developer, so most is Terra Incognita to me How much time would I need to understand these levels? If you're willing to use nginx instead, it's fairly straightforward. I'd have to research the options for Apache. ___ systemd-devel mailing list systemd-devel@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/systemd-devel
Re: [systemd-devel] Is restart gracefull?
On 11/30/2013 02:28 AM, David Timothy Strauss wrote: If you're willing to use nginx instead, it's fairly straightforward. I'd have to research the options for Apache. I would be willing, but that is not the point. I have to give the presentation to my colleges and they have to use it at our clients. Probably not all our clients will make the switch and there will be other services that have the same kind of problems. Thanks anyway. ___ systemd-devel mailing list systemd-devel@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/systemd-devel
[systemd-devel] Is restart gracefull?
I have done a trial presentation about systemd. One of the questions there was: when a restart of for example apache is doen, is this restart done graceful? Met vriendelijke groet, Cecil Westerhof Engineer mobiel +31 - 6 - 25 00 38 81 -- Snow B.V. Unix Specialists De Ooyen 11 4191 PB Geldermalsen http://www.snow.nl tel. +31 - 345 - 65 66 66 ___ systemd-devel mailing list systemd-devel@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/systemd-devel
Re: [systemd-devel] Is restart gracefull?
El 28/11/13 20:11, Cecil Westerhof escribió: I have done a trial presentation about systemd. One of the questions there was: when a restart of for example apache is doen, is this restart done graceful? It depends on what the person writting the unit files intends to do, in most distributions, apache server restart is done by calling graceful-stop then start.. reload is also graceful. ___ systemd-devel mailing list systemd-devel@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/systemd-devel
Re: [systemd-devel] Is restart gracefull?
On Fri, 29.11.13 00:11, Cecil Westerhof (cecil.wester...@snow.nl) wrote: I have done a trial presentation about systemd. One of the questions there was: when a restart of for example apache is doen, is this restart done graceful? For systemd a restart is actually exactly what the name says: a stop plus a start. reload otoh is up to the implementer of the unit file, whatever he chooses. Lennart -- Lennart Poettering, Red Hat ___ systemd-devel mailing list systemd-devel@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/systemd-devel