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=-1.1 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,MAILING_LIST_MULTI autolearn=ham autolearn_force=no version=3.4.4 Received: (qmail 31121 invoked from network); 3 Oct 2020 22:32:44 -0000 Received: from alyss.skarnet.org (95.142.172.232) by inbox.vuxu.org with ESMTPUTF8; 3 Oct 2020 22:32:44 -0000 Received: (qmail 11058 invoked by uid 89); 3 Oct 2020 22:32:59 -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 11051 invoked from network); 3 Oct 2020 22:32:58 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=heuristicsystems.com.au; s=hsa; t=1601764234; x=1602369035; bh=7vqPb0xNnywgig+h9BAFZRK8+s2mw3OFoXtMBgdm/ow=; h=To:From:Subject:Message-ID:Date; b=GWYG04hpcH+AyAQYNb3Pp/NscSkU+vfFe2VZ8MzAAFtYdwJ98aI+XzaGqJCTy0oyi uPk/7n9SL4MmXcMjLBV6fAPspxgqUltwfyoxwlNE32m1pndXhK148Wt6Cj2dq5R6dl G/TxRMveStw2BpkBou7dyiikGfzN0LzXPkiaZYSEwKizM9IsRin75 X-Authentication-Warning: b3.hs: Host noddy.hs [10.0.5.3] claimed to be [10.0.5.3] To: "supervision@list.skarnet.org" From: Dewayne Geraghty Subject: s6-rc : Anomalies or normal behaviour Message-ID: <780655eb-a904-8b29-b559-80a7a0abc9f1@heuristicsystems.com.au> Date: Sun, 4 Oct 2020 09:30:27 +1100 User-Agent: Mozilla/5.0 (Windows NT 6.1; rv:78.0) Gecko/20100101 Thunderbird/78.2.2 MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Language: en-GB Content-Transfer-Encoding: 7bit Is this correct behaviour or are these just anomalies? 1. Use of backtick variable assignment on FreeBSD doesn't appear correct 2. Use of emptyenv results in a remnant "defunct" process 3. Should a bundle's contents file include the dependencies of its contents file, for a down change to the bundle to bring the service's components down? 1. I expected to see the date in seconds since time epoch, but result is variable name # execlineb -Pc 'backtick D { date "+%s" } echo $D' $D Note: this isn't how I intend to use backtick, but I try to use the simplest case to understand how things work --- 2. When I use emptyenv within an execlineb script, I have a "defunct" zombie process 89685 3 S< 0:00.01 |-- s6-supervise base:time-srv 3020 - S The time server script is #!/usr/local/bin/execlineb -P emptyenv multidefine -d " " "base time ntpd /usr/local/sbin/ntpd" { JAIL SERVICE USER PROGRAM } background { echo Starting service $SERVICE using $PROGRAM on $JAIL under user $USER } fdmove 2 1 redirfd -w 1 /m/base:time/fifo $PROGRAM -c /etc/ntp.conf -N -g -u $USER --nofork removing emptyenv, prevents the zombie from being created. Is this normal? --- 3. Is it normal/standard/good practice to include a dependency in a bundle. For example, I have a "time" bundle whose contents are time-srv. time-srv starts the ntpd service, and has as a dependency time-log. Using "s6-rc -u change time", everything behaves as documented, ie starts "time" which starts time-log, then time-srv. However # s6-rc -v 9 -d change base:time s6-rc: info: bringing selected services down s6-rc: info: processing service base:time-srv: stopping s6-rc: info: service base:time-srv stopped successfully # Starting logging service time for base with user s6log folder /var/log/time and the time-log continues running. Admittedly # s6-svstat /s/scan/base:time-srv ; s6-svstat /s/scan/base:time-log down (exitcode 0) 6 seconds, ready 6 seconds # This is time-srv up (pid 85131) 6 seconds # This is time-log,so it has been restarted To obtain the desired/expected behaviour and bring time-log down must it also be added to the bundle's contents? These observations were made using FreeBSD 12.2Stable on amd64. Apologies for still asking newbie questions, but I'm trying to embed s6 here, which translates to properly understand. Regards, Dewayne.