Re: [systemd-devel] Systemd killed processes of custom services instead of graceful shutdown

2020-06-19 Thread Andrei Borzenkov
18.06.2020 10:07, Kamal Rathi пишет: > > Now I am more eager to know if is it possible to run anything before it > kills users processes at shutdown / reboot / halt. User processes run either as part of user session or as part of user service. The former is session-xxx.scope, the latter is

Re: [systemd-devel] Systemd killed processes of custom services instead of graceful shutdown

2020-06-18 Thread Kamal Rathi
>- ExecStop command returns before application is actually stopped. >ExecStop must be synchronous, systemd assumes service is stopped when >ExecStop command completes Correct, and yes i finally figure out what service i have to make grid and rdbms dependent so that applicaiton shutdown will

Re: [systemd-devel] Systemd killed processes of custom services instead of graceful shutdown

2020-06-16 Thread Andrei Borzenkov
17.06.2020 07:46, Kamal Rathi пишет: >> Please take at least some efforts to format mail so that it can be >> properly understood. Otherwise I am afraid your mails will simply be >> ignored. > >I am sorry for inconvenience, i will try to follow correct approach > afterwards while replying

Re: [systemd-devel] Systemd killed processes of custom services instead of graceful shutdown

2020-06-16 Thread Kamal Rathi
>Please take at least some efforts to format mail so that it can be >properly understood. Otherwise I am afraid your mails will simply be >ignored. I am sorry for inconvenience, i will try to follow correct approach afterwards while replying > How RemainAfterExit affects *startup* of

Re: [systemd-devel] Systemd killed processes of custom services instead of graceful shutdown

2020-06-16 Thread Lennart Poettering
On Mo, 15.06.20 03:01, Kamal Rathi (kr30ap...@gmail.com) wrote: > Hi Team, > > I have two services which are dependent on each other and are working fine > at boot up but at shutdown / reboot , the processes get killed as shutdown > got initated. My educated guess is that your services use "su"

Re: [systemd-devel] Systemd killed processes of custom services instead of graceful shutdown

2020-06-15 Thread Andrei Borzenkov
16.06.2020 07:36, Kamal Rathi пишет: > The fact that you need RemainAfterExit at all hints that processes that > belong to your service are not running as part of service control group. > Knowing how Oracle has traditionally been managed, I suspect that you > perform "su - oracle_owner" or similar

Re: [systemd-devel] Systemd killed processes of custom services instead of graceful shutdown

2020-06-15 Thread Andrei Borzenkov
15.06.2020 11:01, Kamal Rathi пишет: > Hi Team, > > I have two services which are dependent on each other and are working fine > at boot up but at shutdown / reboot , the processes get killed as shutdown > got initated. > > Services are running fine in particular order but processes got killed

Re: [systemd-devel] Systemd killed processes of custom services instead of graceful shutdown

2020-06-15 Thread Kamal Rathi
>> can you plesse only respond to the list to not break reply-to I will use reply to all >> useless unless you set "DefaultDependencies=no" which you shouldn't do for normal services >> if i remove all the service and only put After=grid.service, so it will work similar way that how it is

Re: [systemd-devel] Systemd killed processes of custom services instead of graceful shutdown

2020-06-15 Thread Reindl Harald
can you plesse only respond to the list to not break reply-to Am 15.06.20 um 11:49 schrieb Kamal Rathi: > can you answer the question why you did put that option at all into the > unit file and why do you add random options to your units like > "After=syslog.target systemd-user-sessions.service

Re: [systemd-devel] Systemd killed processes of custom services instead of graceful shutdown

2020-06-15 Thread Kamal Rathi
>>.what about just remove "RemainAfterExit" and look again? I have tried the above option by removing that option and also tried to change it to oneshot and RemainAfterexit=yes and then tried it but the issue still remains. can you answer the question why you did put that option at all into the

Re: [systemd-devel] Systemd killed processes of custom services instead of graceful shutdown

2020-06-15 Thread Reindl Harald
Am 15.06.20 um 10:51 schrieb Kamal Rathi: > Thanks Reindl for the response, but from the man page of systemd.service > even oneshot is a kind of simple service as default is > RemainAfterExit=no for simple. simple: long running processes oneshot: expected to completly exit this are completly

Re: [systemd-devel] Systemd killed processes of custom services instead of graceful shutdown

2020-06-15 Thread Kamal Rathi
Thanks Reindl for the response, but from the man page of systemd.service even oneshot is a kind of simple service as default is RemainAfterExit=no for simple. But if we talk about the original problem that processes are killed even if ordering of services is there, . from what it seems that

Re: [systemd-devel] Systemd killed processes of custom services instead of graceful shutdown

2020-06-15 Thread Reindl Harald
Am 15.06.20 um 10:01 schrieb Kamal Rathi: > Hi Team, > > I have two services which are dependent on each other and are working > fine at boot up but at shutdown / reboot , the processes get killed as > shutdown got initated. > > Services are running fine in particular order but processes got

[systemd-devel] Systemd killed processes of custom services instead of graceful shutdown

2020-06-15 Thread Kamal Rathi
Hi Team, I have two services which are dependent on each other and are working fine at boot up but at shutdown / reboot , the processes get killed as shutdown got initated. Services are running fine in particular order but processes got killed .I have enabled lingering on both users and changed