From 719c6f703a5e422cf249f9a87320a8ab4cdf1fec Mon Sep 17 00:00:00 2001 From: Stefan Allius <122395479+s-allius@users.noreply.github.com> Date: Sun, 13 Oct 2024 17:13:07 +0200 Subject: [PATCH] S allius/issue196 (#198) * fix healthcheck - on infrastructure with IPv6 support localhost might be resolved to an IPv6 adress. Since the proxy only support IPv4 for now, we replace localhost by 127.0.0.1, to fix this --- CHANGELOG.md | 1 + app/src/inverter_base.py | 2 +- docker-compose.yaml | 2 +- 3 files changed, 3 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 618da05..7e6b801 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,6 +7,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ## [unreleased] +- fix healthcheck on infrastructure with IPv6 support [#196](https://github.com/s-allius/tsun-gen3-proxy/issues/196) - refactoring: cleaner architecture, increase test coverage - Parse more values in Server Mode [#186](https://github.com/s-allius/tsun-gen3-proxy/issues/186) - GEN3: add support for new messages of version 3 firmwares [#182](https://github.com/s-allius/tsun-gen3-proxy/issues/182) diff --git a/app/src/inverter_base.py b/app/src/inverter_base.py index 8acb01e..a493d8b 100644 --- a/app/src/inverter_base.py +++ b/app/src/inverter_base.py @@ -62,7 +62,7 @@ class InverterBase(InverterIfc, Proxy): # now explicitly call garbage collector to release unreachable objects unreachable_obj = gc.collect() - logging.info( + logging.debug( f'InverterBase.__exit: freed unreachable obj: {unreachable_obj}') def __del_remote(self): diff --git a/docker-compose.yaml b/docker-compose.yaml index 9b4f9e8..3a48099 100644 --- a/docker-compose.yaml +++ b/docker-compose.yaml @@ -83,7 +83,7 @@ services: - ${PROJECT_DIR:-./}tsun-proxy/log:/home/tsun-proxy/log - ${PROJECT_DIR:-./}tsun-proxy/config:/home/tsun-proxy/config healthcheck: - test: wget --no-verbose --tries=1 --spider http://localhost:8127/-/healthy || exit 1 + test: wget --no-verbose --tries=1 --spider http://127.0.0.1:8127/-/healthy || exit 1 interval: 10s timeout: 3s networks: