[STANDARD] S3 = 100%: проверка изнутри CT для localhost-сервисов, TCP для mosquitto/coturn. Итог: S1 70%, S2 100%, S3 100%, S4 100%, полный 70%
lint / hygiene (push) Failing after 17s
standard / check (push) Successful in 6s

This commit is contained in:
root committed 2026-11-07 14:04:09 +03:00
1 parent e03477e4ba
commit 63e9ca1a12
7 files changed
+139 -9

No files matched your search

+14
View File
@@ -99,6 +99,7 @@ PORT_HINTS = {
"exportarr-prowlarr": 9702,
"exportarr-bazarr": 9703,
"ha-strip": 8130,
"buryan-alert-webhook": None,
"loki": 3100,
"alertmanager": 9093,
"buryan-alert-webhook": 8020,
@@ -123,6 +124,14 @@ def ct_ip(ct):
return ip
def probe_inside(ct, port, path="/"):
"""Проверка изнутри CT (для сервисов, слушающих только 127.0.0.1)."""
cmd = ("pct exec %s -- curl -s -o /dev/null -w '%%{http_code}' -m 4 "
"http://127.0.0.1:%s%s 2>/dev/null" % (ct, port, path))
out = (sh(cmd) or "").strip()
return int(out) if out.isdigit() else None
def probe(ct, port):
if not port:
return None
@@ -144,6 +153,11 @@ def probe(ct, port):
if code < 500:
return code
best = best or code
# последняя попытка — изнутри контейнера
for path in paths:
inner = probe_inside(ct, p, path)
if inner is not None:
return inner
return best