From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp0.migadu.com ([2001:41d0:303:e224::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms1.migadu.com with LMTPS id UBDRMv0YUmaohAEAqHPOHw:P1 (envelope-from ) for ; Sat, 25 May 2024 18:59:41 +0200 Received: from aspmx1.migadu.com ([2001:41d0:303:e224::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp0.migadu.com with LMTPS id UBDRMv0YUmaohAEAqHPOHw (envelope-from ) for ; Sat, 25 May 2024 18:59:41 +0200 X-Envelope-To: larch@yhetil.org Authentication-Results: aspmx1.migadu.com; dkim=none ("invalid DKIM record") header.d=freakingpenguin.com header.s=x header.b=b8pbiETh; dmarc=none; spf=pass (aspmx1.migadu.com: domain of "guix-devel-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="guix-devel-bounces+larch=yhetil.org@gnu.org" ARC-Seal: i=1; s=key1; d=yhetil.org; t=1716656381; a=rsa-sha256; cv=none; b=qWSeqfU63PSPziHWiOdhj6uRgxJ+muOKpXkp9WmwkURU2XBQFJb70g0syjqYRcrpBtu/8Y HT3AaVDlknG+U9pfm3fS8hLM+KBlAdvNoA7h3Nu5daQM7K0af8Or4PNpjXubOit/keOQbE dtfGIgjGCTwvMo9+rMR/p0CpxE7nk0JLbAoYvFosDp+tQx3KBWOwr1iGhn2DHzkY/ByXO5 ICakbMt58S1t9iyIu8EPsEtzJQ6VQZvTdUjYePwBTcEd7VXpfp4W6iYym7hOGFRdJ//OPu 2w2ZlZTvJxCo4CmrNJ5MxXE9zDiLwhfnKtfp9pLOTPdrfjnCcqopdVWpBT/fBQ== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=none ("invalid DKIM record") header.d=freakingpenguin.com header.s=x header.b=b8pbiETh; dmarc=none; spf=pass (aspmx1.migadu.com: domain of "guix-devel-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="guix-devel-bounces+larch=yhetil.org@gnu.org" ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1716656381; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type:in-reply-to:in-reply-to: references:references:list-id:list-help:list-unsubscribe: list-subscribe:list-post:dkim-signature; bh=Ck2EyAJziqOF5dBl/4DLBZzSXlNRUhqTZxfFoq8oJxA=; b=KjO+tEJSd/1RAXNMQAC7dsavff/I1H9mpk03OM+q0BOkhIlOKo2y9X8qUS09xx26Tpsf1h ZMFGlI2cPOfziNZ7QwDiM+Zrzn9gwcxZHzbmweNwyyEGaGCgqfbTI+KGcAgkdvV3ONHMbr 3oPu/neY/fXvGatMExzO/U8FW/dpMY+W8TrKMl1a+fF60hbsCB1EX9MpHIT2R9H5BmBZ40 Iv3yIreGwLmiBrdrszcLCNiI/jYvm56Lasv58JqFjZ/wbS3xFZhByuyBRbFhARH1FDHQLE cjuC1nOupQc5ksqhU81ZVvJRUc3u57NRJ+KZc/Jy1rmlGWMaIULCyzCuC8lORw== Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id 9BFCC60874 for ; Sat, 25 May 2024 18:59:41 +0200 (CEST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1sAujX-0006sW-8D; Sat, 25 May 2024 12:59:03 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1sAujV-0006ro-SQ for guix-devel@gnu.org; Sat, 25 May 2024 12:59:02 -0400 Received: from mail-108-mta26.mxroute.com ([136.175.108.26]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1sAujU-0002QV-4F for guix-devel@gnu.org; Sat, 25 May 2024 12:59:01 -0400 Received: from filter006.mxroute.com ([136.175.111.3] filter006.mxroute.com) (Authenticated sender: mN4UYu2MZsgR) by mail-108-mta26.mxroute.com (ZoneMTA) with ESMTPSA id 18fb0b0f1de000efce.001 for (version=TLSv1.3 cipher=TLS_AES_256_GCM_SHA384); Sat, 25 May 2024 16:58:57 +0000 X-Zone-Loop: 1ccc547d7eaa6f43bd5635e977e6690795fa656f1bbd X-Originating-IP: [136.175.111.3] DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=freakingpenguin.com; s=x; h=Content-Type:MIME-Version:Message-ID:Date: References:In-Reply-To:Subject:Cc:To:From:Sender:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Id: List-Help:List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=Ck2EyAJziqOF5dBl/4DLBZzSXlNRUhqTZxfFoq8oJxA=; b=b8pbiEThvHygx8912yTNEgPLH9 zzXDAStg4S+9eGNrkLj3vV2agzf8SwcuKw3HQ/SFTvXYZ4wc9MAonvT+4qeeiojz/kb7vBq+8AOsp 9vXi0JQxseR3vGwZAKCSupenbpU9FZCUIrC1hDfXLZWZYAjHNUPbofyKFZUjAr13U7dx+tV2bIr5L P8pOFGzxNY1yoVTw1gOTBncj96xCd/+PmdV/1IpCRZP+agOp/LJtW8t63DCPj/AzXCyrvXbzlGpom UBFiF9ZvrWXSAq1Cr/ed1YD2A9gyw/vTrOEXgNofHK+nMwIA2IRLQCJKfYYNA/GYRaFLIJR1HMuSV 0jwauRVg==; From: Richard Sent To: raingloom@riseup.net Cc: Guix Devel Subject: Re: watchdog triggered auto-rollback In-Reply-To: <5521e876c1944cf001dd4cac4553f738@riseup.net> (raingloom@riseup.net's message of "Fri, 24 May 2024 12:50:47 +0000") References: <5521e876c1944cf001dd4cac4553f738@riseup.net> Date: Sat, 25 May 2024 12:58:53 -0400 Message-ID: <87sey5su9e.fsf@freakingpenguin.com> User-Agent: Gnus/5.13 (Gnus v5.13) MIME-Version: 1.0 Content-Type: text/plain X-Authenticated-Id: richard@freakingpenguin.com Received-SPF: pass client-ip=136.175.108.26; envelope-from=richard@freakingpenguin.com; helo=mail-108-mta26.mxroute.com X-Spam_score_int: -16 X-Spam_score: -1.7 X-Spam_bar: - X-Spam_report: (-1.7 / 5.0 requ) BAYES_00=-1.9, DKIM_INVALID=0.1, DKIM_SIGNED=0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=no autolearn_force=no X-Spam_action: no action X-BeenThere: guix-devel@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "Development of GNU Guix and the GNU System distribution." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-devel-bounces+larch=yhetil.org@gnu.org Sender: guix-devel-bounces+larch=yhetil.org@gnu.org X-Migadu-Country: US X-Migadu-Flow: FLOW_IN X-Migadu-Queue-Id: 9BFCC60874 X-Migadu-Scanner: mx12.migadu.com X-Migadu-Spam-Score: -6.35 X-Spam-Score: -6.35 X-TUID: amrP4piK54iD raingloom@riseup.net writes: > Would others find this useful? Where in the stack would this be solved? > Could we, for example, catch an issue in the init system and still > perform a rollback? Or if not a full rollback, then at least a reboot > into the previous config? (And if that is also broken, then the one > before, etc, etc) > > Obviously there are a lot of edge cases and potential bugs in this > mechanism as well. Sticking with the SSH example, rolling back to a > version that was kept around where the authorized keys are different > would also make the machine unreachable via SSH. I would definitely find this useful, particularly when combined with unattended-upgrade-service. I don't know the best way to handle an init system failure. Perhaps a starting point would be a one-shot conditional-rollback-service with a "shepherd-requirements" field and a "test" field that takes an file-like object. This service would execute that file, write the output to some log file, and trigger a rollback if an error is signaled. Presumably this service should only trigger on boot, not reconfigure so we don't risk running the test with old services. I don't believe Guix has a mechanism yet to say "Yes, this service is new, and I /do/ want Shepherd to auto-start it, but not on reconfigure". This shouldn't be too hard to add though. -- Take it easy, Richard Sent Making my computer weirder one commit at a time.