* [PATCH manager/storage 0/3] san: show and check for missing open-iscsi on nodes
@ 2026-11-20 12:51 Dominik Csapak
2026-11-20 12:51 ` [PATCH pve-storage 1/3] multipath: status: only report initiator name if open-iscsi is installed Dominik Csapak
` (2 more replies)
0 siblings, 3 replies; 4+ messages in thread
From: Dominik Csapak @ 2026-11-20 12:51 UTC (permalink / raw)
To: pve-devel
When open-iscsi is not installed on a node, the iSCSI guided setup
still showed it as 'OK' and let one select it, since the node list only
shows the multipath state. The iSCSI storage then can't be activated
on that node.
This series makes the nodes only report their initiator name in the
multipath status if open-iscsi is installed (it could otherwise be a
leftover of a removed but not purged open-iscsi), and uses that in the
UI:
* the guided setup shows such nodes as 'open-iscsi not installed' and
won't continue if one of them is selected
* the SAN view shows it in the initiator name column (not as state,
since a node does not need open-iscsi if it only uses e.g. Fibre
Channel)
Without the pve-storage patch (e.g. on nodes that are not upgraded
yet), only nodes where open-iscsi was never installed or was purged
are detected, since the others still report a leftover name.
Alternatively we could of course hard-depend on open-iscsi, then
we can be sure that all properly updated nodes have it.
pve-storage:
Dominik Csapak (1):
multipath: status: only report initiator name if open-iscsi is
installed
src/PVE/API2/Multipath.pm | 2 +-
src/PVE/Multipath/Status.pm | 9 ++++++---
src/test/run_multipath_api_tests.pl | 16 ++++++++++++----
3 files changed, 19 insertions(+), 8 deletions(-)
pve-manager:
Dominik Csapak (2):
ui: san: iscsi guided setup: don't allow nodes without open-iscsi
ui: dc: san: show missing open-iscsi in the node grid
www/manager6/SANUtils.js | 14 ++++++++++
www/manager6/dc/SAN.js | 7 ++++-
www/manager6/storage/wizard/IScsi.js | 28 +++++++++++++++++++
www/manager6/storage/wizard/NodeIdentities.js | 16 +++++++++--
4 files changed, 61 insertions(+), 4 deletions(-)
Summary over all repositories:
7 files changed, 80 insertions(+), 12 deletions(-)
--
Generated by murpp 0.11.0
^ permalink raw reply [flat|nested] 4+ messages in thread
* [PATCH pve-storage 1/3] multipath: status: only report initiator name if open-iscsi is installed
2026-11-20 12:51 [PATCH manager/storage 0/3] san: show and check for missing open-iscsi on nodes Dominik Csapak
@ 2026-11-20 12:51 ` Dominik Csapak
2026-11-20 12:51 ` [PATCH pve-manager 2/3] ui: san: iscsi guided setup: don't allow nodes without open-iscsi Dominik Csapak
2026-11-20 12:51 ` [PATCH pve-manager 3/3] ui: dc: san: show missing open-iscsi in the node grid Dominik Csapak
2 siblings, 0 replies; 4+ messages in thread
From: Dominik Csapak @ 2026-11-20 12:51 UTC (permalink / raw)
To: pve-devel
when open-iscsi is removed but not purged, the file with the
initiator name stays, so the node still reported it. A leftover name
is of no use and should not end up in e.g. the access list of an
array, so only report it if iscsiadm is executable (like the iSCSI
status API call of a node checks).
With that, a node without an initiator name does not have a usable
open-iscsi (the package generates the name on installation, and
iscsid does not start without it), so the UI can use that to show
which nodes are missing it.
Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
---
src/PVE/API2/Multipath.pm | 2 +-
src/PVE/Multipath/Status.pm | 9 ++++++---
src/test/run_multipath_api_tests.pl | 16 ++++++++++++----
3 files changed, 19 insertions(+), 8 deletions(-)
diff --git a/src/PVE/API2/Multipath.pm b/src/PVE/API2/Multipath.pm
index 59ca0eb..24955b3 100644
--- a/src/PVE/API2/Multipath.pm
+++ b/src/PVE/API2/Multipath.pm
@@ -154,7 +154,7 @@ my $node_schema = {
'iscsi-initiator-name' => {
type => 'string',
optional => 1,
- description => 'The iSCSI initiator name of the node.',
+ description => 'The iSCSI initiator name of the node, if open-iscsi is installed.',
},
},
};
diff --git a/src/PVE/Multipath/Status.pm b/src/PVE/Multipath/Status.pm
index 1f13109..77da988 100644
--- a/src/PVE/Multipath/Status.pm
+++ b/src/PVE/Multipath/Status.pm
@@ -62,9 +62,12 @@ sub update_node_status() {
my $report = { luns => [] };
$report->{'apply-error'} = $apply->{error} if defined($apply->{error});
require PVE::Storage::ISCSIPlugin;
- my $initiator = eval { PVE::Storage::ISCSIPlugin::read_initiator_info() };
- $report->{'iscsi-initiator-name'} = $initiator->{name}
- if $initiator && defined($initiator->{name});
+ # the initiator name stays if open-iscsi is removed but not purged, so skip it then
+ if (PVE::Storage::ISCSIPlugin::iscsi_supported()) {
+ my $initiator = eval { PVE::Storage::ISCSIPlugin::read_initiator_info() };
+ $report->{'iscsi-initiator-name'} = $initiator->{name}
+ if $initiator && defined($initiator->{name});
+ }
eval {
die "multipath-tools is not installed\n" if !PVE::Multipath::is_supported();
die "multipathd is not running or does not respond\n" if !PVE::Multipath::is_running();
diff --git a/src/test/run_multipath_api_tests.pl b/src/test/run_multipath_api_tests.pl
index 07ab562..e0dfb04 100755
--- a/src/test/run_multipath_api_tests.pl
+++ b/src/test/run_multipath_api_tests.pl
@@ -454,7 +454,7 @@ subtest 'an unconfigured node does not write drop-ins or reload' => sub {
$mp->mock($function => sub { push @changes, $function });
}
my $iscsi = Test::MockModule->new('PVE::Storage::ISCSIPlugin');
- $iscsi->mock(read_initiator_info => sub { {} });
+ $iscsi->mock(read_initiator_info => sub { {} }, iscsi_supported => sub { 1 });
my $status = Test::MockModule->new('PVE::Multipath::Status');
my $report;
$status->mock(publish => sub { $report = $_[0] });
@@ -563,7 +563,7 @@ subtest 'only managed maps and those under a storage get a row' => sub {
my $lvm = Test::MockModule->new('PVE::Storage::LVMPlugin');
my $report;
$status->mock(publish => sub { $report = $_[0] });
- $iscsi->mock(read_initiator_info => sub { undef });
+ $iscsi->mock(read_initiator_info => sub { undef }, iscsi_supported => sub { 1 });
$mp->mock(is_supported => sub { 1 }, is_running => sub { 1 });
$mp->mock(
get_maps => sub {
@@ -636,7 +636,7 @@ subtest 'a LUN of a storage without a map is missing' => sub {
my $config = Test::MockModule->new('PVE::Multipath::Config');
my %raw;
$status->mock(publish => sub { $raw{n1} = encode_report({ $_[0]->%*, time => $NOW }) });
- $iscsi->mock(read_initiator_info => sub { undef });
+ $iscsi->mock(read_initiator_info => sub { undef }, iscsi_supported => sub { 1 });
$mp->mock(is_supported => sub { 1 }, is_running => sub { 1 }, get_maps => sub { [] });
$lvm->mock(cached_pv_volume_groups => sub { {} });
$gen->mock(
@@ -676,7 +676,10 @@ subtest 'one entry point applies configuration and reports unavailable reasons'
my ($report, @order);
$gen->mock(sync => sub { push @order, 'apply'; { error => 'reload failed' } });
$status->mock(publish => sub { push @order, 'publish'; $report = $_[0] });
- $iscsi->mock(read_initiator_info => sub { { name => 'iqn.2025-01.example:node' } });
+ $iscsi->mock(
+ read_initiator_info => sub { { name => 'iqn.2025-01.example:node' } },
+ iscsi_supported => sub { 1 },
+ );
$mp->mock(is_supported => sub { 0 });
PVE::Multipath::Status::update_node_status();
is($report->{error}, 'multipath-tools is not installed', 'missing tools reason only');
@@ -686,6 +689,11 @@ subtest 'one entry point applies configuration and reports unavailable reasons'
'the configuration is applied before the status is published',
);
is($report->{'apply-error'}, 'reload failed', 'apply failure is separate');
+ is($report->{'iscsi-initiator-name'}, 'iqn.2025-01.example:node', 'initiator name reported');
+ $iscsi->mock(iscsi_supported => sub { 0 });
+ PVE::Multipath::Status::update_node_status();
+ ok(!exists($report->{'iscsi-initiator-name'}), 'no leftover name without open-iscsi');
+ $iscsi->mock(iscsi_supported => sub { 1 });
$mp->mock(is_supported => sub { 1 });
$mp->mock(is_running => sub { 0 });
PVE::Multipath::Status::update_node_status();
--
2.47.3
^ permalink raw reply related [flat|nested] 4+ messages in thread
* [PATCH pve-manager 2/3] ui: san: iscsi guided setup: don't allow nodes without open-iscsi
2026-11-20 12:51 [PATCH manager/storage 0/3] san: show and check for missing open-iscsi on nodes Dominik Csapak
2026-11-20 12:51 ` [PATCH pve-storage 1/3] multipath: status: only report initiator name if open-iscsi is installed Dominik Csapak
@ 2026-11-20 12:51 ` Dominik Csapak
2026-11-20 12:51 ` [PATCH pve-manager 3/3] ui: dc: san: show missing open-iscsi in the node grid Dominik Csapak
2 siblings, 0 replies; 4+ messages in thread
From: Dominik Csapak @ 2026-11-20 12:51 UTC (permalink / raw)
To: pve-devel
without open-iscsi, the iSCSI storage can't be activated on a node,
but the node list only showed the multipath state, so such a node
showed up as 'OK' and could be selected without any warning.
Since nodes only report their initiator name if open-iscsi is
installed, show 'open-iscsi not installed' as state for nodes without
one, and show an error when trying to continue while the storages
would be on one of them, so the user can either install it or
restrict the nodes.
Do that check only after we know the nodes of the setup, since when
reusing an existing connection storage without selecting any nodes,
the setup uses the nodes of that storage, not all nodes.
Nodes that are not upgraded yet might still report a leftover name,
so they are not flagged in that case.
Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
---
www/manager6/SANUtils.js | 6 ++++
www/manager6/storage/wizard/IScsi.js | 28 +++++++++++++++++++
www/manager6/storage/wizard/NodeIdentities.js | 16 +++++++++--
3 files changed, 47 insertions(+), 3 deletions(-)
diff --git a/www/manager6/SANUtils.js b/www/manager6/SANUtils.js
index f4905e68..90ddd1eb 100644
--- a/www/manager6/SANUtils.js
+++ b/www/manager6/SANUtils.js
@@ -124,6 +124,11 @@ Ext.define('PVE.SANUtils', {
);
},
+ // nodes only report an initiator name if they have a usable open-iscsi
+ iscsiMissing: function (report) {
+ return report.state !== 'no-report' && !report['iscsi-initiator-name'];
+ },
+
renderState: function (value) {
if (!value) {
return '';
@@ -138,6 +143,7 @@ Ext.define('PVE.SANUtils', {
unknown: ['question-circle faded', gettext('Unknown')],
unavailable: ['exclamation-circle warning', gettext('Multipath unavailable')],
'no-report': ['question-circle faded', gettext('No current report')],
+ 'no-iscsi': ['times-circle critical', gettext('open-iscsi not installed')],
'logged-in': ['check-circle good', gettext('Connected')],
recovering: ['exclamation-circle warning', gettext('Reconnecting')],
'not-connected': ['times-circle faded', gettext('Not connected')],
diff --git a/www/manager6/storage/wizard/IScsi.js b/www/manager6/storage/wizard/IScsi.js
index f9a53793..26f346ec 100644
--- a/www/manager6/storage/wizard/IScsi.js
+++ b/www/manager6/storage/wizard/IScsi.js
@@ -49,6 +49,28 @@ Ext.define('PVE.storage.wizard.IScsiTarget', {
tabs.setActiveTab(wizard.down('#luns'));
me.disable();
};
+ // checks the nodes the storages will be on, an empty list means all nodes
+ let missingOpenIscsi = function (storageNodes) {
+ let missing = me
+ .down('pveStorageWizardNodeIdentities')
+ .rstore.getRange()
+ .filter((rec) => rec.get('iscsi-missing'))
+ .map((rec) => rec.get('node'))
+ .filter((node) => !storageNodes.length || storageNodes.includes(node));
+ if (missing.length) {
+ wizard.showError(
+ Ext.htmlEncode(
+ Ext.String.format(
+ gettext(
+ 'open-iscsi is not installed on node(s) {0}. Install it there, or restrict the nodes in the advanced options.',
+ ),
+ missing.join(', '),
+ ),
+ ),
+ );
+ }
+ return missing.length > 0;
+ };
let fail = (response) => wizard.showError(response.htmlStatus);
Proxmox.Utils.API2Request({
url: '/storage',
@@ -149,9 +171,15 @@ Ext.define('PVE.storage.wizard.IScsiTarget', {
);
return;
}
+ if (missingOpenIscsi(selectedNodes)) {
+ return;
+ }
connected(connection);
return;
}
+ if (missingOpenIscsi(nodes ? nodes.split(',') : [])) {
+ return;
+ }
Proxmox.Utils.API2Request({
url: '/storage',
method: 'POST',
diff --git a/www/manager6/storage/wizard/NodeIdentities.js b/www/manager6/storage/wizard/NodeIdentities.js
index 7fb8e6b8..01d37f0c 100644
--- a/www/manager6/storage/wizard/NodeIdentities.js
+++ b/www/manager6/storage/wizard/NodeIdentities.js
@@ -1,7 +1,16 @@
Ext.define('pve-san-node-identity', {
extend: 'Ext.data.Model',
idProperty: 'node',
- fields: ['node', 'state', 'iscsi-initiator-name'],
+ fields: [
+ 'node',
+ 'state',
+ 'iscsi-initiator-name',
+ {
+ name: 'iscsi-missing',
+ depends: ['state', 'iscsi-initiator-name'],
+ calculate: (data) => PVE.SANUtils.iscsiMissing(data),
+ },
+ ],
});
Ext.define('PVE.storage.wizard.NodeIdentities', {
@@ -15,8 +24,9 @@ Ext.define('PVE.storage.wizard.NodeIdentities', {
{
text: gettext('State'),
dataIndex: 'state',
- width: 175,
- renderer: PVE.SANUtils.renderState,
+ width: 220,
+ renderer: (value, meta, rec) =>
+ PVE.SANUtils.renderState(rec.get('iscsi-missing') ? 'no-iscsi' : value),
},
{
text: gettext('Initiator Name'),
--
2.47.3
^ permalink raw reply related [flat|nested] 4+ messages in thread
* [PATCH pve-manager 3/3] ui: dc: san: show missing open-iscsi in the node grid
2026-11-20 12:51 [PATCH manager/storage 0/3] san: show and check for missing open-iscsi on nodes Dominik Csapak
2026-11-20 12:51 ` [PATCH pve-storage 1/3] multipath: status: only report initiator name if open-iscsi is installed Dominik Csapak
2026-11-20 12:51 ` [PATCH pve-manager 2/3] ui: san: iscsi guided setup: don't allow nodes without open-iscsi Dominik Csapak
@ 2026-11-20 12:51 ` Dominik Csapak
2 siblings, 0 replies; 4+ messages in thread
From: Dominik Csapak @ 2026-11-20 12:51 UTC (permalink / raw)
To: pve-devel
show 'open-iscsi not installed' instead of the initiator name for
nodes that don't report one.
Don't show it as state, since a node does not need open-iscsi if it
only uses e.g. Fibre Channel, so it's not an error there.
Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
---
www/manager6/SANUtils.js | 8 ++++++++
www/manager6/dc/SAN.js | 7 ++++++-
2 files changed, 14 insertions(+), 1 deletion(-)
diff --git a/www/manager6/SANUtils.js b/www/manager6/SANUtils.js
index 90ddd1eb..ed76ce40 100644
--- a/www/manager6/SANUtils.js
+++ b/www/manager6/SANUtils.js
@@ -129,6 +129,14 @@ Ext.define('PVE.SANUtils', {
return report.state !== 'no-report' && !report['iscsi-initiator-name'];
},
+ renderInitiatorName: function (value, metaData, rec) {
+ if (rec.get('iscsi-missing')) {
+ let text = Ext.htmlEncode(gettext('open-iscsi not installed'));
+ return `<i class="fa fa-fw fa-info-circle faded"></i> ${text}`;
+ }
+ return Ext.htmlEncode(value);
+ },
+
renderState: function (value) {
if (!value) {
return '';
diff --git a/www/manager6/dc/SAN.js b/www/manager6/dc/SAN.js
index 530d96a1..d55a2339 100644
--- a/www/manager6/dc/SAN.js
+++ b/www/manager6/dc/SAN.js
@@ -9,6 +9,11 @@ Ext.define('pve-san-status', {
'apply-error',
'time',
'iscsi-initiator-name',
+ {
+ name: 'iscsi-missing',
+ depends: ['kind', 'state', 'iscsi-initiator-name'],
+ calculate: (data) => data.kind === 'node' && PVE.SANUtils.iscsiMissing(data),
+ },
'other-maps',
'wwid',
'name',
@@ -175,7 +180,7 @@ Ext.define('PVE.dc.SANView', {
text: gettext('iSCSI Initiator Name'),
dataIndex: 'iscsi-initiator-name',
flex: 2,
- renderer: Ext.htmlEncode,
+ renderer: PVE.SANUtils.renderInitiatorName,
},
{
text: gettext('Other Maps'),
--
2.47.3
^ permalink raw reply related [flat|nested] 4+ messages in thread
end of thread, other threads:[~2026-11-20 12:53 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-11-20 12:51 [PATCH manager/storage 0/3] san: show and check for missing open-iscsi on nodes Dominik Csapak
2026-11-20 12:51 ` [PATCH pve-storage 1/3] multipath: status: only report initiator name if open-iscsi is installed Dominik Csapak
2026-11-20 12:51 ` [PATCH pve-manager 2/3] ui: san: iscsi guided setup: don't allow nodes without open-iscsi Dominik Csapak
2026-11-20 12:51 ` [PATCH pve-manager 3/3] ui: dc: san: show missing open-iscsi in the node grid Dominik Csapak
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.