* [PATCH proxmox{,-backup} 0/2] fix #7948: acme: disable connection pooling for certificate renewal
@ 2026-09-07 16:04 Samuel Rufinatscha
2026-09-07 16:04 ` [PATCH proxmox 1/1] fix #7948: acme: disable HTTP connection pooling Samuel Rufinatscha
2026-09-07 16:04 ` [PATCH proxmox-backup 1/1] http: adapt to new pool_max_idle_per_host option Samuel Rufinatscha
0 siblings, 2 replies; 3+ messages in thread
From: Samuel Rufinatscha @ 2026-09-07 16:04 UTC (permalink / raw)
To: pbs-devel
ACME certificate renewal can fail [0] after an order has been finalized
if the CA closes the HTTP/1.1 connection during the polling delay.
Reusing that stale connection then causes the task to fail with:
"TASK ERROR: client error (SendRequest)"
Makes the maximum number of idle connections configurable in the shared
HTTP client and disables connection pooling for ACME requests.
Testing:
The issue was reproduced using Pebble and a proxy which drops a reused
connection after order finalization. The unpatched PBS build failed with
SendRequest, while the patched build opened a new connection for the
subsequent poll and completed certificate issuance successfully.
Notes for the maintainer:
* adds a public field to HttpOptions
* both PBS and PDM require the updated crates
[0] https://bugzilla.proxmox.com/show_bug.cgi?id=7948
proxmox:
Samuel Rufinatscha (1):
fix #7948: acme: disable HTTP connection pooling
proxmox-acme/src/async_client.rs | 1 +
proxmox-http/src/client/simple.rs | 9 +++++++--
proxmox-http/src/http_options.rs | 3 +++
3 files changed, 11 insertions(+), 2 deletions(-)
proxmox-backup:
Samuel Rufinatscha (1):
http: adapt to new pool_max_idle_per_host option
src/api2/node/subscription.rs | 1 +
src/tools/mod.rs | 1 +
2 files changed, 2 insertions(+)
Summary over all repositories:
5 files changed, 13 insertions(+), 2 deletions(-)
--
Generated by git-murpp 0.8.1
^ permalink raw reply [flat|nested] 3+ messages in thread
* [PATCH proxmox 1/1] fix #7948: acme: disable HTTP connection pooling
2026-09-07 16:04 [PATCH proxmox{,-backup} 0/2] fix #7948: acme: disable connection pooling for certificate renewal Samuel Rufinatscha
@ 2026-09-07 16:04 ` Samuel Rufinatscha
2026-09-07 16:04 ` [PATCH proxmox-backup 1/1] http: adapt to new pool_max_idle_per_host option Samuel Rufinatscha
1 sibling, 0 replies; 3+ messages in thread
From: Samuel Rufinatscha @ 2026-09-07 16:04 UTC (permalink / raw)
To: pbs-devel
Disable the connection pool for ACME to avoid reusing stale CA
connections.
Signed-off-by: Samuel Rufinatscha <s.rufinatscha@proxmox.com>
Link: https://bugzilla.proxmox.com/show_bug.cgi?id=7948
---
proxmox-acme/src/async_client.rs | 1 +
proxmox-http/src/client/simple.rs | 9 +++++++--
proxmox-http/src/http_options.rs | 3 +++
3 files changed, 11 insertions(+), 2 deletions(-)
diff --git a/proxmox-acme/src/async_client.rs b/proxmox-acme/src/async_client.rs
index bba92023..f5b2b148 100644
--- a/proxmox-acme/src/async_client.rs
+++ b/proxmox-acme/src/async_client.rs
@@ -32,6 +32,7 @@ impl AcmeClient {
proxy_config: None, // fixme???
user_agent: Some(USER_AGENT_STRING.to_string()),
tcp_keepalive: Some(TCP_KEEPALIVE_TIME),
+ pool_max_idle_per_host: Some(0),
};
let http_client = Client::with_options(options);
diff --git a/proxmox-http/src/client/simple.rs b/proxmox-http/src/client/simple.rs
index 0ea77768..3cc4e5a0 100644
--- a/proxmox-http/src/client/simple.rs
+++ b/proxmox-http/src/client/simple.rs
@@ -51,8 +51,13 @@ impl Client {
https.set_proxy(proxy_config.clone());
}
- let client =
- HyperClient::builder(TokioExecutor::new()).build::<HttpsConnector, Body>(https);
+ let mut builder = HyperClient::builder(TokioExecutor::new());
+
+ if let Some(max_idle) = options.pool_max_idle_per_host {
+ builder.pool_max_idle_per_host(max_idle);
+ }
+
+ let client = builder.build::<HttpsConnector, Body>(https);
Self { client, options }
}
diff --git a/proxmox-http/src/http_options.rs b/proxmox-http/src/http_options.rs
index 1124aa26..1ae7ec5b 100644
--- a/proxmox-http/src/http_options.rs
+++ b/proxmox-http/src/http_options.rs
@@ -9,6 +9,9 @@ pub struct HttpOptions {
pub user_agent: Option<String>,
/// TCP keepalive time, defaults to 7200
pub tcp_keepalive: Option<u32>,
+ /// Maximum number of idle connections retained per host.
+ /// `None` uses the HTTP client default, `Some(0)` disables pooling.
+ pub pool_max_idle_per_host: Option<usize>,
}
impl HttpOptions {
--
2.47.3
^ permalink raw reply related [flat|nested] 3+ messages in thread
* [PATCH proxmox-backup 1/1] http: adapt to new pool_max_idle_per_host option
2026-09-07 16:04 [PATCH proxmox{,-backup} 0/2] fix #7948: acme: disable connection pooling for certificate renewal Samuel Rufinatscha
2026-09-07 16:04 ` [PATCH proxmox 1/1] fix #7948: acme: disable HTTP connection pooling Samuel Rufinatscha
@ 2026-09-07 16:04 ` Samuel Rufinatscha
1 sibling, 0 replies; 3+ messages in thread
From: Samuel Rufinatscha @ 2026-09-07 16:04 UTC (permalink / raw)
To: pbs-devel
Keep the default pooling behavior for the existing PBS HTTP clients.
Signed-off-by: Samuel Rufinatscha <s.rufinatscha@proxmox.com>
---
src/api2/node/subscription.rs | 1 +
src/tools/mod.rs | 1 +
2 files changed, 2 insertions(+)
diff --git a/src/api2/node/subscription.rs b/src/api2/node/subscription.rs
index fd796c456..e51802b6b 100644
--- a/src/api2/node/subscription.rs
+++ b/src/api2/node/subscription.rs
@@ -55,6 +55,7 @@ fn check_and_write_subscription(key: String, server_id: String) -> Result<(), Er
proxy_config,
user_agent: Some(DEFAULT_USER_AGENT_STRING.to_string()),
tcp_keepalive: Some(PROXMOX_BACKUP_TCP_KEEPALIVE_TIME),
+ pool_max_idle_per_host: None,
});
let info = proxmox_subscription::check::check_subscription(
diff --git a/src/tools/mod.rs b/src/tools/mod.rs
index ab624d7a6..198d45f10 100644
--- a/src/tools/mod.rs
+++ b/src/tools/mod.rs
@@ -31,6 +31,7 @@ pub fn pbs_simple_http(proxy_config: Option<ProxyConfig>) -> Client {
proxy_config,
user_agent: Some(DEFAULT_USER_AGENT_STRING.to_string()),
tcp_keepalive: Some(PROXMOX_BACKUP_TCP_KEEPALIVE_TIME),
+ pool_max_idle_per_host: None,
};
Client::with_options(options)
--
2.47.3
^ permalink raw reply related [flat|nested] 3+ messages in thread
end of thread, other threads:[~2026-09-07 16:04 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-09-07 16:04 [PATCH proxmox{,-backup} 0/2] fix #7948: acme: disable connection pooling for certificate renewal Samuel Rufinatscha
2026-09-07 16:04 ` [PATCH proxmox 1/1] fix #7948: acme: disable HTTP connection pooling Samuel Rufinatscha
2026-09-07 16:04 ` [PATCH proxmox-backup 1/1] http: adapt to new pool_max_idle_per_host option Samuel Rufinatscha
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.