From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp0.migadu.com ([2001:41d0:403:4876::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms13.migadu.com with LMTPS id AFHoIFbUfmZ0CQEAqHPOHw:P1 (envelope-from ) for ; Fri, 28 Jun 2024 15:18:46 +0000 Received: from aspmx1.migadu.com ([2001:41d0:403:4876::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp0.migadu.com with LMTPS id AFHoIFbUfmZ0CQEAqHPOHw (envelope-from ) for ; Fri, 28 Jun 2024 17:18:46 +0200 X-Envelope-To: larch@yhetil.org Authentication-Results: aspmx1.migadu.com; none 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 679469DDD for ; Fri, 28 Jun 2024 17:18:45 +0200 (CEST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1sNDMI-0003Di-Nb; Fri, 28 Jun 2024 11:17:54 -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 1sNDMF-0003DV-Nn for guix-devel@gnu.org; Fri, 28 Jun 2024 11:17:51 -0400 Received: from sail-ipv4.us-core.com ([208.82.101.137]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_CHACHA20_POLY1305:256) (Exim 4.90_1) (envelope-from ) id 1sNDMC-0007OD-Mc; Fri, 28 Jun 2024 11:17:51 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; s=2017; bh=b4BnWOv9TLnnsOa XeUIX/2d1FvKkDhRdYdehDFqk1XA=; h=date:references:in-reply-to:subject: cc:to:from; d=lease-up.com; b=f3rHT22LInHtS8luEP9UmNHon2FLrDiQh3IUjrg6 hxEfVbCl7H/2ibMH5BYAm3xew8Vewt1ncOJ8lCXuUVzgtEbzOqNLA870p0cZBWQsMRLdt5 nFbkaWprUOcM6aVDoGHJPhlyjkxcjBa4iHmD90ZmGm1krjbEgn3V+Tp4MPHsM= Received: by sail-ipv4.us-core.com (OpenSMTPD) with ESMTPSA id 3e523751 (TLSv1.3:TLS_CHACHA20_POLY1305_SHA256:256:NO); Fri, 28 Jun 2024 15:17:41 +0000 (UTC) To: Maya , Ludovic =?utf-8?Q?Court=C3=A8s?= , Attila Lendvai Cc: guix-devel@gnu.org Subject: Reproducer for failing shepherd startup In-Reply-To: <874j9el2r1.fsf@zenmaya.xyz> References: <87a5je77f8.fsf@zenmaya.xyz> <877cea7cvf.fsf@gnu.org> <874j9el2r1.fsf@zenmaya.xyz> Date: Fri, 28 Jun 2024 08:17:41 -0700 Message-ID: <8734oxw0yy.fsf@lease-up.com> MIME-Version: 1.0 Content-Type: text/plain Received-SPF: pass client-ip=208.82.101.137; envelope-from=felix.lechner@lease-up.com; helo=sail-ipv4.us-core.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham 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: , Reply-to: Felix Lechner From: Felix Lechner via "Development of GNU Guix and the GNU System distribution." 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-Spam-Score: -4.00 X-Migadu-Queue-Id: 679469DDD X-Migadu-Scanner: mx10.migadu.com X-Migadu-Spam-Score: -4.00 X-TUID: HfTjhhfbfU2O Hi Maya, Ludo' and Attila, On Thu, Jun 27 2024, Maya wrote: > I still don't know how to fix the issue properly, but at least I can > reconfigure my system now <3 I have a reproducer! In the code below, please change "sunday" to "0", together with this line in your "services": (service mdadm-resync-service-type) When reconfiguring, you should see something like: guix deploy: warning: an error occurred while upgrading services on 'YOUR-FQDN': %exception #")>> That system should refuse to boot. Interestingly, the Shepherd will block in such a way that even the Magic SysRq key 'i' which is normally enough will not stop it. I have to go all the way *backwards* to 'b' in the sequence B-U-S-I-E-R. [1] Ludo', thank you for making the #:days-of the week symbolic [2] and also for fixing the Shepherd to be able to show status and reboot again! [3] Kind regards Felix [1] https://lists.gnu.org/archive/html/guix-devel/2024-04/msg00214.html [2] https://git.savannah.gnu.org/cgit/shepherd.git/commit/?h=devel&id=2e844430ec8aa4aebb7a8c185f54d6f91bbc3cfe [3] https://lists.gnu.org/archive/html/info-gnu/2024-06/msg00009.html * * * (define (mdadm-resync-shepherd-service config) (shepherd-service (provision '(mdadm-resync)) (requirement '(file-systems user-processes)) (modules '((ice-9 ftw) (ice-9 regex) (shepherd service timer))) (start #~(make-timer-constructor ;; Every first Sunday of the month at 1 AM. (calendar-event #:days-of-month '(1 2 3 4 5 6 7) #:days-of-week '(sunday) #:hours '(1)) (lambda _ ;; some helpers and error handling (define (info message) (let ((timestamp (strftime "%Y-%m-%dT%H:%M:%S%zZ" (localtime (current-time))))) (format (current-error-port) "~a ~a~%" timestamp message))) (define (resync array) (let ((port (open-output-file (string-append "/sys/block/" array "/md/sync_action")))) (display "check" port) (close-port port)) (info (string-append "Started MD resync for " array "."))) (let* ((is-mdadm-device? (lambda (file) (string-match "^md.+" file))) (arrays (scandir "/dev" is-mdadm-device?))) (map resync arrays))))) (stop #~(make-timer-destructor)) ;; (actions ;; (list (shepherd-action ;; (name 'trigger) ;; (documentation "Trigger the action associated with this timer.") ;; (procedure #~(identity trigger-timer))))) (documentation "MD array resync"))) (define mdadm-resync-service-type (service-type (name 'mdadm-resync) (description "MD array resync") (extensions (list (service-extension shepherd-root-service-type (compose list mdadm-resync-shepherd-service)))) (default-value #f)))