Skip to content

Commit 125c410

Browse files
authored
Merge pull request #319 from willcl-ark/fix-healthcheck
docker: fix silly breaking docker change
2 parents 4410200 + 3ec8b6c commit 125c410

File tree

4 files changed

+5
-5
lines changed

4 files changed

+5
-5
lines changed

src/backends/compose/compose_backend.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -401,7 +401,7 @@ def add_services(self, tank: Tank, compose):
401401
"privileged": True,
402402
"cap_add": ["NET_ADMIN", "NET_RAW"],
403403
"healthcheck": {
404-
"test": ["CMD-SHELL", f"nc -z localhost {tank.rpc_port} || exit 1"],
404+
"test": ["CMD-SHELL", f"nc -z 127.0.0.1 {tank.rpc_port} || exit 1"],
405405
"interval": "10s", # Check every 10 seconds
406406
"timeout": "1s", # Give the check 1 second to complete
407407
"start_period": "5s", # Start checking after 5 seconds

src/backends/kubernetes/kubernetes_backend.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -393,7 +393,7 @@ def create_prometheus_container(self, tank) -> client.V1Container:
393393
name="prometheus",
394394
image="jvstein/bitcoin-prometheus-exporter:latest",
395395
env=[
396-
client.V1EnvVar(name="BITCOIN_RPC_HOST", value="localhost"),
396+
client.V1EnvVar(name="BITCOIN_RPC_HOST", value="127.0.0.1"),
397397
client.V1EnvVar(name="BITCOIN_RPC_PORT", value=str(tank.rpc_port)),
398398
client.V1EnvVar(name="BITCOIN_RPC_USER", value=tank.rpc_user),
399399
client.V1EnvVar(name="BITCOIN_RPC_PASSWORD", value=tank.rpc_password),
@@ -505,7 +505,7 @@ def create_circuitbreaker_container(self, tank, volume_mounts) -> client.V1Conta
505505
image=tank.lnnode.cb,
506506
args=[
507507
"--network=regtest",
508-
f"--rpcserver=localhost:{tank.lnnode.rpc_port}",
508+
f"--rpcserver=127.0.0.1:{tank.lnnode.rpc_port}",
509509
f"--tlscertpath={LND_MOUNT_PATH}/tls.cert",
510510
f"--macaroonpath={LND_MOUNT_PATH}/data/chain/bitcoin/regtest/admin.macaroon",
511511
],

src/cli/rpc.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ def __init__(self, code, message):
1919

2020
def rpc_call(rpc_method, params: dict[str, Any] | tuple[Any, ...] | None):
2121
payload = request(rpc_method, params)
22-
url = f"http://localhost:{WARNET_SERVER_PORT}/api"
22+
url = f"http://127.0.0.1:{WARNET_SERVER_PORT}/api"
2323
try:
2424
response = requests.post(url, json=payload)
2525
except ConnectionRefusedError as e:

test/ln_test.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414

1515

1616
def get_cb_forwards(index):
17-
cmd = "wget -q -O - localhost:9235/api/forwarding_history"
17+
cmd = "wget -q -O - 127.0.0.1:9235/api/forwarding_history"
1818
res = base.wait_for_rpc(
1919
"exec_run", [index, ServiceType.CIRCUITBREAKER.value, cmd, base.network_name]
2020
)

0 commit comments

Comments
 (0)