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 2A7041FF0B2 for ; Sun, 22 Nov 2026 02:27:44 +0100 (CET) Received: from gate001.proxmox.com (localhost.localdomain [127.0.0.1]) by gate001.proxmox.com (Proxmox) with ESMTP id CD5B321702; Sun, 22 Nov 2026 02:26:43 +0100 (CET) From: Thomas Lamprecht To: pve-devel@lists.proxmox.com Subject: [PATCH v3 manager 18/18] pvestatd: notify on NVMe over Fabrics namespaces as on multipath maps Date: Sun, 22 Nov 2026 02:25:55 +0100 Message-ID: <20261122012605.1848824-19-t.lamprecht@proxmox.com> X-Mailer: git-send-email 2.47.3 In-Reply-To: <20261122012605.1848824-1-t.lamprecht@proxmox.com> References: <20261122012605.1848824-1-t.lamprecht@proxmox.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Bm-Milter-Handled: 55990f41-d878-4baa-be0a-ee34c49e34d2 X-Bm-Transport-Timestamp: 1795310772521 X-SPAM-LEVEL: Spam detection results: 0 AWL 0.146 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: UI37NAFLBF4KCOWR57ZB6ZI2LBUX7FG4 X-Message-ID-Hash: UI37NAFLBF4KCOWR57ZB6ZI2LBUX7FG4 X-MailFrom: t.lamprecht@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: The report of a node lists the namespaces of its NVMe over Fabrics storages next to the multipath maps, so the notifications about lost and restored paths cover them too. Name the storages of a namespace in them as for a map, also the one that has it as base volume. A report whose namespaces could not be listed counts as incomplete, so that they are not taken as gone. A node that cannot query multipathd sends no notifications, also not for its namespaces, which its report still lists. Signed-off-by: Thomas Lamprecht --- PVE/MultipathNotification.pm | 5 +++-- PVE/Service/pvestatd.pm | 2 +- test/MultipathNotification_test.pl | 3 +++ 3 files changed, 7 insertions(+), 3 deletions(-) diff --git a/PVE/MultipathNotification.pm b/PVE/MultipathNotification.pm index 99c79405b..d25851d0c 100644 --- a/PVE/MultipathNotification.pm +++ b/PVE/MultipathNotification.pm @@ -97,8 +97,9 @@ sub flush($self, $notify) { sub update($self, $report, $notify) { my $usable = ref($report) eq 'HASH' && !$report->{error} && !$report->{'scope-unknown'}; my $luns = $usable ? $report->{luns} : undef; - # without the hints of LVM, maps known only by their volume group can be left out - my $complete = $usable && !$report->{'vgs-unknown'}; + # without the hints of LVM, maps known only by their volume group can be left out, and a failed + # query leaves out the NVMe namespaces + my $complete = $usable && !$report->{'vgs-unknown'} && !$report->{'namespaces-unknown'}; my $previous = $self->{previous}; my $current = $self->{previous} = {}; if (!defined($luns)) { diff --git a/PVE/Service/pvestatd.pm b/PVE/Service/pvestatd.pm index 68d7f2e08..5cdce325a 100755 --- a/PVE/Service/pvestatd.pm +++ b/PVE/Service/pvestatd.pm @@ -814,7 +814,7 @@ my sub notify_multipath { my $scfg = PVE::Storage::storage_check_node($storage, $sid, $nodename, 1) // next; push $by_vg{ $scfg->{vgname} }->@*, $sid if defined($scfg->{vgname}); my $base = PVE::Multipath::parse_base_volume($scfg->{base}); - push $by_wwid{ $base->{wwid} }->@*, $sid if $base && $base->{kind} ne 'nvme'; + push $by_wwid{ $base->{wwid} }->@*, $sid if $base; } my $data = PVE::Notify::common_template_data(); diff --git a/test/MultipathNotification_test.pl b/test/MultipathNotification_test.pl index f78a31e6e..d61ce6ea1 100755 --- a/test/MultipathNotification_test.pl +++ b/test/MultipathNotification_test.pl @@ -93,6 +93,9 @@ pass_with( $tracker = PVE::MultipathNotification->new($file); pass_with({}, [], 'notified LUNs left the report across a restart'); pass_with({}, [], 'but an incomplete report does not count', 0); +report_with( + { luns => [], 'namespaces-unknown' => 1 }, [], 'nor one without the NVMe namespaces', +); pass_with( {}, [['info', 'c:gone', 'd:gone']],