Skip to content

Commit 7fffadd

Browse files
fix: bulk import should not inject hardcoded timeout defaults
When a backend block in haproxy.cfg does not specify explicit timeout values, the bulk import was injecting hardcoded defaults (connect 10s, server 60s, queue 60s) into the database. These then appeared in the generated config and overrode the agent's defaults section. Now, only explicitly declared timeouts are stored; omitted ones remain NULL so the agent's existing defaults section stays in effect.
1 parent 1317927 commit 7fffadd

2 files changed

Lines changed: 6 additions & 6 deletions

File tree

backend/routers/config.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1644,9 +1644,9 @@ async def bulk_create_entities(
16441644
backend_data.get("request_headers"),
16451645
backend_data.get("response_headers"),
16461646
backend_data.get("options"),
1647-
backend_data.get("timeout_connect", 10000),
1648-
backend_data.get("timeout_server", 60000),
1649-
backend_data.get("timeout_queue", 60000),
1647+
backend_data.get("timeout_connect"),
1648+
backend_data.get("timeout_server"),
1649+
backend_data.get("timeout_queue"),
16501650
request.cluster_id
16511651
)
16521652

backend/utils/haproxy_config_parser.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -56,9 +56,9 @@ class ParsedBackend:
5656
request_headers: Optional[str] = None # HTTP request headers (backend level)
5757
response_headers: Optional[str] = None # HTTP response headers (backend level)
5858
options: Optional[str] = None # HAProxy backend options (option http-keep-alive, option forwardfor, etc.)
59-
timeout_connect: Optional[int] = 10000
60-
timeout_server: Optional[int] = 60000
61-
timeout_queue: Optional[int] = 60000
59+
timeout_connect: Optional[int] = None
60+
timeout_server: Optional[int] = None
61+
timeout_queue: Optional[int] = None
6262
servers: List[ParsedServer] = None
6363

6464
def __post_init__(self):

0 commit comments

Comments
 (0)