[systemd-devel] Systemd killed processes of custom services instead of graceful shutdown
Kamal Rathi
kr30april at gmail.com
Mon Jun 15 08:51:28 UTC 2020
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 user.slice is killed before my services will shut
down processes gracefully.
I have tried also putting user.slice as After= dependency but result is the
same.
On Mon, Jun 15, 2020 at 3:18 AM Reindl Harald <h.reindl at thelounge.net>
wrote:
>
>
> 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 killed
> > .I have enabled lingering on both users and changed confgiuration in
> > logind.conf to KillUserProcesses=no but still issue is same
> >
> > let me know if my configuration is faulty or what I have missed so that
> > shutdown should be graceful for services and processes will be
> > shutdown with systemd custom service?
> >
> > I want first rdbms.service should be called and get process stopped
> > before grid.services (it seems systemd are killing user.slices
> > processes) and in startup-inverse should be followed .
> > Please help
>
> i would start with thinking about why the useless "RemainAfterExit=yes"
> is in a service with type=simple
>
> this is nice fot type=oneshot but makes no sense here when you want to
> order things running long living processes
>
> RemainAfterExit=
> Takes a boolean value that specifies whether the service shall be
> considered active even when all its processes exited. Defaults to no.
> _______________________________________________
> systemd-devel mailing list
> systemd-devel at lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/systemd-devel
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/systemd-devel/attachments/20200615/196388bf/attachment.htm>
More information about the systemd-devel
mailing list