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.0 required=5.0 tests=MAILING_LIST_MULTI autolearn=ham autolearn_force=no version=3.4.4 Received: (qmail 11180 invoked from network); 17 Nov 2020 21:53:31 -0000 Received: from alyss.skarnet.org (95.142.172.232) by inbox.vuxu.org with ESMTPUTF8; 17 Nov 2020 21:53:31 -0000 Received: (qmail 16864 invoked by uid 89); 17 Nov 2020 21:53:56 -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 16857 invoked from network); 17 Nov 2020 21:53:55 -0000 From: "Laurent Bercot" To: "Xavier Stonestreet" , supervision@list.skarnet.org Subject: Re: s6-rc: timeout questions Date: Tue, 17 Nov 2020 21:53:28 +0000 Message-Id: In-Reply-To: References: Reply-To: "Laurent Bercot" User-Agent: eM_Client/8.0.3385.0 Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: quoted-printable X-VR-SPAMSTATE: OK X-VR-SPAMSCORE: -100 X-VR-SPAMCAUSE: gggruggvucftvghtrhhoucdtuddrgedujedrudeffedgudehgecutefuodetggdotffvucfrrhhofhhilhgvmecupfgfoffgtffkveetuefngfdpqfgfvfenuceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmnecujfgurhephffvufffkfgjfhhrfgggtgfgsehtqhertddtreejnecuhfhrohhmpedfnfgruhhrvghnthcuuegvrhgtohhtfdcuoehskhgrqdhsuhhpvghrvhhishhiohhnsehskhgrrhhnvghtrdhorhhgqeenucggtffrrghtthgvrhhnpedvgfevffeuleegvdektdffteegvdeiieefkeetgfeuheffheelheejhfevueeijeenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepmhhouggvpehsmhhtphhouhht >- Am I correct in thinking that if a service has properly configured >timeout-kill and timeout-finish, timeout-down becomes unnecessary and >even undesirable as it can leave services in an undefined state limbo? >I know the documentation pretty much says so, but I'm still a bit >confused by the existence of timeout-down to begin with, if it's >redundant and unhelpful. timeout-kill and timeout-finish are a s6 thing: if present, they're just copied as is to the service directory that will be managed by the s6 supervision tree. timeout-up and timeout-down are specific to s6-rc: they will be embedded into the compile database. They do not interact with s6 at all, they're just a rule for the s6-rc state machine: if the service does not report being up (resp. down) by the timeout, then s6-rc marks the transition as failed and stops looking at what happens with the service. For longruns, yes, timeout-kill ensures that the service will eventually be brought down no matter what. But there are cases where you *do not want* to kill -9 a daemon (and need a timeout-kill of 0). timeout-down is useful here, even if it's a pretty niche case. And then, of course, the point is that it's needed for oneshots, which do not have the s6 mechanisms. >- Can you confirm that timeout-up and timeout-down are also used with >oneshots? They are defined in the s6-rc-compile documentation, but the >s6-rc documentation doesn't specifically mention them for oneshots >state transitions. Yes, I confirm that they're also (and primarily) used with oneshots. They're defined in the "atomic services" section, which comprises longruns *and* oneshots. -- Laurent