Skip to content

Commit

Permalink
imp: add preStart on mithril-verify to avoid secrets race
Browse files Browse the repository at this point in the history
  • Loading branch information
johnalotoski committed Apr 16, 2024
1 parent ad539c3 commit f2ab3e8
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions flake/nixosModules/role-block-producer.nix
Expand Up @@ -224,8 +224,16 @@ flake: {
RELAY_ENDPOINT = mkIf mithrilCfg.useRelay "${mithrilCfg.relayEndpoint}:${toString mithrilCfg.relayPort}";
};

preStart = ''
while ! [ -s /run/secrets/cardano-node-cold-verification ]; do
echo "Waiting 10 seconds for secret /run/secrets/cardano-node-cold-verification to become available..."
sleep 10
done
'';

serviceConfig = {
Type = "oneshot";

ExecStart = getExe (pkgs.writeShellApplication {
name = "mithril-signer-verifier";
runtimeInputs = with pkgs; [cardano-cli curl gnugrep jq];
Expand Down

0 comments on commit f2ab3e8

Please sign in to comment.