From bba05a0c14c52b5f4c365e1c15a6afd48d6eeb37 Mon Sep 17 00:00:00 2001 From: John Joyce Date: Tue, 30 Jun 2026 13:51:51 -0400 Subject: [PATCH] native: configurable ready timeout Allow the node ready timeout to be configurable. --- munet/native.py | 19 ++++++++++++++++++- 1 file changed, 18 insertions(+), 1 deletion(-) diff --git a/munet/native.py b/munet/native.py index bf1bfae..8e2edbe 100644 --- a/munet/native.py +++ b/munet/native.py @@ -3586,7 +3586,24 @@ async def wait_until_ready(x): tasks = [asyncio.create_task(wait_until_ready(x)) for x in ready_nodes] logging.debug("Waiting for ready on nodes: %s", ready_nodes) - _, pending = await asyncio.wait(tasks, timeout=30) + ready_timeout = 30 + # setable via "ready-timeout: 600" in kinds.yaml if a particular type will take a long time. + + for node in ready_nodes: + try: + node_timeout = int(node.config.get("ready-timeout", ready_timeout)) + except (TypeError, ValueError): + node_timeout = ready_timeout + + ready_timeout = max(ready_timeout, node_timeout) + + self.logger.info( + "waiting up to %ss for ready-cmd on %s ready nodes", + ready_timeout, + len(ready_nodes), + ) + + _, pending = await asyncio.wait(tasks, timeout=ready_timeout) if pending: logging.warning("Timeout waiting for ready: %s", pending) for nr in pending: