From 1d180225536b8e92a05f2b0710a115dd71a40cc1 Mon Sep 17 00:00:00 2001 From: Christian Breunig Date: Sat, 10 Oct 2026 21:24:16 +0200 Subject: http-api: T9453: wait for the API server to be ready after a reload A commit that changes an already running HTTP API only signals the server and returns at once. The server then restarts uvicorn asynchronously, and until it listens again requests through nginx fail. A fixed one-second sleep was meant to cover this but is too short on slow systems, making the https smoketest fail intermittently and API clients see errors right after a commit. The server now creates a readiness marker once it accepts requests. The commit clears the marker before reloading and waits for it to reappear, warning if that takes longer than 30 seconds. --- python/vyos/defaults.py | 1 + 1 file changed, 1 insertion(+) (limited to 'python') diff --git a/python/vyos/defaults.py b/python/vyos/defaults.py index 23243346d..ceb4cf47f 100644 --- a/python/vyos/defaults.py +++ b/python/vyos/defaults.py @@ -63,6 +63,7 @@ config_files = { config_status = '/tmp/vyos-config-status' api_config_state = '/run/http-api-state' +api_ready_state = '/run/http-api-ready' frr_debug_enable = '/tmp/vyos.frr.debug' dhclient_debug_enable = '/tmp/vyos.dhclient.debug' static_route_dhcp_interfaces_path = '/tmp/static_dhcp_interfaces' -- cgit v1.2.3