From: "Fabian Grünbichler" <f.gruenbichler@proxmox.com>
To: pbs-devel@lists.proxmox.com
Subject: [pbs-devel] [RFC proxmox 00/23] upgrade to hyper/http 1.0
Date: Wed, 26 Mar 2025 16:23:04 +0100 [thread overview]
Message-ID: <20250326152327.332179-1-f.gruenbichler@proxmox.com> (raw)
this RFC series adapts proxmox and proxmox-backup to hyper/http 1.0. I
also have similar patches for PDM, but those require an update of gloo
and proxmox-yew-comp and the basic approach is the same as with the
patches here, and since I expect some feedback to incorporate anyway I
saved those for the first "proper" version.
hyper 1.0 came with a lot of changes, the most notable ones:
Body is now a trait, not a struct
- there's a new Incoming impl for incoming requests on the server side,
and incoming responses on the client side
- http-body-util has some more impls
- proxmox-http has a new impl covering our two common use cases, see
the patch there for details
hyper now doesn't expose tower's Service or tokio's
AsyncRead/AsyncWrite, but has its own variants for both with
corresponding wrappers/adapters.
the previous Accept trait for translation from a listening socket to
connections is gone, an accept loop should be used instead.
the pooling client is moved from hyper to hyper-util. despite its
"legacy" label we still use it, as we'd need to either implement a ton
of code ourself or switch to reqwest otherwise.
graceful shutdown of connections is handled differently, so are
connection ugprades.
I did some rough testing of the usual things without noticing any
breakage, but I am sure I missed some parts. there's also room for
improvement for sure, in particular surrounding the rest-server and
connection accepting part - suggestions welcome!
proxmox workspace:
Fabian Grünbichler (17):
http: order feature values
http: rate-limited-stream: update to hyper/http 1.0
http: adapt MaybeTlsStream to hyper 1.x
http: adapt connector to hyper 1.x
http: add Body implementation
http: adapt simple client to hyper 1.x
http: websocket: update to http/hyper 1
openid: use http 0.2 to avoid openidconnect update
proxmox-login: switch to http 1.x
client: switch to hyper/http 1.0
metrics: update to hyper/http 1.0
acme: switch to http/hyper 1.0
proxmox-router: update to hyper 1.0
proxmox-rest-server: update to hyper 1.0
proxmox-rest-server: fix and extend example
proxmox-auth-api: update to hyper 1.0
proxmox-acme-api: update to hyper 1.0
Cargo.toml | 8 +-
proxmox-acme-api/Cargo.toml | 4 +
proxmox-acme-api/src/acme_plugin.rs | 63 +++++--
proxmox-acme/Cargo.toml | 3 +-
proxmox-acme/src/async_client.rs | 11 +-
proxmox-auth-api/Cargo.toml | 2 +
proxmox-auth-api/src/api/access.rs | 4 +-
proxmox-client/Cargo.toml | 1 +
proxmox-client/src/client.rs | 22 +--
proxmox-http/Cargo.toml | 45 +++--
proxmox-http/src/body.rs | 133 ++++++++++++++
proxmox-http/src/client/connector.rs | 44 +++--
proxmox-http/src/client/simple.rs | 93 +++++++---
proxmox-http/src/client/tls.rs | 2 +-
proxmox-http/src/lib.rs | 5 +
proxmox-http/src/rate_limited_stream.rs | 2 +-
proxmox-http/src/websocket/mod.rs | 6 +-
proxmox-login/Cargo.toml | 2 +-
proxmox-metrics/src/influxdb/http.rs | 5 +-
proxmox-openid/Cargo.toml | 3 +-
proxmox-rest-server/Cargo.toml | 9 +-
.../examples/minimal-rest-server.rs | 48 ++++-
proxmox-rest-server/src/api_config.rs | 44 ++---
proxmox-rest-server/src/connection.rs | 14 +-
proxmox-rest-server/src/formatter.rs | 8 +-
proxmox-rest-server/src/h2service.rs | 15 +-
proxmox-rest-server/src/lib.rs | 2 +-
proxmox-rest-server/src/rest.rs | 164 +++++++++++-------
proxmox-router/Cargo.toml | 6 +-
proxmox-router/src/router.rs | 19 +-
proxmox-router/src/stream/parsing.rs | 16 +-
31 files changed, 567 insertions(+), 236 deletions(-)
create mode 100644 proxmox-http/src/body.rs
proxmox-backup:
Fabian Grünbichler (6):
Revert "h2: switch to legacy feature"
pbs-client: adapt http client to hyper/http 1.0
pbs-client: vsock: adapt to hyper/http 1.0
restore daemon: adapt to hyper/http 1.0
adapt to hyper/http 1.0
adapt examples to hyper/http 1.0
Cargo.toml | 10 ++-
examples/h2client.rs | 6 +-
examples/h2s-client.rs | 6 +-
examples/h2s-server.rs | 28 +++-----
examples/h2server.rs | 28 +++-----
pbs-client/Cargo.toml | 4 +-
pbs-client/src/backup_writer.rs | 8 +--
pbs-client/src/http_client.rs | 38 +++++-----
pbs-client/src/pipe_to_stream.rs | 2 +-
pbs-client/src/vsock_client.rs | 27 +++----
proxmox-backup-client/Cargo.toml | 1 +
proxmox-backup-client/src/snapshot.rs | 2 +-
proxmox-restore-daemon/Cargo.toml | 2 +
proxmox-restore-daemon/src/main.rs | 24 +++++--
.../src/proxmox_restore_daemon/api.rs | 6 +-
.../src/proxmox_restore_daemon/auth.rs | 5 +-
src/acme/client.rs | 6 +-
src/acme/plugin.rs | 62 +++++++++++-----
src/api2/admin/datastore.rs | 20 +++---
src/api2/backup/environment.rs | 3 +-
src/api2/backup/mod.rs | 10 +--
src/api2/backup/upload_chunk.rs | 47 +++++++------
src/api2/helpers.rs | 3 +-
src/api2/node/mod.rs | 7 +-
src/api2/node/tasks.rs | 7 +-
src/api2/reader/mod.rs | 17 +++--
src/bin/proxmox-backup-api.rs | 40 +++++++----
src/bin/proxmox-backup-proxy.rs | 70 +++++++++++++++----
28 files changed, 297 insertions(+), 192 deletions(-)
--
2.39.5
_______________________________________________
pbs-devel mailing list
pbs-devel@lists.proxmox.com
https://lists.proxmox.com/cgi-bin/mailman/listinfo/pbs-devel
next reply other threads:[~2025-03-26 15:23 UTC|newest]
Thread overview: 32+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-03-26 15:23 Fabian Grünbichler [this message]
2025-03-26 15:23 ` [pbs-devel] [PATCH proxmox 01/17] http: order feature values Fabian Grünbichler
2025-03-26 15:23 ` [pbs-devel] [PATCH proxmox 02/17] http: rate-limited-stream: update to hyper/http 1.0 Fabian Grünbichler
2025-03-26 15:23 ` [pbs-devel] [PATCH proxmox 03/17] http: adapt MaybeTlsStream to hyper 1.x Fabian Grünbichler
2025-03-26 15:23 ` [pbs-devel] [PATCH proxmox 04/17] http: adapt connector " Fabian Grünbichler
2025-04-02 13:31 ` Max Carrara
2025-03-26 15:23 ` [pbs-devel] [PATCH proxmox 05/17] http: add Body implementation Fabian Grünbichler
2025-04-02 13:31 ` Max Carrara
2025-03-26 15:23 ` [pbs-devel] [PATCH proxmox 06/17] http: adapt simple client to hyper 1.x Fabian Grünbichler
2025-03-26 15:23 ` [pbs-devel] [PATCH proxmox 07/17] http: websocket: update to http/hyper 1 Fabian Grünbichler
2025-03-26 15:23 ` [pbs-devel] [PATCH proxmox 08/17] openid: use http 0.2 to avoid openidconnect update Fabian Grünbichler
2025-03-26 15:23 ` [pbs-devel] [PATCH proxmox 09/17] proxmox-login: switch to http 1.x Fabian Grünbichler
2025-03-26 15:23 ` [pbs-devel] [PATCH proxmox 10/17] client: switch to hyper/http 1.0 Fabian Grünbichler
2025-03-26 15:23 ` [pbs-devel] [PATCH proxmox 11/17] metrics: update " Fabian Grünbichler
2025-03-26 15:23 ` [pbs-devel] [PATCH proxmox 12/17] acme: switch to http/hyper 1.0 Fabian Grünbichler
2025-04-02 13:31 ` Max Carrara
2025-03-26 15:23 ` [pbs-devel] [PATCH proxmox 13/17] proxmox-router: update to hyper 1.0 Fabian Grünbichler
2025-03-26 15:23 ` [pbs-devel] [PATCH proxmox 14/17] proxmox-rest-server: " Fabian Grünbichler
2025-04-02 13:34 ` Max Carrara
2025-03-26 15:23 ` [pbs-devel] [PATCH proxmox 15/17] proxmox-rest-server: fix and extend example Fabian Grünbichler
2025-03-26 15:23 ` [pbs-devel] [PATCH proxmox 16/17] proxmox-auth-api: update to hyper 1.0 Fabian Grünbichler
2025-03-26 15:23 ` [pbs-devel] [PATCH proxmox 17/17] proxmox-acme-api: " Fabian Grünbichler
2025-03-26 15:23 ` [pbs-devel] [PATCH proxmox-backup 1/6] Revert "h2: switch to legacy feature" Fabian Grünbichler
2025-03-26 15:23 ` [pbs-devel] [PATCH proxmox-backup 2/6] pbs-client: adapt http client to hyper/http 1.0 Fabian Grünbichler
2025-03-26 15:23 ` [pbs-devel] [PATCH proxmox-backup 3/6] pbs-client: vsock: adapt " Fabian Grünbichler
2025-03-26 15:23 ` [pbs-devel] [PATCH proxmox-backup 4/6] restore daemon: " Fabian Grünbichler
2025-03-26 15:23 ` [pbs-devel] [PATCH proxmox-backup 5/6] " Fabian Grünbichler
2025-04-02 13:36 ` Max Carrara
2025-03-26 15:23 ` [pbs-devel] [PATCH proxmox-backup 6/6] adapt examples " Fabian Grünbichler
2025-04-02 13:53 ` [pbs-devel] [RFC proxmox 00/23] upgrade " Max Carrara
2025-04-03 13:32 ` Max Carrara
2025-04-02 14:39 ` Thomas Lamprecht
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20250326152327.332179-1-f.gruenbichler@proxmox.com \
--to=f.gruenbichler@proxmox.com \
--cc=pbs-devel@lists.proxmox.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
Service provided by Proxmox Server Solutions GmbH | Privacy | Legal