supervision - discussion about system services, daemon supervision, init, runlevel management, and tools such as s6 and runit
 help / color / mirror / Atom feed
* Query on S6 system shutdown
@ 2021-07-29  8:43 Arjun D R
  2021-07-29 11:33 ` Laurent Bercot
  0 siblings, 1 reply; 2+ messages in thread
From: Arjun D R @ 2021-07-29  8:43 UTC (permalink / raw)
  To: supervision

[-- Attachment #1: Type: text/plain, Size: 1546 bytes --]

Hi Team,

I am facing an issue at the moment of shutting down the system. Whenever I
reboot the system, it is triggering "s6-rc -v2 -bda change" and stops all
the services. But one service is not responding and it hangs. This blocks
the reboot.

ps -aef | grep s6-rc
root      2770  2707  0 08:24 ?        00:00:00 s6-ipcserverd -1 --
s6-ipcserver-access -v0 -E -l0 -i data/rules -- s6-sudod -t 30000 --
/libexec/s6-rc-oneshot-run -l ../.. --
root      7880  2615  1 08:28 ?        00:00:00 s6-rc -v2 -bda change
root      8603  7880  0 08:28 ?        00:00:00 s6-svlisten1 -D --
/run/s6-rc/servicedirs/critical.service s6-svc -d --
/run/s6-rc/servicedirs/critical.service
root      8755  2620  0 08:28 ttyS0    00:00:00 grep s6-rc

I believe the finish script is not being called by s6-svc. When I run it
manually , the finish script runs and kills the process and graceful
shutdown is happening as expected.

What may be the cause for not triggering the finish script of critical
service.

cat /run/service/critical.service/run.user
#!/bin/execlineb -P
foreground { echo "starting critical service" }
fdmove -c 2 1
envfile -i  /etc/default/critical-env
s6-envdir /etc/s6-rc/source/critical.service/env
<.. many importas commands..>
/usr/bin/critical -b -c /etc/critical/config.json

cat /run/service/critical.service/finish.user
#!/bin/execlineb -P
foreground { echo "Stopping critical service" }
fdmove -c 2 1
backtick -n pid_value { pidof critical }
importas -i pid_value pid_value
/bin/kill -9 -- -${pid_value}


Please help.

Thanks,
Arjun

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2021-07-29 11:33 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-07-29  8:43 Query on S6 system shutdown Arjun D R
2021-07-29 11:33 ` Laurent Bercot

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).