Re: [systemd-devel] Support for pre-restart check

2014-08-01 Thread Reindl Harald
please don't break "reply-to-list" with reply-all Am 31.07.2014 um 13:30 schrieb Mantas Mikulėnas: > On Jul 31, 2014 12:57 PM, "Reindl Harald" > wrote: >> Am 31.07.2014 um 02:16 schrieb Colin Guthrie: >> > Reindl Harald wrote on 30/07/14 13:34: >> >> *how* should th

Re: [systemd-devel] Support for pre-restart check

2014-07-31 Thread Mantas Mikulėnas
On Jul 31, 2014 12:57 PM, "Reindl Harald" wrote: > Am 31.07.2014 um 02:16 schrieb Colin Guthrie: > > Reindl Harald wrote on 30/07/14 13:34: > >> *how* should that both help in calling "apachectl -t" *before* stop the > >> service and in case of a error-repsonse keep it running? > > > > Note, just

Re: [systemd-devel] Support for pre-restart check

2014-07-31 Thread Reindl Harald
Am 31.07.2014 um 07:03 schrieb Jóhann B. Guðmundsson: > On 07/31/2014 12:16 AM, Colin Guthrie wrote: >> I think the use case is pretty clear tho'. Config (or general machine >> state) has transitioned from working to broken in the time since the >> service was started and while it's really not a n

Re: [systemd-devel] Support for pre-restart check

2014-07-31 Thread Reindl Harald
Am 31.07.2014 um 02:41 schrieb Michael Biebl: > 2014-07-30 14:34 GMT+02:00 Reindl Harald : >> "ExecStopPre" would be better suited as the pre-restart check because >> it would achieve the goal and also prevent stop a service until it's >> configuration is fixed - that catchs cases where you stop s

Re: [systemd-devel] Support for pre-restart check

2014-07-31 Thread Jóhann B. Guðmundsson
On 07/31/2014 12:41 AM, Michael Biebl wrote: 2014-07-30 14:34 GMT+02:00 Reindl Harald : "ExecStopPre" would be better suited as the pre-restart check because it would achieve the goal and also prevent stop a service until it's configuration is fixed - that catchs cases where you stop something

Re: [systemd-devel] Support for pre-restart check

2014-07-30 Thread Jóhann B. Guðmundsson
On 07/31/2014 12:16 AM, Colin Guthrie wrote: I think the use case is pretty clear tho'. Config (or general machine state) has transitioned from working to broken in the time since the service was started and while it's really not a nice situation to find yourself in (relying on a running service

Re: [systemd-devel] Support for pre-restart check

2014-07-30 Thread Michael Biebl
2014-07-30 14:34 GMT+02:00 Reindl Harald : > "ExecStopPre" would be better suited as the pre-restart check because > it would achieve the goal and also prevent stop a service until it's > configuration is fixed - that catchs cases where you stop something > for whatever reason and expect it would b

Re: [systemd-devel] Support for pre-restart check

2014-07-30 Thread Colin Guthrie
Reindl Harald wrote on 30/07/14 13:34: > *how* should that both help in calling "apachectl -t" *before* stop the > service and in case of a error-repsonse keep it running? Note, just for clarity, you don't really want to run such a config test when explicitly stopping a service - that should alway

Re: [systemd-devel] Support for pre-restart check

2014-07-30 Thread Reindl Harald
Am 30.07.2014 15:04, schrieb Jóhann B. Guðmundsson: > On 07/30/2014 12:34 PM, Reindl Harald wrote: >> *how* should that both help in calling "apachectl -t" *before* stop the >> service and in case of a error-repsonse keep it running? > > ExecStartPre= takes care of the startup check as in the use

Re: [systemd-devel] Support for pre-restart check

2014-07-30 Thread Jóhann B. Guðmundsson
On 07/30/2014 12:34 PM, Reindl Harald wrote: *how* should that both help in calling "apachectl -t"*before* stop the service and in case of a error-repsonse keep it running? ExecStartPre= takes care of the startup check as in the usecase when the unit is not running and you initially configu

Re: [systemd-devel] Support for pre-restart check

2014-07-30 Thread Reindl Harald
Am 30.07.2014 14:35, schrieb Jóhann B. Guðmundsson: > On 07/30/2014 12:02 PM, Reindl Harald wrote: >> they don't > > Perhaps not in your world which seems to differ from many don't jump on that personal level if you would have *read* really what you respond to and not stop at the first two word

Re: [systemd-devel] Support for pre-restart check

2014-07-30 Thread Reindl Harald
Am 30.07.2014 14:19, schrieb Jóhann B. Guðmundsson: > On 07/30/2014 12:09 PM, Lennart Poettering wrote: >> On Wed, 30.07.14 12:22, Ansgar Burchardt (ans...@debian.org) wrote: >> >>> >while looking at how to convert sysvinit scripts to service files in >>> >Debian, I noticed that some scripts do an

Re: [systemd-devel] Support for pre-restart check

2014-07-30 Thread Jóhann B. Guðmundsson
On 07/30/2014 12:02 PM, Reindl Harald wrote: they don't Perhaps not in your world which seems to differ from many but in the world that the guy that went through and migrated around 800 legacy sysv initscript you want the exact same "check" run before the service is started and we already c

Re: [systemd-devel] Support for pre-restart check

2014-07-30 Thread Jóhann B. Guðmundsson
On 07/30/2014 12:09 PM, Lennart Poettering wrote: On Wed, 30.07.14 12:22, Ansgar Burchardt (ans...@debian.org) wrote: >Hi, > >while looking at how to convert sysvinit scripts to service files in >Debian, I noticed that some scripts do an additional sanity check during >the restart action. That

Re: [systemd-devel] Support for pre-restart check

2014-07-30 Thread Reindl Harald
Am 30.07.2014 13:42, schrieb Ansgar Burchardt: > On 07/30/2014 13:26, "Jóhann B. Guðmundsson" wrote: >> On 07/30/2014 10:22 AM, Ansgar Burchardt wrote: >>> Add an ExecRestartPre option in the [Service] section. These commands >>> are executed when a restart is requested, before the service is stop

Re: [systemd-devel] Support for pre-restart check

2014-07-30 Thread Lennart Poettering
On Wed, 30.07.14 12:22, Ansgar Burchardt (ans...@debian.org) wrote: > Hi, > > while looking at how to convert sysvinit scripts to service files in > Debian, I noticed that some scripts do an additional sanity check during > the restart action. That is, they run an extra command to validate the >

Re: [systemd-devel] Support for pre-restart check

2014-07-30 Thread Michal Sekletar
On Wed, Jul 30, 2014 at 11:26:38AM +, "Jóhann B. Guðmundsson" wrote: > > On 07/30/2014 10:22 AM, Ansgar Burchardt wrote: > >Hi, > > > >while looking at how to convert sysvinit scripts to service files in > >Debian, I noticed that some scripts do an additional sanity check during > >the restart

Re: [systemd-devel] Support for pre-restart check

2014-07-30 Thread Ansgar Burchardt
Hi, On 07/30/2014 13:26, "Jóhann B. Guðmundsson" wrote: > On 07/30/2014 10:22 AM, Ansgar Burchardt wrote: >> while looking at how to convert sysvinit scripts to service files in >> Debian, I noticed that some scripts do an additional sanity check during >> the restart action. That is, they run an

Re: [systemd-devel] Support for pre-restart check

2014-07-30 Thread Jóhann B. Guðmundsson
On 07/30/2014 10:22 AM, Ansgar Burchardt wrote: Hi, while looking at how to convert sysvinit scripts to service files in Debian, I noticed that some scripts do an additional sanity check during the restart action. That is, they run an extra command to validate the configuration and only restart

Re: [systemd-devel] Support for pre-restart check

2014-07-30 Thread Reindl Harald
Am 30.07.2014 12:22, schrieb Ansgar Burchardt: > while looking at how to convert sysvinit scripts to service files in > Debian, I noticed that some scripts do an additional sanity check during > the restart action. That is, they run an extra command to validate the > configuration and only restart

[systemd-devel] Support for pre-restart check

2014-07-30 Thread Ansgar Burchardt
Hi, while looking at how to convert sysvinit scripts to service files in Debian, I noticed that some scripts do an additional sanity check during the restart action. That is, they run an extra command to validate the configuration and only restart the service on success. Systemd doesn't seem to p