From patchwork Sat Mar 15 21:37:18 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: 40227 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 C1CF727BBEA; Sat, 15 Mar 2025 21:39:55 +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 8822F27BBE9 for ; Sat, 15 Mar 2025 21:39:55 +0000 (GMT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ttZDr-0004xf-A3; Sat, 15 Mar 2025 17:39:11 -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 1ttZDm-0004v7-US for guix-patches@gnu.org; Sat, 15 Mar 2025 17:39:06 -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 1ttZDm-0002n7-Ew for guix-patches@gnu.org; Sat, 15 Mar 2025 17:39:06 -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=hSYzFvYKfY8bkRYb+4VCN/okxSjMyvuMj7dIEImbp4cR4Iytx6FKloX3LEg5emBXE8Mz/8a9TeE8JZSp7Vh/CQy0FAILsj7Xpob709sJPyK5+JHH8m6n6RuzhVCT9r9h4e7ALjhLVz/UgC3cxd0xyMDL4KMHNf1aNUQUCV3zPQ3hwIAZ0UHIbbaZ12tRL+QD9VycjeIPrciWIJj7M9mnn93ZH+YpkUXeNpnNO3wVfyH/1d5TfY16u1nkUpPNz/lMq2HKsCNON3Vfqx9wnGqbmJ8///JL8Y9ttfwNhmj/UBggIavHSTTMtotPAraAa38Dygoe169II3V064VdNr7yeA==; Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1ttZDm-0004Vn-2C for guix-patches@gnu.org; Sat, 15 Mar 2025 17:39:06 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#77041] [PATCH 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, 15 Mar 2025 21:39:06 +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.174207473817253 (code B ref 77041); Sat, 15 Mar 2025 21:39:06 +0000 Received: (at 77041) by debbugs.gnu.org; 15 Mar 2025 21:38:58 +0000 Received: from localhost ([127.0.0.1]:43863 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ttZDd-0004U6-Vq for submit@debbugs.gnu.org; Sat, 15 Mar 2025 17:38:58 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:55816) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1ttZCv-0004Nz-TL for 77041@debbugs.gnu.org; Sat, 15 Mar 2025 17:38:19 -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 1ttZCp-0002iK-Dg; Sat, 15 Mar 2025 17:38:07 -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=IeI5z1i6FlXXm3qWypwZ 4o9M4KSxIBSVdsSXkJ330dPIMgbImcLaVb1II/ztBt008E0K+V/TYdZlo039X8rIwxkbuwvdrGf0G wmYEFcYYvxtAUNO9VhBH99hLWlwy1c9OLhyyjhyjigi1SSPgaZdJlkx0nfcd3pc3ccH16FMZYIOsM fnzyy0JszDWiuolZlQfbnTnerCrwFSHBANIIPrZCHzsDOWHmk4xO41LFj5BhOD/0s5nkT3GHL4IwM N5TOgunikF7bk605zkP1dyJBMjTkfyUfz0CrWrWl8N5Efpl5HKizRc4Yvs3ZTf08uKCKwrA+bBNdl 10JaK503ZE4LqA==; From: Ludovic =?utf-8?q?Court=C3=A8s?= Date: Sat, 15 Mar 2025 22:37:18 +0100 Message-ID: <8719086cc46a85760d78bf1515b2b0684462bcb9.1742073920.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