]> git.proxmox.com Git - pve-storage.git/commitdiff
fix #862: do not resolve portal adress on storage add
authorThomas Lamprecht <t.lamprecht@proxmox.com>
Wed, 14 Nov 2018 17:11:02 +0000 (18:11 +0100)
committerWolfgang Bumiller <w.bumiller@proxmox.com>
Thu, 15 Nov 2018 09:06:19 +0000 (10:06 +0100)
as described in #862:

> I experienced a problem with ISCSI portal when using a hostname and
> not IP.
> The GUI resolves the hostname to an IP and writes it to storage.cfg.
> As my setup requires hostnames, i needed to change the config
> manually back to the hostname which is working fine.
>
> Why is this conversion done? If I enter a hostname, i want to have a
> hostname. If i enter an IP address i want to have an IP address.

This makes sense to me, a feature of using domains is that they
are/should be resolved when actually using (i.e., connecting to them)
so resolving it once on add does not seems like a good idea (if I do
not miss something - as this is a classic "imported from SVN" I do
not have any rationale to look at).

So save the work and pass it as is.

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
PVE/API2/Storage/Config.pm

index b16054b3c7ec0225fecc4accc1d7e60081d197cd..c114ddc76ece5c40508a3dd8218bf8da150d09e0 100755 (executable)
@@ -143,10 +143,6 @@ __PACKAGE__->register_method ({
            }
        }
 
-       if ($param->{portal}) {
-           $param->{portal} = PVE::Storage::resolv_portal($param->{portal});
-       }
-
        my $plugin = PVE::Storage::Plugin->lookup($type);
        my $opts = $plugin->check_config($storeid, $param, 1, 1);