[pve-devel] [PATCH storage] ISCSIPlugin: Use long options for readability

Emmanuel Kasper e.kasper at proxmox.com
Mon Oct 9 10:39:18 CEST 2017


We otherwise use the long options everywhere in the plugin.
This will build the following command:

iscsiadm  --mode session --sid 1 --rescan
Rescanning session [sid: 1, target: xxx, portal: yyy]
---
 PVE/Storage/ISCSIPlugin.pm | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/PVE/Storage/ISCSIPlugin.pm b/PVE/Storage/ISCSIPlugin.pm
index 326de9d..aef8675 100644
--- a/PVE/Storage/ISCSIPlugin.pm
+++ b/PVE/Storage/ISCSIPlugin.pm
@@ -136,7 +136,7 @@ sub iscsi_session_rescan {
     }
 
     foreach my $session (@$session_list) {
-	my $cmd = [$ISCSIADM, '--mode', 'session', '-r', $session, '-R'];
+	my $cmd = [$ISCSIADM, '--mode', 'session', '--sid', $session, '--rescan'];
 	eval { run_command($cmd, outfunc => sub {}); };
 	warn $@ if $@;
     }
-- 
2.11.0




More information about the pve-devel mailing list