modules/consul-distributed-services: use unique name for pre-flight-check

This commit is contained in:
Max Headroom 2023-11-01 15:13:22 +01:00
parent 4d0d1d2254
commit cbdae3116d

View file

@ -35,7 +35,7 @@ in
'';
waitForConsul = pkgs.writeShellScript "wait-for-consul" ''
while ! ${consul}/bin/consul lock --name="pre-flight-check" --n=${toString cfg.replicas} --shell=false "$1" ${pkgs.coreutils}/bin/true; do
while ! ${consul}/bin/consul lock --name="pre-flight-check" --n=${toString cfg.replicas} --shell=false "$1-pre-flight-check-${config.networking.hostName}-$RANDOM" ${pkgs.coreutils}/bin/true; do
sleep 1
done
'';