public inbox for pdm-devel@lists.proxmox.com
 help / color / mirror / Atom feed
From: Wolfgang Bumiller <w.bumiller@proxmox.com>
To: pdm-devel@lists.proxmox.com
Subject: [pdm-devel] [PATCH pdm 0/7] multi-remote client and node reachability cache
Date: Tue,  4 Feb 2025 10:55:47 +0100	[thread overview]
Message-ID: <20250204095554.39501-1-w.bumiller@proxmox.com> (raw)

This consists of two parts (and a question (at the end)):

1) Patches 1 through 3:
The `MultiClient` which implements cycling through multiple remotes
when requests fail due to network issues.

2) Patches 4 through 6:
A task caching the remote reachability state as well as mapping
hostnames to the pve-side node-names. Currently this simply runs every
60 seconds and goes through the current remotes+nodes and checks for
reachability.
If at that time the remote.cfg changed and the polling
task is still ongoing it will be aborted and started over with the new
config.
Finally, the reachability information will be used and updated by the
`MultiClient` implementation.

3) Patch 7 is mainly for debugging. I'm not sure whether we want to include
tracing instrumentation in general, or via a `#[cfg_attr]` or only for
debug builds...
It would probably also be nice to implicitly `#[instrument]` all the api
methods so we can follow along a trace from a specific api method.
(Currently I did this only temporarily without committing anything by
attaching, for example, a `#[instrument(name =
"api_method_list_nodes")]` attribute to the `list_nodes` api call to
more easily see the client usage via `journalctl -f
SPAN_NAME=api_method_list_nodes` on the shell...

Wolfgang Bumiller (7):
  server: generic multi-client wrapper
  server: store pve MultiClient for re-use
  server: separate ConnectInfo from client creation
  server: cache pve node reachability and names
  server: don't try to connect to known-unreachable servers
  server: try previously unreachable clients as last resort
  server: add some tracing instrumentation

 lib/pdm-config/src/config_version_cache.rs    |  33 +-
 server/src/api/pve/mod.rs                     |  20 +-
 .../main.rs}                                  |   3 +
 .../bin/proxmox-datacenter-api/tasks/mod.rs   |   1 +
 .../tasks/remote_node_mapping.rs              | 228 +++++++
 server/src/connection.rs                      | 635 ++++++++++++++++--
 server/src/lib.rs                             |   1 +
 server/src/remote_cache/mod.rs                | 291 ++++++++
 8 files changed, 1140 insertions(+), 72 deletions(-)
 rename server/src/bin/{proxmox-datacenter-api.rs => proxmox-datacenter-api/main.rs} (99%)
 create mode 100644 server/src/bin/proxmox-datacenter-api/tasks/mod.rs
 create mode 100644 server/src/bin/proxmox-datacenter-api/tasks/remote_node_mapping.rs
 create mode 100644 server/src/remote_cache/mod.rs

-- 
2.39.5



_______________________________________________
pdm-devel mailing list
pdm-devel@lists.proxmox.com
https://lists.proxmox.com/cgi-bin/mailman/listinfo/pdm-devel


             reply	other threads:[~2025-02-04  9:56 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-02-04  9:55 Wolfgang Bumiller [this message]
2025-02-04  9:55 ` [pdm-devel] [PATCH datacenter-manager 1/7] server: generic multi-client wrapper Wolfgang Bumiller
2025-02-11 14:50   ` Lukas Wagner
2025-02-12  9:07     ` Wolfgang Bumiller
2025-02-04  9:55 ` [pdm-devel] [PATCH datacenter-manager 2/7] server: store pve MultiClient for re-use Wolfgang Bumiller
2025-02-04  9:55 ` [pdm-devel] [PATCH datacenter-manager 3/7] server: separate ConnectInfo from client creation Wolfgang Bumiller
2025-02-04  9:55 ` [pdm-devel] [PATCH datacenter-manager 4/7] server: cache pve node reachability and names Wolfgang Bumiller
2025-02-04  9:55 ` [pdm-devel] [PATCH datacenter-manager 5/7] server: don't try to connect to known-unreachable servers Wolfgang Bumiller
2025-02-04  9:55 ` [pdm-devel] [PATCH datacenter-manager 6/7] server: try previously unreachable clients as last resort Wolfgang Bumiller
2025-02-04  9:55 ` [pdm-devel] [PATCH datacenter-manager 7/7] server: add some tracing instrumentation Wolfgang Bumiller
2025-02-11 14:50 ` [pdm-devel] [PATCH pdm 0/7] multi-remote client and node reachability cache Lukas Wagner
2025-03-05 15:01 Wolfgang Bumiller

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=20250204095554.39501-1-w.bumiller@proxmox.com \
    --to=w.bumiller@proxmox.com \
    --cc=pdm-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