From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from gate001.proxmox.com (gate001.proxmox.com [IPv6:2a0f:8001:1:32::40]) by lore.proxmox.com (Postfix) with ESMTPS id 404E61FF0ED for ; Fri, 31 Jul 2026 12:23:29 +0200 (CEST) Received: from gate001.proxmox.com (localhost.localdomain [127.0.0.1]) by gate001.proxmox.com (Proxmox) with ESMTP id 94D3821698; Fri, 31 Jul 2026 12:22:06 +0200 (CEST) From: Dietmar Maurer To: pve-devel@lists.proxmox.com Subject: [RFC pve-storage 13/27] iscsi plugin: list sessions of all transports and capture transport Date: Fri, 31 Jul 2026 12:21:42 +0200 Message-ID: <20260731102156.3947857-14-dietmar@proxmox.com> X-Mailer: git-send-email 2.47.3 In-Reply-To: <20260731102156.3947857-1-dietmar@proxmox.com> References: <20260731102156.3947857-1-dietmar@proxmox.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-SPAM-LEVEL: Spam detection results: 2 AWL -0.272 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) KAM_LAZY_DOMAIN_SECURITY 1 Sending domain does not have any anti-forgery methods RDNS_NONE 1.274 Delivered to internal network by a host with no rDNS SPF_HELO_NONE 0.001 SPF: HELO does not publish an SPF Record SPF_NONE 0.001 SPF: sender does not publish an SPF Record Message-ID-Hash: EKR6BMHQSRYSKHIR6N5H3GSNAKNO7LLB X-Message-ID-Hash: EKR6BMHQSRYSKHIR6N5H3GSNAKNO7LLB X-MailFrom: dietmar@zilli.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 session list only matched software iSCSI (tcp) lines, so sessions established over iser or offload initiators were invisible to the session-based activation and status checks. Report every session together with its transport; the node-level session API also needs the transport to display it. Signed-off-by: Dietmar Maurer --- src/PVE/Storage/ISCSIPlugin.pm | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/src/PVE/Storage/ISCSIPlugin.pm b/src/PVE/Storage/ISCSIPlugin.pm index c18a4b6..4fbc5ad 100644 --- a/src/PVE/Storage/ISCSIPlugin.pm +++ b/src/PVE/Storage/ISCSIPlugin.pm @@ -48,10 +48,15 @@ sub iscsi_session_list { outfunc => sub { my $line = shift; # example: tcp: [1] 192.168.122.252:3260,1 iqn.2003-01.org.linux-iscsi.proxmox-nfs.x8664:sn.00567885ba8f (non-flash) - if ($line =~ m/^tcp:\s+\[(\S+)\]\s+(\S+:\d+)\,\S+\s+(\S+)\s+\S+?\s*$/) { - my ($session_id, $portal, $target) = ($1, $2, $3); + if ($line =~ m/^(\S+):\s+\[(\S+)\]\s+(\S+:\d+)\,\S+\s+(\S+)\s+\S+?\s*$/) { + my ($transport, $session_id, $portal, $target) = ($1, $2, $3, $4); # there can be several sessions per target (multipath) - push @{ $res->{$target} }, { session_id => $session_id, portal => $portal }; + push @{ $res->{$target} }, + { + session_id => $session_id, + portal => $portal, + transport => $transport, + }; } }, ); -- 2.47.3