From patchwork Sat Mar 22 11:36:49 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Ludovic_Court=C3=A8s?= X-Patchwork-Id: 40586 Return-Path: X-Original-To: patchwork@mira.cbaines.net Delivered-To: patchwork@mira.cbaines.net Received: by mira.cbaines.net (Postfix, from userid 113) id B405E27BBEA; Sat, 22 Mar 2025 11:38:34 +0000 (GMT) X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=-7.6 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,MAILING_LIST_MULTI,RCVD_IN_DNSWL_BLOCKED, RCVD_IN_VALIDITY_CERTIFIED,RCVD_IN_VALIDITY_RPBL,RCVD_IN_VALIDITY_SAFE, SPF_HELO_PASS,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.6 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mira.cbaines.net (Postfix) with ESMTPS id 7B2AE27BBE2 for ; Sat, 22 Mar 2025 11:38:34 +0000 (GMT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tvxBO-0002CD-Tp; Sat, 22 Mar 2025 07:38:30 -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 1tvxB2-0001mQ-43 for guix-patches@gnu.org; Sat, 22 Mar 2025 07:38:08 -0400 Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1tvxB1-00007x-Lg for guix-patches@gnu.org; Sat, 22 Mar 2025 07:38:07 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=debbugs.gnu.org; s=debbugs-gnu-org; h=MIME-Version:References:In-Reply-To:Date:From:To:Subject; bh=KZ7oLLkXmt5hqfPyIHODxWcEeiUl8Vy7AV/4viyIeEc=; b=h36c1qe4aQ615uVW67CZ0ak0/uctpGTr8BXmi6GtyebcrkXdWzrdlpmPTtl3JQAt2D+jo1mFE7yjXlt7Rt81ghx2i11h4eMWF1LCsGuVp6UJglO5/7BO2A+AysuISJVsus+3iDde98kBycH7n+mWMd9uL8KLqlekMhTS4NverDdh+B2D2LocNnga/I/N7VZz8xPtI/mS/0afCC3TnH6vY7WrbjzZtbT7JxJsMzitQSxqRdtGJ9nkvDBye0LtBkEhIUzT08X8uOJbC6BDENSARIdYkh10EmUaoJRSLco731h9KWLmLXxYHesp1kuOtc7TFg+ljXwJbUxMmQn/vVndNg==; Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1tvxB1-0002Zc-H4 for guix-patches@gnu.org; Sat, 22 Mar 2025 07:38:07 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#77041] [PATCH v2 12/16] services: ganeti: Update to Shepherd 1.0 interface. Resent-From: Ludovic =?utf-8?q?Court=C3=A8s?= Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Sat, 22 Mar 2025 11:38:07 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 77041 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 77041@debbugs.gnu.org Cc: Ludovic =?utf-8?q?Court=C3=A8s?= Received: via spool by 77041-submit@debbugs.gnu.org id=B77041.17426434679744 (code B ref 77041); Sat, 22 Mar 2025 11:38:07 +0000 Received: (at 77041) by debbugs.gnu.org; 22 Mar 2025 11:37:47 +0000 Received: from localhost ([127.0.0.1]:41195 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tvxAh-0002X0-7u for submit@debbugs.gnu.org; Sat, 22 Mar 2025 07:37:47 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:54254) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1tvxAZ-0002VL-Kq for 77041@debbugs.gnu.org; Sat, 22 Mar 2025 07:37:39 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1tvxAU-0008VG-Bp; Sat, 22 Mar 2025 07:37:34 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=MIME-Version:References:In-Reply-To:Date:Subject:To: From; bh=KZ7oLLkXmt5hqfPyIHODxWcEeiUl8Vy7AV/4viyIeEc=; b=EkigGbN6InrDFs9FLYVl tzfTEpV4Ng0pZMz4N4kTONHicV57+CdXhCcd5HttVMUI3oK2+7Aafxmw/2DSLfAgia4NPi3pNCvJo L554PCh0B2ps6oEHUAed6U6x3cZZ/4sVYVXyZF5k42kger/st1eDaqHN/W8S6pXPOLsecMyS3yzxu t4QWo5izpgXnhoZ2ztRS8GP2D9Wxx2GKZXoWXCCHvurSdcKWYpLeBojgFSzME2mwMaHDHtj3H8WfL 4p9m3+pBdkXuvMboI+2I8oz6/aFrwGsWU44tt42VkltT+/58AbaQbf+SOEaz0U//5Sl9Rguxn37af 9qTp51tXM7mhcw==; From: Ludovic =?utf-8?q?Court=C3=A8s?= Date: Sat, 22 Mar 2025 12:36:49 +0100 Message-ID: <2a37b6eecb6d9137fde541da20aacc24bd380dd3.1742642743.git.ludo@gnu.org> X-Mailer: git-send-email 2.48.1 In-Reply-To: References: MIME-Version: 1.0 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: guix-patches@gnu.org List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org Sender: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org X-getmail-retrieved-from-mailbox: Patches * gnu/services/ganeti.scm (shepherd-wconfd-force-start-action)[procedure]: Use ‘enable-service’ and ‘perform-service-action’ instead of ‘action’, which was deprecated in 0.10.x and replaced in 1.0. Change-Id: I2ba7d973b95f17f6ce093185fec7b246cf427be9 --- gnu/services/ganeti.scm | 19 +++++++++---------- 1 file changed, 9 insertions(+), 10 deletions(-) diff --git a/gnu/services/ganeti.scm b/gnu/services/ganeti.scm index ee72946c88..f905ab8395 100644 --- a/gnu/services/ganeti.scm +++ b/gnu/services/ganeti.scm @@ -329,18 +329,17 @@ (define shepherd-wconfd-force-start-action "Forcefully start wconfd even on non-master nodes (dangerous!).") (procedure #~(lambda _ (format #t "Forcefully starting the wconfd daemon...~%") - (action 'ganeti-wconfd 'enable) - (dynamic-wind - (lambda () - (false-if-exception - (call-with-output-file #$%wconfd-force-node-hint - (lambda (port) - (const #t))))) - (lambda () - (action 'ganeti-wconfd 'restart)) + (enable-service (lookup-service 'ganeti-wconfd)) + (call-with-output-file #$%wconfd-force-node-hint + (const #t)) + (catch #t (lambda () + (perform-service-action (lookup-service 'ganeti-wconfd) + 'restart) + (delete-file #$%wconfd-force-node-hint)) + (lambda _ (delete-file #$%wconfd-force-node-hint))) - #t)))) + #t)))) (define ganeti-wconfd-service (match-lambda