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 6406 invoked from network); 11 Jan 2023 20:15:09 -0000 Received: from alyss.skarnet.org (95.142.172.232) by inbox.vuxu.org with ESMTPUTF8; 11 Jan 2023 20:15:09 -0000 Received: (qmail 10076 invoked by uid 89); 11 Jan 2023 20:15:33 -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 10068 invoked from network); 11 Jan 2023 20:15:33 -0000 DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; h=X-Originating-IP:Date:From:To:Subject:Message-ID:In-Reply-To:References:MIME-Version:Content-Type:Content-Transfer-Encoding; s=default; d=troubleshooters.com; b=ffJs20uMT5n4gy4gR6lrcwnFmgTDWr72JI31SOzqfLw+5vt5uKO8AZpzuCc93H5ADpwtOmacwb+1mTGJ8wmqgxKwDs4Dp1kOLOAKmh3OlLCJjU4FEzSF9Jiei9M73Bp33D7iBtEQjCtQRbjrUlP9OQyquPcsAJsG37bt90ZIqrc=; DKIM-Signature: v=1; a=rsa-sha1; c=relaxed/simple; d=troubleshooters.com; s=default; t=1673468104; bh=rvWKBJddUPTdAHze8hPUG8mJcqQ=; l=1167; h=X-Originating-IP:Date:From:To:Subject:Message-ID:In-Reply-To: References:MIME-Version:Content-Type:Content-Transfer-Encoding; b=U1XPSvr0t5lwmrka9Qbe8uuBCkK2mybhjL2mO+bhsVTviFmASt697ur94Fy6Wj1Ko xsVTZAoj5QVIC/cr7p2y6KJfllv623dDVCLGvqxkZjn60FvxaLg7Yu4XQF69iR1j/4 3qvTUQdd6p3c/M3fHU6xm0kDFD7xL/OIR3Qdawdo= X-Originating-IP: [184.90.142.203] Date: Wed, 11 Jan 2023 15:15:03 -0500 From: Steve Litt To: supervision@list.skarnet.org Subject: Re: s6 vs shell wrappers for client connections Message-ID: <20230111151503.2a4bb0c8@mydesk.domain.cxm> In-Reply-To: References: MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit artur.brzozowski said on Tue, 10 Jan 2023 22:23:32 +0000 >How, if at all, could s6 >help remove this executable ambiguity, the need for checking and >wrapping? The goal is to always run the program correctly: if >server is available, connect to it with client binary, if not - >use the standard one. if s6-svstat myserver; then client_binary else send_email_to_admin faux_client_binary fi or: [ s6-svstat myserver ] && exec client_binary send_email_to_admin exec faux_client_library I guess the preceding scripts qualify as a "wrapper scripts", but they're pretty innocuous. The second one doesn't even leave a trace that it was ever a shellscript. As Laurent mentioned, the s6/runit/Daemontools philosophy is to assume the server's running because Daemontools-inspired process supervisors are so robust, but if your client must be available no matter what, even when the server is deliberately taken down for replacement or servicing or troubleshooting, then for sure a Plan B is a good thing. SteveT Steve Litt Autumn 2022 featured book: Thriving in Tough Times http://www.troubleshooters.com/bookstore/thrive.htm