Hello community,

here is the log from the commit of package yast2-iscsi-client for 
openSUSE:Factory checked in at 2020-01-20 22:49:06
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/yast2-iscsi-client (Old)
 and      /work/SRC/openSUSE:Factory/.yast2-iscsi-client.new.26092 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "yast2-iscsi-client"

Mon Jan 20 22:49:06 2020 rev:128 rq:765243 version:4.2.4

Changes:
--------
--- /work/SRC/openSUSE:Factory/yast2-iscsi-client/yast2-iscsi-client.changes    
2020-01-11 14:47:34.717363462 +0100
+++ 
/work/SRC/openSUSE:Factory/.yast2-iscsi-client.new.26092/yast2-iscsi-client.changes
 2020-01-20 22:49:22.283203334 +0100
@@ -1,0 +2,6 @@
+Fri Jan 17 10:17:29 UTC 2020 - Josef Reidinger <[email protected]>
+
+- fix calling iscsiadm on interface (bsc#1158443)
+- 4.2.4
+
+-------------------------------------------------------------------

Old:
----
  yast2-iscsi-client-4.2.3.tar.bz2

New:
----
  yast2-iscsi-client-4.2.4.tar.bz2

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ yast2-iscsi-client.spec ++++++
--- /var/tmp/diff_new_pack.KyEqhR/_old  2020-01-20 22:49:23.847203936 +0100
+++ /var/tmp/diff_new_pack.KyEqhR/_new  2020-01-20 22:49:23.847203936 +0100
@@ -17,7 +17,7 @@
 
 
 Name:           yast2-iscsi-client
-Version:        4.2.3
+Version:        4.2.4
 Release:        0
 Summary:        YaST2 - iSCSI Client Configuration
 License:        GPL-2.0-only

++++++ yast2-iscsi-client-4.2.3.tar.bz2 -> yast2-iscsi-client-4.2.4.tar.bz2 
++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/yast2-iscsi-client-4.2.3/package/yast2-iscsi-client.changes 
new/yast2-iscsi-client-4.2.4/package/yast2-iscsi-client.changes
--- old/yast2-iscsi-client-4.2.3/package/yast2-iscsi-client.changes     
2020-01-09 10:22:58.000000000 +0100
+++ new/yast2-iscsi-client-4.2.4/package/yast2-iscsi-client.changes     
2020-01-17 13:30:07.000000000 +0100
@@ -1,4 +1,10 @@
 -------------------------------------------------------------------
+Fri Jan 17 10:17:29 UTC 2020 - Josef Reidinger <[email protected]>
+
+- fix calling iscsiadm on interface (bsc#1158443)
+- 4.2.4
+
+-------------------------------------------------------------------
 Thu Jan  9 08:47:18 UTC 2020 - Knut Anderssen <[email protected]>
 
 - Keep the current service state after writing the configuration by
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/yast2-iscsi-client-4.2.3/package/yast2-iscsi-client.spec 
new/yast2-iscsi-client-4.2.4/package/yast2-iscsi-client.spec
--- old/yast2-iscsi-client-4.2.3/package/yast2-iscsi-client.spec        
2020-01-09 10:22:58.000000000 +0100
+++ new/yast2-iscsi-client-4.2.4/package/yast2-iscsi-client.spec        
2020-01-17 13:30:07.000000000 +0100
@@ -17,7 +17,7 @@
 
 
 Name:           yast2-iscsi-client
-Version:        4.2.3
+Version:        4.2.4
 Release:        0
 Summary:        YaST2 - iSCSI Client Configuration
 Group:          System/YaST
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/yast2-iscsi-client-4.2.3/src/modules/IscsiClientLib.rb 
new/yast2-iscsi-client-4.2.4/src/modules/IscsiClientLib.rb
--- old/yast2-iscsi-client-4.2.3/src/modules/IscsiClientLib.rb  2020-01-09 
10:22:58.000000000 +0100
+++ new/yast2-iscsi-client-4.2.4/src/modules/IscsiClientLib.rb  2020-01-17 
13:30:07.000000000 +0100
@@ -928,7 +928,7 @@
         path(".target.bash_output"),
         GetAdmCmd(
           Builtins.sformat(
-            "-m node -I%3 -T %1 -p %2 --op=update --name=node.conn[0].startup 
--value=%4",
+            "-m node -I %3 -T %1 -p %2 --op=update --name=node.conn[0].startup 
--value=%4",
             Ops.get(@currentRecord, 1, "").shellescape,
             Ops.get(@currentRecord, 0, "").shellescape,
             Ops.get(@currentRecord, 2, "default").shellescape,
@@ -1126,13 +1126,11 @@
       ifacepar = ""
       Builtins.foreach(Ops.get_list(@ay_settings, "targets", [])) do |target|
         iface = Ops.get_string(target, "iface", "default")
-        if !Builtins.contains(ifaces, iface)
-          if Ops.greater_than(Builtins.size(ifacepar), 0)
-            ifacepar = Ops.add(ifacepar, " ")
-          end
-          ifacepar = Ops.add(Ops.add(ifacepar, "-I "), iface)
-          ifaces = Builtins.add(ifaces, iface)
-        end
+        next if ifaces.include?(iface) # already added
+
+        ifacepar << " " unless ifacepar.empty?
+        ifacepar << "-I " << iface.shellescape
+        ifaces << iface
       end
       if Ops.greater_than(Builtins.size(Builtins.filter(ifaces) do |s|
                                           s != "default"
@@ -1146,7 +1144,7 @@
             GetAdmCmd(
               Builtins.sformat(
                 "-m discovery %1 -t st -p %2",
-                ifacepar.shellescape,
+                ifacepar,
                 Ops.get_string(target, "portal", "").shellescape
               )
             )
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/yast2-iscsi-client-4.2.3/test/iscsi_client_lib_test.rb 
new/yast2-iscsi-client-4.2.4/test/iscsi_client_lib_test.rb
--- old/yast2-iscsi-client-4.2.3/test/iscsi_client_lib_test.rb  2020-01-09 
10:22:58.000000000 +0100
+++ new/yast2-iscsi-client-4.2.4/test/iscsi_client_lib_test.rb  2020-01-17 
13:30:07.000000000 +0100
@@ -73,4 +73,29 @@
       end
     end
   end
+
+  describe ".autoyastWrite" do
+    it "calls iscsiadm discovery" do
+      subject.ay_settings = {
+        "targets" => [
+          { "iface" => "eth0", "portal" => "magic" },
+          { "iface" => "eth1", "portal" => "portal 1" }
+        ]
+      }
+
+      allow(Yast::SCR).to 
receive(:Execute).with(Yast::Path.new(".target.bash_output"), anything)
+        .and_return("exit" => 0, "stdout" => "", "stderr" => "")
+
+      expect(Yast::SCR).to receive(:Execute).with(
+        Yast::Path.new(".target.bash"),
+        "LC_ALL=POSIX /sbin/iscsiadm -m discovery -I eth0 -I eth1 -t st -p 
magic"
+      )
+      expect(Yast::SCR).to receive(:Execute).with(
+        Yast::Path.new(".target.bash"),
+        "LC_ALL=POSIX /sbin/iscsiadm -m discovery -I eth0 -I eth1 -t st -p 
portal\\ 1"
+      )
+
+      subject.autoyastWrite
+    end
+  end
 end


Reply via email to