all lists on lists.proxmox.com
 help / color / mirror / Atom feed
From: Mira Limbeck <m.limbeck@proxmox.com>
To: Dietmar Maurer <dietmar@proxmox.com>, pve-devel@lists.proxmox.com
Subject: Re: [PATCH v2 storage 04/15] iscsi: introduce mapping support
Date: Wed, 15 Jul 2026 12:39:08 +0200	[thread overview]
Message-ID: <3c898c26-baf3-4f6f-b05d-09b37c8f0df7@proxmox.com> (raw)
In-Reply-To: <229b5f15-eb3f-405f-bf4f-f3b99ee084a4@proxmox.com>

On 7/13/26 11:19 AM, Dietmar Maurer wrote:
> This is a miss-understanding. The iscsi "portal" property is
> not really the iscsi "portal" - instead, this refers to the "discovery
> address"
It is actually both. A portal used for discovery, and in most of the
cases, also a portal used for a session.

> (we probably want to rename that in the future).
Yes, that would be good.

> 
> The iscsiadm tool has the same name confusion, using "portal" in the
> discovery
> command cli instead of discovery-address.
It looks like it doesn't make a distinction between a discovery portal
and a session portal. In the end it is just an IP/Hostname and an
optional port.
The distinction mostly comes from the context it is used in.

> 
> So I would leave "portal" a required property.
Then we would have to extend it to accept a list of portals.
Some SANs expose different portals to different clients, depending on
the controller the client is connected to.

This is one of the limitations encountered by users of the current iSCSI
plugin, and one of the reasons I introduced `discovery-portals` as part
of the mapping plugin, with a list of portals per mapping.

And we want to support multiple discovery portals in any case.

> 
> I also wonder what happens when we have both, a "target" and a "mapping"?
If you look at patch 5 [0], the helper that is used prefers mappings
when a mapping is found in the configuration. It ignores any configured
`target` then.

> 
> - Dietmar
> 
> On 4/30/26 7:31 PM, Mira Limbeck wrote:
>> `portal` and `target` should be optional then. There is no need for
>> those when a mapping is specified. In return the config needs to be
>> checked to make sure either portal and target are defined, or a mapping.
>>
>> Signed-off-by: Mira Limbeck <m.limbeck@proxmox.com>
>> ---
>>   src/PVE/Storage/ISCSIPlugin.pm | 18 ++++++++++++++++--
>>   1 file changed, 16 insertions(+), 2 deletions(-)
>>
>> diff --git a/src/PVE/Storage/ISCSIPlugin.pm b/src/PVE/Storage/
>> ISCSIPlugin.pm
>> index 30f4178..88a35be 100644
>> --- a/src/PVE/Storage/ISCSIPlugin.pm
>> +++ b/src/PVE/Storage/ISCSIPlugin.pm
>> @@ -9,6 +9,7 @@ use IO::File;
>>     use PVE::JSONSchema qw(get_standard_option);
>>   use PVE::Storage::Plugin;
>> +use PVE::Storage::Mapping;
>>   use PVE::Tools
>>       qw(run_command file_read_firstline trim dir_glob_regex
>> dir_glob_foreach $IPV4RE $IPV6RE);
>>   @@ -354,8 +355,9 @@ sub properties {
>>     sub options {
>>       return {
>> -        portal => { fixed => 1 },
>> -        target => { fixed => 1 },
>> +        portal => { fixed => 1, optional => 1 },
>> +        target => { fixed => 1, optional => 1 },
>> +        mapping => { optional => 1 },
>>           nodes => { optional => 1 },
>>           disable => { optional => 1 },
>>           content => { optional => 1 },
>> @@ -703,4 +705,16 @@ sub volume_import {
>>       die "volume import is not possible on iscsi storage\n";
>>   }
>>   +sub check_config {
>> +    my ($class, $sectionId, $config, $create, $skipSchemaCheck) = @_;
>> +
>> +    my $checked = $class->SUPER::check_config($sectionId, $config,
>> $create, $skipSchemaCheck);
>> +
>> +    # check if either target or mapping is set
>> +    die "iscsi storage '$sectionId' has neither 'target' nor
>> 'mapping' defined\n"
>> +        if !defined($checked->{target}) && !defined($checked-
>> >{mapping});
>> +
>> +    return $checked;
>> +}
>> +
>>   1;


[0]
https://lore.proxmox.com/pve-devel/20260430173220.441001-6-m.limbeck@proxmox.com/




  reply	other threads:[~2026-07-15 10:39 UTC|newest]

Thread overview: 39+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-04-30 17:26 [PATCH v2 cluster/storage/manager 00/15] storage mapping Mira Limbeck
2026-04-30 17:26 ` [PATCH v2 cluster 01/15] mapping: add storage.cfg Mira Limbeck
2026-04-30 17:27 ` [PATCH v2 storage 02/15] mapping: add base plugin Mira Limbeck
2026-04-30 17:35   ` Mira Limbeck
2026-05-23 21:26   ` Thomas Lamprecht
2026-07-13  9:54   ` Dietmar Maurer
2026-07-15 10:43     ` Mira Limbeck
2026-07-15 11:03       ` Thomas Lamprecht
2026-04-30 17:27 ` [PATCH v2 storage 03/15] mapping: add iSCSI plugin Mira Limbeck
2026-04-30 17:27 ` [PATCH v2 storage 04/15] iscsi: introduce mapping support Mira Limbeck
2026-07-13  9:19   ` Dietmar Maurer
2026-07-15 10:39     ` Mira Limbeck [this message]
2026-04-30 17:27 ` [PATCH v2 storage 05/15] iscsi: add helper to get local config Mira Limbeck
2026-05-23 21:26   ` Thomas Lamprecht
2026-04-30 17:27 ` [PATCH v2 storage 06/15] iscsi: change functions to handle mappings Mira Limbeck
2026-05-23 21:26   ` Thomas Lamprecht
2026-04-30 17:27 ` [PATCH v2 storage 07/15] iscsi: introduce helper to update discovery db Mira Limbeck
2026-05-11 16:46   ` Samuel Rufinatscha
2026-05-23 21:26   ` Thomas Lamprecht
2026-04-30 17:27 ` [PATCH v2 storage 08/15] iscsi: rework to update discovery db and simplify login Mira Limbeck
2026-05-23 21:26   ` Thomas Lamprecht
2026-05-26  8:42     ` Mira Limbeck
2026-04-30 17:27 ` [PATCH v2 storage 09/15] iscsi: remove stale sessions in non-mapping case Mira Limbeck
2026-05-23 21:26   ` Thomas Lamprecht
2026-05-26  8:48     ` Mira Limbeck
2026-04-30 17:27 ` [PATCH v2 storage 10/15] api: add mapping support Mira Limbeck
2026-05-23 21:26   ` Thomas Lamprecht
2026-04-30 17:27 ` [PATCH v2 storage 11/15] mapping: iscsi: add discovery-portal config option Mira Limbeck
2026-04-30 17:27 ` [PATCH v2 storage 12/15] iscsi: add support for non-persistent discovery Mira Limbeck
2026-04-30 17:38   ` Mira Limbeck
2026-05-23 21:26   ` Thomas Lamprecht
2026-05-26  8:36     ` Mira Limbeck
2026-04-30 17:27 ` [PATCH v2 storage 13/15] api: add non-persistent iscsi discovery option Mira Limbeck
2026-05-23 21:26   ` Thomas Lamprecht
2026-04-30 17:27 ` [POC v2 storage 14/15] mapping: add zfspool plugin Mira Limbeck
2026-05-23 21:26   ` Thomas Lamprecht
2026-04-30 17:27 ` [PATCH v2 manager 15/15] api: mapping: add storage mapping path Mira Limbeck
2026-05-11 17:05 ` [PATCH v2 cluster/storage/manager 00/15] storage mapping Samuel Rufinatscha
2026-05-23 21:26 ` Thomas Lamprecht

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=3c898c26-baf3-4f6f-b05d-09b37c8f0df7@proxmox.com \
    --to=m.limbeck@proxmox.com \
    --cc=dietmar@proxmox.com \
    --cc=pve-devel@lists.proxmox.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.
Service provided by Proxmox Server Solutions GmbH | Privacy | Legal