Skip to content

Commit 42a7c15

Browse files
committed
Update /debug/haproxy with more info
1 parent ede24cc commit 42a7c15

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/aleph/vm/orchestrator/views/__init__.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -160,9 +160,10 @@ async def debug_haproxy(request: web.Request) -> web.Response:
160160
if not pathlib.Path(socket).exists():
161161
logger.info("HAProxy not running? socket not found, skip domain mapping update")
162162
return web.json_response({"status": "no socket"}, status=http.HTTPStatus)
163-
r: dict = {"status": "ok", "backends": {}}
163+
r: dict = {"status": "ok", "backends": {}, "mappings": {}}
164164
for backend in haproxy.HAPROXY_BACKENDS:
165165
r["backends"][str(backend["name"])] = haproxy.get_current_backends(socket, backend["name"])
166+
r["mappings"][backend["name"]] = haproxy.get_current_mappings(socket, backend["map_file"])
166167
return web.json_response(
167168
r,
168169
dumps=dumps_for_json,

0 commit comments

Comments
 (0)