Hello all, I am facing questions regarding the way to correctly handle transition failures with s6-rc. The new permanent failure feature already clarifies some scenarios but I still have doubts about some cases. Below are two concrete examples. I would be happy to have remarks or suggestions about how to cope with them clean and nice :).
1. I start a longrun service with "s6-rc -u change svc". This service hangs and never reaches readiness notification. After timeout s6-rc will declare the transition a failure. But the process is actually running and I have no way to stop it through s6-rc. The only way is to issue "s6-svc -d /path/to/svc". But then I have the feeling I am doing something in the back of s6-rc to unblock the situation because s6-rc cannot handle it. Somehow I wish s6-rc had an extra state BUSY between DOWN and UP when the transition is ongoing, and that it could bring me back to DOWN when I ask it to. 2. Slightly related, I have an issue with system shutdown. I am working on a buildroot system and specifically I use the /etc/rc.tini which can be found here [1] and which is executed as part of the shutdown sequence of the system. The problem is with the invocation of "s6-rc -b -da change" (I added the -b). If there is already an s6-rc ongoing, the shutdown sequence will be blocked until the first s6-rc times out. And this kind of timeout is of the order of minutes as I have slow services depending on each other. I currently think the best thing to do is to is to "killall s6-rc" before calling "s6-rc -ad change". This leaves a little race condition possible, but more importantly, I have concerns about killing an ongoing s6-rc. This will leave longrun services in the middle of a state transition - there is the connection with the first scenario - and I expect the final effect is that the finish script will not be executed before the system goes down, which is precisely what I want to happen when I call "s6-rc -ad change". Secondly, I do not know what effect this will have on oneshots. I fear "/etc/init.d/S98xxx start" will still be running and "/etc/init.d/S98xxx stop" will be executed - the thought of which horrifies me beyond reasoning. [1] https://github.com/elebihan/s6-br2-init-skeleton/blob/master/data/skeleton/etc/rc.tini Thanks in advance for any idea that might help me :). Kr, Lionel