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 3F46C1FF09B for ; Mon, 12 Oct 2026 10:46:46 +0200 (CEST) Received: from gate001.proxmox.com (localhost.localdomain [127.0.0.1]) by gate001.proxmox.com (Proxmox) with ESMTP id BE7A7212F7; Mon, 12 Oct 2026 10:46:45 +0200 (CEST) Mime-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=UTF-8 Date: Mon, 12 Oct 2026 10:46:40 +0200 Message-Id: Subject: Re: [PATCH manager v3 38/39] api: notification: reject matchers with expression if not supported by all nodes From: "Lukas Wagner" To: "Lukas Wagner" , , X-Mailer: aerc 0.21.0-0-g5549850facc2-dirty References: <20261009125646.284673-1-l.wagner@proxmox.com> <20261009125646.284673-39-l.wagner@proxmox.com> In-Reply-To: <20261009125646.284673-39-l.wagner@proxmox.com> X-Bm-Milter-Handled: 55990f41-d878-4baa-be0a-ee34c49e34d2 X-Bm-Transport-Timestamp: 1791794800725 X-SPAM-LEVEL: Spam detection results: 0 AWL 0.314 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: HG5MEZFGJMG6QGTTYFQFLSSKDJYAOYJ6 X-Message-ID-Hash: HG5MEZFGJMG6QGTTYFQFLSSKDJYAOYJ6 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 Backup Server development discussion List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: On Fri Oct 9, 2026 at 2:56 PM CEST, Lukas Wagner wrote: > The new matcher UI will automatically migrate any existing matcher to > one with an 'expression', and new matchers will also only use this new > parameter. If any of the cluster nodes uses a version of pve-manager > that does not yet support the new parameter, any matcher written by an > updated node will break notifications on the older nodes. > > To avoid this, on create/update, we now reject matchers with an > 'expression' parameter if any of the online cluster nodes is still > running on a too old version of pve-manager. While this still leaves the > possibility of an outdated, offline node coming back online and then > failing to parse the migrated notification config, it would be > unreasonable to disallow editing the notification configuration if any > node is offline. [snip] > +my $matcher_expressions_version =3D "9.2.21"; > +my $matcher_expressions_version_array =3D [9, 2, 21]; > + > +my sub matcher_expressions_supported { > + my $version_info =3D PVE::Cluster::get_node_kv('version-info'); > + for my $node (sort keys $version_info->%*) { > + my $node_info =3D eval { JSON::decode_json($version_info->{$node= }); }; > + if (my $err =3D $@) { # warn, but continue > + syslog('warn', "cannot parse version info for $node as JSON = - $err"); > + } elsif (!PVE::Cluster::pvecfg_min_version($node_info->{version}= , @$matcher_expressions_version_array)) { > + return 0; > + } Forgot to run `make tidy` here -- will include it in v4 if there will be one, but otherwise this can just be fixed up when applying this.