From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on inbox.vuxu.org X-Spam-Level: X-Spam-Status: No, score=-0.8 required=5.0 tests=DKIM_INVALID,DKIM_SIGNED, FREEMAIL_FROM,MAILING_LIST_MULTI,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.4 Received: (qmail 18538 invoked from network); 20 Aug 2022 11:01:37 -0000 Received: from alyss.skarnet.org (95.142.172.232) by inbox.vuxu.org with ESMTPUTF8; 20 Aug 2022 11:01:37 -0000 Received: (qmail 3010 invoked by uid 89); 20 Aug 2022 11:02:01 -0000 Mailing-List: contact supervision-help@list.skarnet.org; run by ezmlm Sender: Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Received: (qmail 3003 invoked from network); 20 Aug 2022 11:02:01 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=fastmail.com; h= cc:content-type:date:date:from:from:in-reply-to:message-id :mime-version:reply-to:sender:subject:subject:to:to; s=fm1; t= 1660993292; x=1661079692; bh=CiVSZ3CGfghUsP1aucaxjR/ik5w2bIKu7zh /15qlU0w=; b=dC5ztr1ecm+kiVz/PM1ncvmjmkruzdHk+1EnhtupH5zr91nHGuC 4doDV8UfKjq/SyA27beVLKBQliKLnu87NWIREuzvSeP+URqz8Gxw9GyAVQZVoJH9 diANXOy6SwfuCaLwgr2o5GG0bxw2mEZTpGnW7/LrDDWOcaACT7DNnj18Wv0lZmm2 +xt+ebT2hy3xbdaXWEWjdJquVgn2FVtRFNRPENTpd0j7HFFl7fPDYej7yEa+hEuN IXPZOeyONNAmKTpxJbfog0hczCO+NH22O5JNaIXknutYAxpUPJ9VjKlrFJIdexQO sDVSBnPHP1wvej02txJtmtSrBu9QeMqWeUA== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-type:date:date:feedback-id :feedback-id:from:from:in-reply-to:message-id:mime-version :reply-to:sender:subject:subject:to:to:x-me-proxy:x-me-proxy :x-me-sender:x-me-sender:x-sasl-enc; s=fm1; t=1660993292; x= 1661079692; bh=CiVSZ3CGfghUsP1aucaxjR/ik5w2bIKu7zh/15qlU0w=; b=M 7juGl+DzIIRC6Qa8pQoSpaD6MI+2ttz0QwTp9lZ5dMuzJT3dnEWvNEchyC82Aidl KcbwGUYVE7auLLwF0hIOTjFbC7VpS6fL7Z0qp1M9kWYP70hkSd2l6F06yRhC834f ZEN2z4tv1vgLfXdG57AsR2ogug/VVkNpeXsyayOS3DFEAOe9O84qKOm0JHV2zVl9 AMWaeMJxrsbG1Do/O/mO9JmIkbcnk+Lwnrp3ghtKZnhcTg6iYmgN24c1DEPlx1Or EYYD+lrpvU8UfWUD9JV319ac9pTkVHER0nIHR2oUG1zmxg1fnMbf7X0Cvfctzdw/ BdwhEXF4JtVNAOhE0Jdhg== X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvfedrvdeifedgfeeiucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucenucfjughrpefofgggkfffhffvufgtsegrtderre erreejnecuhfhrohhmpegurghrkhdrphgvnheluddtkeesfhgrshhtmhgrihhlrdgtohhm necuggftrfgrthhtvghrnhepveejfeeghefgffeiheettdelgefhgeegffffteevffegfe evhfdvieejgfeuvdelnecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehmrghi lhhfrhhomhepuggrrhhkrdhpvghnledutdeksehfrghsthhmrghilhdrtghomh X-ME-Proxy: Feedback-ID: i9299460b:Fastmail X-Mailer: MessagingEngine.com Webmail Interface User-Agent: Cyrus-JMAP/3.7.0-alpha0-841-g7899e99a45-fm-20220811.002-g7899e99a Mime-Version: 1.0 Message-Id: <18dc7efd-9ce3-4350-b051-49c047e32e7a@www.fastmail.com> Date: Sat, 20 Aug 2022 07:01:11 -0400 From: dark.pen9108@fastmail.com To: supervision@list.skarnet.org Subject: Trouble starting services on boot with s6-rc Content-Type: multipart/alternative; boundary=bf00c3d3fbc14b56adf1c927fea46bcb --bf00c3d3fbc14b56adf1c927fea46bcb Content-Type: text/plain;charset=utf-8 Content-Transfer-Encoding: quoted-printable Hi, Hoping this is the right place to ask for some help as I am very new to = s6 and not well versed on any init system. =20 I=E2=80=99m attempting to use what I understand to be the =E2=80=9Cnew=E2= =80=9D s6-rc way to start some processes in a docker container.=20 Just for testing out what I want to do, I have a oneshot who=E2=80=99s j= ob is just to sleep, and a longrun that depends on the oneshot.=20 I have created the following files=20 [Aug 19 18:42:24 root@s6 ~]# ll /etc/s6-overlay/s6-rc.d/longrun_test/ total 12 -rw-rw-r-- 1 root root 13 Aug 17 23:19 dependencies -rw-rw-r-- 1 root root 53 Aug 19 18:29 run -rw-rw-r-- 1 root root 8 Aug 17 23:19 type [Aug 19 18:42:24 root@s6 ~]# cat /etc/s6-overlay/s6-rc.d/longrun_test/ty= pe longrun [Aug 19 18:42:24 root@s6 ~]# cat /etc/s6-overlay/s6-rc.d/longrun_test/run #!/command/execlineb -P /usr/local/bin/longrun_start [Aug 19 18:42:24 root@s6 ~]# cat /etc/s6-overlay/s6-rc.d/longrun_test/de= pendencies sleeponstart [Aug 19 18:42:24 root@s6 ~]# ll /etc/s6-overlay/s6-rc.d/sleeponstart/ total 8 -rw-rw-r-- 1 root root 8 Aug 15 21:53 type -rw-rw-r-- 1 root root 52 Aug 16 20:25 up [Aug 19 18:42:24 root@s6 ~]# cat /etc/s6-overlay/s6-rc.d/sleeponstart/ty= pe oneshot [Aug 19 18:42:24 root@s6 ~]# cat /etc/s6-overlay/s6-rc.d/sleeponstart/up #!/command/execlineb -P /usr/local/bin/sleeponstart I can see that my services are registered with s6-rc=20 [Aug 19 18:43:04 root@s6 ~]# s6-rc-db list all | grep -e longrun_test -e= sleeponstart sleeponstart longrun_test The test services are very simple scripts just to prove they ran [Aug 19 18:44:23 root@s6 ~]# cat /usr/local/bin/sleeponstart #!/bin/bash sleep_time=3D30 sleep ${sleep_time} echo "I slept for ${sleep_time}." > /tmp/i_slept [Aug 19 18:44:23 root@s6 ~]# cat /usr/local/bin/longrun_start #!/bin/bash echo "I started the longrun" > /tmp/longrun_started But when I look in tmp I never see the files created. [Aug 19 18:44:23 root@s6 ~]# ll /tmp/ total 652 -rw------- 1 root root 5516 Mar 7 20:55 s6-overlay-noarch.tar.xz -rw------- 1 root root 656864 Mar 7 20:55 s6-overlay-x86_64.tar.xz If I start the longrun manually it and its dependency do run. =20 [Aug 19 18:50:00 root@s6 ~]# s6-rc -a change longrun_test [Aug 19 18:52:08 root@s6 ~]# ll /tmp/ total 660 -rw-r--r-- 1 root root 16 Aug 19 18:50 i_slept -rw-r--r-- 1 root root 22 Aug 19 18:52 longrun_started -rw------- 1 root root 5516 Mar 7 20:55 s6-overlay-noarch.tar.xz -rw------- 1 root root 656864 Mar 7 20:55 s6-overlay-x86_64.tar.xz So I would normally just think I am missing something to make them start= on boot BUT, soon after boot I do see my oneshot running.=20 [Aug 19 18:53:54 root@s6 /]# ps aux USER PID %CPU %MEM VSZ RSS TTY STAT START TIME COMMA= ND root 1 0.5 0.0 200 64 ? Ss 18:53 0:00 /pack= age/admin/s6/command/s6-svscan -d4 -- /run/service root 14 0.0 0.0 4152 3104 pts/0 Ss+ 18:53 0:00 /bin/= sh -e /run/s6/basedir/scripts/rc.init top root 15 0.0 0.0 204 64 ? S 18:53 0:00 s6-su= pervise s6-linux-init-shutdownd root 16 0.0 0.0 196 4 ? Ss 18:53 0:00 /pack= age/admin/s6-linux-init/command/s6-linux-init-shutdownd -c /run/s6/based= ir -g 3000 -C -B root 23 0.0 0.0 204 68 ? S 18:53 0:00 s6-su= pervise s6rc-oneshot-runner root 24 0.0 0.0 204 64 ? S 18:53 0:00 s6-su= pervise longrun_test root 25 0.0 0.0 204 60 ? S 18:53 0:00 s6-su= pervise s6rc-fdholder root 28 0.0 0.0 208 64 pts/0 S+ 18:53 0:00 s6-rc= -v2 -u -t 5000 -- change top root 32 0.0 0.0 180 4 ? Ss 18:53 0:00 /pack= age/admin/s6/command/s6-ipcserverd -1 -- /package/admin/s6/command/s6-ip= cserver-access -v0 -E -l0 -i data/rules root 34 0.0 0.0 192 52 pts/0 S+ 18:53 0:00 /pack= age/admin/s6-2.11.1.0/command/s6-sudoc -e -t 30000 -T 4999 -- up 3 root 36 0.0 0.0 200 60 ? S 18:53 0:00 /pack= age/admin/s6/command/s6-sudod -t 30000 -- /package/admin/s6-rc/command/s= 6-rc-oneshot-run -l ../.. -- root 38 0.0 0.0 4152 3080 ? S 18:53 0:00 /bin/= bash /usr/local/bin/sleeponstart <-------------- root 40 0.0 0.0 2616 940 ? S 18:53 0:00 sleep= 30 <----------------- root 53 1.0 0.0 4812 3836 pts/1 Ss 18:53 0:00 /bin/= bash root 74 0.0 0.0 7396 3268 pts/1 R+ 18:53 0:00 ps aux Sorry if this was much more info than was relevant. Any help would be gr= eat. Thanx so much!=20 -Benjamin --bf00c3d3fbc14b56adf1c927fea46bcb--