From 27806fde372189895cf79405a042c5ee489f3dc1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ludovic=20Court=C3=A8s?= Date: Sat, 15 Mar 2025 18:55:07 +0100 Subject: [PATCH] services: ganeti: Update to Shepherd 1.0 interface. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * 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. Reviewed-by: Maxim Cournoyer 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 ee72946c8857ba58e14e71be6ba46befb230c951..f905ab8395071377c7be526d6a1d3f7fbc14fd3f 100644 --- a/gnu/services/ganeti.scm +++ b/gnu/services/ganeti.scm @@ -329,18 +329,17 @@ related to the configuration of a Ganeti cluster."))) "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