all lists on lists.proxmox.com
 help / color / mirror / Atom feed
From: Wolfgang Bumiller <w.bumiller@proxmox.com>
To: Hannes Laimer <h.laimer@proxmox.com>
Cc: pve-devel@lists.proxmox.com
Subject: Re: [RFC cluster/manager 00/10] pmxcfs: add a change notification socket
Date: Thu, 1 Oct 2026 09:31:18 +0200	[thread overview]
Message-ID: <tqvuoi4txbetnvzmgfu6kiwzuloe3d4i2kw4uhw3wxg6th5znt@uq4ookhhuxax> (raw)
In-Reply-To: <20260918144152.575163-1-h.laimer@proxmox.com>

On Fri, Sep 18, 2026 at 04:41:42PM +0200, Hannes Laimer wrote:
> Every daemon that cares about /etc/pve learns about changes by calling
> cfs_update on each loop iteration and comparing the version vector it
> gets over the libqb IPC. inotify cannot replace that, since remote
> changes arrive through corosync and never touch the local VFS, so
> pvestatd, pve-firewall, the HA daemons and pvescheduler all wake up on
> timers and re-read what usually has not changed.
> 
> This series adds a push path. pmxcfs gets a Unix stream socket at
> /run/pve-cluster/pmxcfs.sock, served by a Rust thread linked into the C
> daemon as a static library with a small C ABI. A client subscribes with
> named path templates such as nodes/{node}/qemu-server/{vmid}.conf and
> receives one JSON line per matching mutation, carrying the memdb version
> as sequence number, the event type, the path and the values the
> placeholders captured. Connections authorized by group membership never
> see private paths, as on the IPC and FUSE side.
> 
> The daemon keeps the last mutations in a fixed size ring and each
> connection a cursor into it, so the mutating thread only appends and
> never waits for a client. A slow client is caught up from the ring, one
> that fell off it gets a single resync event, and a reconnecting client
> resumes at the last sequence number it saw, also across a restart of
> pmxcfs when nothing changed meanwhile. A node that takes the whole
> state from the cluster after a membership change hands its clients a
> resync event, since no sequence of mutations describes that. A panic in

So a high level question:

Do we actually have any use case where this particular way processing
changes on the *client* side would give us any *real* benefit?

Given the complexity and custom non-blocking handling if socket states,
I'd like to see a real need for this.

Why isn't a simple async-based server with no sequence numbers where a
time-out just disconnects the client, and the disconnect itself being
the equivalent of a resync event, sufficient?

The server would be just the accept loop which `spawn()`s a
client-handler with its socket and event channel, the send-side of the
channel pushed to the list of client channels. The client handling task
just loops through a channel.recv() followed by a socket.send() with a
timeout. On timeout it just returns, the channel gets closed, the next
event-emit sees the channel.send() fail and removes the channel.




  parent reply	other threads:[~2026-10-01  7:31 UTC|newest]

Thread overview: 25+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-09-18 14:41 [RFC cluster/manager 00/10] pmxcfs: add a change notification socket Hannes Laimer
2026-09-18 14:41 ` [PATCH pve-cluster 01/10] buildsys: add rust workspace under src/rust Hannes Laimer
2026-09-25 12:48   ` Wolfgang Bumiller
2026-09-18 14:41 ` [PATCH pve-cluster 02/10] rust: notify: add change notification socket server Hannes Laimer
2026-09-25 15:18   ` Wolfgang Bumiller
2026-09-29 15:50     ` Wolfgang Bumiller
2026-09-18 14:41 ` [PATCH pve-cluster 03/10] rust: ffi: add C ABI staticlib for pmxcfs Hannes Laimer
2026-09-21  9:57   ` Robert Obkircher
2026-09-29 15:07   ` Wolfgang Bumiller
2026-09-18 14:41 ` [PATCH pve-cluster 04/10] pmxcfs: memdb: add change notification hook Hannes Laimer
2026-09-18 14:41 ` [PATCH pve-cluster 05/10] buildsys: link pmxcfs against the rust notify staticlib Hannes Laimer
2026-09-18 14:41 ` [PATCH pve-cluster 06/10] pmxcfs: notify: emit change events over the notification socket Hannes Laimer
2026-09-18 14:41 ` [PATCH pve-cluster 07/10] cfs: add perl client for the change " Hannes Laimer
2026-10-01 12:11   ` Wolfgang Bumiller
2026-09-18 14:41 ` [PATCH pve-cluster 08/10] cfs: add hook registry for change notification consumers Hannes Laimer
2026-09-18 14:41 ` [PATCH pve-manager 09/10] hooks: add runner executing cluster change hooks in children Hannes Laimer
2026-09-18 14:41 ` [PATCH pve-manager 10/10] pvescheduler: run cluster change hooks from a listener child Hannes Laimer
2026-09-25 12:01 ` [RFC cluster/manager 00/10] pmxcfs: add a change notification socket Wolfgang Bumiller
2026-09-25 12:18   ` Hannes Laimer
2026-09-25 12:38     ` Wolfgang Bumiller
2026-09-25 12:23   ` Hannes Laimer
2026-09-25 12:43     ` Wolfgang Bumiller
2026-09-25 12:48       ` Hannes Laimer
2026-10-01  7:31 ` Wolfgang Bumiller [this message]
2026-10-01  7:43   ` Hannes Laimer

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=tqvuoi4txbetnvzmgfu6kiwzuloe3d4i2kw4uhw3wxg6th5znt@uq4ookhhuxax \
    --to=w.bumiller@proxmox.com \
    --cc=h.laimer@proxmox.com \
    --cc=pve-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 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.
Service provided by Proxmox Server Solutions GmbH | Privacy | Legal