[pve-devel] r5297 - pve-storage/trunk

svn-commits at proxmox.com svn-commits at proxmox.com
Mon Nov 8 08:00:32 CET 2010


Author: dietmar
Date: 2010-11-08 07:00:31 +0000 (Mon, 08 Nov 2010)
New Revision: 5297

Modified:
   pve-storage/trunk/ChangeLog
   pve-storage/trunk/Makefile
   pve-storage/trunk/Storage.pm
   pve-storage/trunk/changelog.Debian
Log:


Modified: pve-storage/trunk/ChangeLog
===================================================================
--- pve-storage/trunk/ChangeLog	2010-11-04 07:48:33 UTC (rev 5296)
+++ pve-storage/trunk/ChangeLog	2010-11-08 07:00:31 UTC (rev 5297)
@@ -1,3 +1,7 @@
+2010-11-08  Proxmox Support Team  <support at proxmox.com>
+
+	* Storage.pm (iscsi_login): multipath fixes: log in to all portals
+
 2010-10-28  Proxmox Support Team  <support at proxmox.com>
 
 	* Storage.pm (iscsi_session_list): allow several sessions per

Modified: pve-storage/trunk/Makefile
===================================================================
--- pve-storage/trunk/Makefile	2010-11-04 07:48:33 UTC (rev 5296)
+++ pve-storage/trunk/Makefile	2010-11-08 07:00:31 UTC (rev 5297)
@@ -2,7 +2,7 @@
 
 VERSION=1.0
 PACKAGE=libpve-storage-perl
-PKGREL=15
+PKGREL=16
 
 DESTDIR=
 PREFIX=/usr

Modified: pve-storage/trunk/Storage.pm
===================================================================
--- pve-storage/trunk/Storage.pm	2010-11-04 07:48:33 UTC (rev 5296)
+++ pve-storage/trunk/Storage.pm	2010-11-08 07:00:31 UTC (rev 5297)
@@ -1119,7 +1119,8 @@
 	if ($line =~ m/^(\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}:\d+)\,\S+\s+(\S+)\s*$/) {
 	    my $portal = $1;
 	    my $target = $2;
-	    $res->{$target} = $portal;
+	    # one target can have more than one portal (multipath).
+	    push @{$res->{$target}}, $portal;
 	}
     });
 
@@ -1127,15 +1128,17 @@
 }
 
 sub iscsi_login {
-    my ($target, $portal) = @_;
+    my ($target, $portal_in) = @_;
 
     check_iscsi_support ();
 
-    iscsi_discovery ($portal);
+    my $res = iscsi_discovery ($portal_in);
 
-    my $cmd = [$ISCSIADM, '--mode', 'node', '--portal', $portal, 
-	       '--targetname',  $target, '--login'];
-    run_command ($cmd);
+    foreach my $portal (@{$res->{$target}}) {
+	my $cmd = [$ISCSIADM, '--mode', 'node', '--portal', $portal, 
+		   '--targetname',  $target, '--login'];
+	run_command ($cmd);
+    }
 }
 
 sub iscsi_logout {

Modified: pve-storage/trunk/changelog.Debian
===================================================================
--- pve-storage/trunk/changelog.Debian	2010-11-04 07:48:33 UTC (rev 5296)
+++ pve-storage/trunk/changelog.Debian	2010-11-08 07:00:31 UTC (rev 5297)
@@ -1,3 +1,9 @@
+libpve-storage-perl (1.0-16) unstable; urgency=low
+
+  * multipath fix: login to all portals
+
+ -- Proxmox Support Team <support at proxmox.com>  Mon, 08 Nov 2010 07:58:56 +0100
+
 libpve-storage-perl (1.0-15) unstable; urgency=low
 
   * try to support multipath



More information about the pve-devel mailing list