From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from gate001.proxmox.com (gate001.proxmox.com [45.144.208.40]) by lore.proxmox.com (Postfix) with ESMTPS id D8B4F1FF0DE for ; Thu, 19 Nov 2026 11:45:26 +0100 (CET) Received: from gate001.proxmox.com (localhost.localdomain [127.0.0.1]) by gate001.proxmox.com (Proxmox) with ESMTP id 3FD3E21765; Thu, 19 Nov 2026 11:45:25 +0100 (CET) Mime-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=UTF-8 Date: Thu, 19 Nov 2026 11:45:20 +0100 Message-Id: Subject: Re: [PATCH many v2 00/63] notify: maintenance, PDM preparations, queue + worker From: "Lukas Wagner" To: "Thomas Lamprecht" , , "Lukas Wagner" X-Mailer: aerc 0.22.0-0-gc2f86b7abde3 References: <20261118094348.273646-1-l.wagner@proxmox.com> <179503802208.3534257.8475790039140179721.b4-ty@b4> In-Reply-To: <179503802208.3534257.8475790039140179721.b4-ty@b4> X-Bm-Milter-Handled: 55990f41-d878-4baa-be0a-ee34c49e34d2 X-Bm-Transport-Timestamp: 1795085120185 X-SPAM-LEVEL: Spam detection results: 0 AWL 0.187 Adjusted score from AWL reputation of From: address DMARC_MISSING 0.1 Missing DMARC policy KAM_DMARC_STATUS 0.01 Test Rule for DKIM or SPF Failure with Strict Alignment (newer systems) RCVD_IN_DNSWL_MED -2.3 Sender listed at https://www.dnswl.org/, medium trust SPF_HELO_NONE 0.001 SPF: HELO does not publish an SPF Record SPF_PASS -0.001 SPF: sender matches SPF record Message-ID-Hash: 74FLGZQXAFJ2CUIYF4F3UVTIURIIQDHZ X-Message-ID-Hash: 74FLGZQXAFJ2CUIYF4F3UVTIURIIQDHZ X-MailFrom: l.wagner@proxmox.com X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; loop; banned-address; emergency; member-moderation; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header X-Mailman-Version: 3.3.10 Precedence: list List-Id: Proxmox VE development discussion List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: On Wed Nov 18, 2026 at 10:44 PM CET, Thomas Lamprecht wrote: > Folded in, besides typos and docs: > - worker: notifications failing validation, symlinks and other entries > that cannot be opened are marked broken instead of being requeued > forever; other read errors after a claim requeue instead of using up > an attempt. > - moved patch 29 "notify: forwarded mails: don't hardcode severity and > metadata fields" before patch 28 "notify: fold mail-forwarder feature > into send-impl", so the default feature build works at each commit. > - mail-forward: worker unit ordered after pve-cluster, > build-dependencies, and the worker package now ships the queue dir > tmpfiles entry. dpkg configures it before pve-manager, so the worker > started without its queue; patch 53 "debian: create notification queue > directory via tmpfiles" got dropped. The worker is uploaded to the PVE > repo only. > - PBS: patch 47 "api: notification: send test notification via > proxmox_notify::send" squashed into patch 46 "notifications: adapt to > proxmox-notify API changes", so the latter builds on its own; the > multi-line inline tables in Cargo.toml are single-line again, as they > need TOML 1.1. > > Separate commits: > - notify: no config read while pmxcfs is not mounted; queue files are > 0640 and owned by the submitter, and the queue dir is expected to be > 3770, so submitters cannot change or remove each other's notifications > (the worker checks the setup at startup); warning if the queue stays > locked for five minutes; IDs queued twice are left alone; receipts > record 'mailto' for direct email recipients instead of a > 'legacy-sendmail' target name. > - PBS: the queue dir is fixed up through an O_NOFOLLOW handle instead of > refusing to start; old spool files are only renamed, not read as root. > - pve-cluster: libpve-notify-perl depends on pve-notify-worker. Checked your changes with `git range-diff`, looks good as far as I can tell. > > Left oper open points, input welcome: > - retrying deliveries that reached no target. I had a variant reusing the > attempt counter, but it seems to fit better with per-target state > in the notification history, as then one can ensure nothing gets > submitted multiple times for each specific target. Yup, considered this as well when implementing, but given that there is a queued item per notification and not per target, we need the history to implement a proper per-target retry logic. > - the PVE queue path is defined in pve-rs, mail-forward and the worker; > moving PVEContext and the path into a PVE crate would give one source. Yes, at some point {PVE,PBS}Context should be moved out from `proxmox-notify`. For PBS it would already be possible, but I refrained from doing so for now. Given that a Rust-API server is at least something we are thinking about, this was one of the reasons why pve-notify-worker initially lived in the pve-manager repo; then the PVEContext trait could simply live there as well. > - the PBS queue sits below the backup-owned state dir, so the backup > user can still replace it. Yes, would probably make sense to change the ownership. > - patch 56 "services: request pve-notify-worker.service via Wants" has > no rationale; what does the extra Wants=3D guard against? Probably a left-over from then the notify worker still created the queue on startup, instead of the queue being created via tmpfiles.=20 As otherwise a queuing a notification right after daemon startup could fail. We can probably drop the Wants=3D now. > - mail-forward treats stdin I/O errors like an oversized mail and > bounces it. Might send a followup for this; but I don't think this would ever be an issue in practice. > - a pve-docs counterpart for the PBS docs change would be nice Sent a patch for pve-docs: https://lore.proxmox.com/all/20261119100743.238781-1-l.wagner@proxmox.com/T= /#u Took your patch for PBS and extended it; will add the extended section to PBS when I have the time.