From 5ed1091b74dd4eb85430d08eeeafe5fd636444d1 Mon Sep 17 00:00:00 2001 From: Astro Date: Mon, 22 Nov 2021 02:07:16 +0100 Subject: [PATCH] nixos-module/pacemaker: link the schemas instead of generating an empty broken cib.xml --- nix/nixos-module/pacemaker.nix | 25 +++---------------------- 1 file changed, 3 insertions(+), 22 deletions(-) diff --git a/nix/nixos-module/pacemaker.nix b/nix/nixos-module/pacemaker.nix index 3cf29e6..c4dec63 100644 --- a/nix/nixos-module/pacemaker.nix +++ b/nix/nixos-module/pacemaker.nix @@ -144,29 +144,10 @@ in { requires = [ "corosync.service" ]; wantedBy = [ "multi-user.target" ]; - script = - let - cibXml = builtins.toFile "cib.xml" '' - - - - - ${lib.concatMapStrings ({ nodeid, name, ring_addrs }: '' - - '') config.services.corosync.nodelist} - - - - - - - - ''; - in '' - cp ${cibXml} /var/lib/pacemaker/cib/cib.xml - chown hacluster:pacemaker /var/lib/pacemaker/cib/cib.xml + script = '' + cp -srf ${cfg.package}/var/lib/pacemaker/* /var/lib/pacemaker/ - exec ${cfg.package}/sbin/pacemakerd + exec ${cfg.package}/sbin/pacemakerd ''; serviceConfig = { Type = "simple";