Script 'mail_helper' called by obssrc
Hello community,

here is the log from the commit of package yast2-iscsi-client for 
openSUSE:Factory checked in at 2022-06-23 10:22:28
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/yast2-iscsi-client (Old)
 and      /work/SRC/openSUSE:Factory/.yast2-iscsi-client.new.1548 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "yast2-iscsi-client"

Thu Jun 23 10:22:28 2022 rev:139 rq:984197 version:4.5.4

Changes:
--------
--- /work/SRC/openSUSE:Factory/yast2-iscsi-client/yast2-iscsi-client.changes    
2022-05-17 17:24:10.535156962 +0200
+++ 
/work/SRC/openSUSE:Factory/.yast2-iscsi-client.new.1548/yast2-iscsi-client.changes
  2022-06-23 10:22:30.071624643 +0200
@@ -1,0 +2,8 @@
+Tue Jun 21 13:19:31 UTC 2022 - Ancor Gonzalez Sosa <an...@suse.com>
+
+- Stop using the deprecated agent "background".
+- Ensure iSCSI discovery works when YaST is configuring a different
+  target system (bsc#1199840).
+- 4.5.4
+
+-------------------------------------------------------------------

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

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

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

Other differences:
------------------
++++++ yast2-iscsi-client.spec ++++++
--- /var/tmp/diff_new_pack.I6jXvB/_old  2022-06-23 10:22:30.627625247 +0200
+++ /var/tmp/diff_new_pack.I6jXvB/_new  2022-06-23 10:22:30.631625252 +0200
@@ -17,7 +17,7 @@
 
 
 Name:           yast2-iscsi-client
-Version:        4.5.3
+Version:        4.5.4
 Release:        0
 Summary:        YaST2 - iSCSI Client Configuration
 License:        GPL-2.0-only

++++++ yast2-iscsi-client-4.5.3.tar.bz2 -> yast2-iscsi-client-4.5.4.tar.bz2 
++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/yast2-iscsi-client-4.5.3/.rubocop.yml 
new/yast2-iscsi-client-4.5.4/.rubocop.yml
--- old/yast2-iscsi-client-4.5.3/.rubocop.yml   2022-05-16 17:05:38.000000000 
+0200
+++ new/yast2-iscsi-client-4.5.4/.rubocop.yml   2022-06-21 16:04:53.000000000 
+0200
@@ -100,7 +100,7 @@
 # Offense count: 1
 # Configuration parameters: CountComments, CountAsOne.
 Metrics/ClassLength:
-  Max: 1279
+  Max: 1282
 
 # Offense count: 21
 # Configuration parameters: IgnoredMethods.
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/yast2-iscsi-client-4.5.3/package/yast2-iscsi-client.changes 
new/yast2-iscsi-client-4.5.4/package/yast2-iscsi-client.changes
--- old/yast2-iscsi-client-4.5.3/package/yast2-iscsi-client.changes     
2022-05-16 17:05:38.000000000 +0200
+++ new/yast2-iscsi-client-4.5.4/package/yast2-iscsi-client.changes     
2022-06-21 16:04:53.000000000 +0200
@@ -1,4 +1,12 @@
 -------------------------------------------------------------------
+Tue Jun 21 13:19:31 UTC 2022 - Ancor Gonzalez Sosa <an...@suse.com>
+
+- Stop using the deprecated agent "background".
+- Ensure iSCSI discovery works when YaST is configuring a different
+  target system (bsc#1199840).
+- 4.5.4
+
+-------------------------------------------------------------------
 Mon May 16 10:11:13 UTC 2022 - Imobach Gonzalez Sosa <igonzalezs...@suse.com>
 
 - Fix a crash when opening the main dialog (bsc#1199552).
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/yast2-iscsi-client-4.5.3/package/yast2-iscsi-client.spec 
new/yast2-iscsi-client-4.5.4/package/yast2-iscsi-client.spec
--- old/yast2-iscsi-client-4.5.3/package/yast2-iscsi-client.spec        
2022-05-16 17:05:38.000000000 +0200
+++ new/yast2-iscsi-client-4.5.4/package/yast2-iscsi-client.spec        
2022-06-21 16:04:53.000000000 +0200
@@ -17,7 +17,7 @@
 
 
 Name:           yast2-iscsi-client
-Version:        4.5.3
+Version:        4.5.4
 Release:        0
 Summary:        YaST2 - iSCSI Client Configuration
 License:        GPL-2.0-only
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/yast2-iscsi-client-4.5.3/src/include/iscsi-client/widgets.rb 
new/yast2-iscsi-client-4.5.4/src/include/iscsi-client/widgets.rb
--- old/yast2-iscsi-client-4.5.3/src/include/iscsi-client/widgets.rb    
2022-05-16 17:05:38.000000000 +0200
+++ new/yast2-iscsi-client-4.5.4/src/include/iscsi-client/widgets.rb    
2022-06-21 16:04:53.000000000 +0200
@@ -42,55 +42,49 @@
       @bg_finish = false
     end
 
-    # string initiatorname="";
-    # function for run command in background
+    # Runs the given command in background with a timeout of 10 seconds
+    #
+    # The method sets @bg_finish to true and returns the stdout of the command.
+    # Additionally:
+    #
+    # - If the command success, the method sets @stat to true.
+    # - If the command fails, the method displays the first line of stderr to 
the user
+    #   and sets @stat to false.
+    # - It the timeout is reached, the process is killed and the method 
displays a
+    #   message about the timeout to the user. The value of @stat is not 
modified.
+    #
+    # @return [Array<String>] each one of the lines of stdout
     def runInBg(command)
       @bg_finish = false
       Builtins.y2milestone("Start command %1 in background", command)
       stdout = []
       return_code = nil
-      started = Convert.to_boolean(
-        SCR.Execute(path(".background.run_output_err"), command)
-      )
-      if !started
-        Builtins.y2error("Cannot run command")
-        @stat = false
-        return []
-      end
+
+      pid = SCR.Execute(path(".process.start_shell"), command)
       time_spent = 0
       cont_loop = true
       script_time_out = 10000
       sleep_step = 20
-      while cont_loop &&
-          Convert.to_boolean(SCR.Read(path(".background.output_open")))
-        if Ops.greater_or_equal(time_spent, script_time_out)
+
+      while cont_loop && SCR.Read(path(".process.running"), pid)
+        if time_spent >= script_time_out
           Popup.Error(_("Command timed out"))
           cont_loop = false
         end
-        time_spent = Ops.add(time_spent, sleep_step)
+        time_spent += sleep_step
         Builtins.sleep(sleep_step)
       end
+
       Builtins.y2milestone("Time spent: %1 msec", time_spent)
-      stdout = Convert.convert(
-        SCR.Read(path(".background.newout")),
-        :from => "any",
-        :to   => "list <string>"
-      )
+      stdout = (SCR.Read(path(".process.read"), pid) || "").split("\n")
       Builtins.y2milestone("Output: %1", stdout)
+
       if cont_loop
-        return_code = Convert.to_integer(SCR.Read(path(".background.status")))
+        return_code = SCR.Read(path(".process.status"), pid).to_i
         Builtins.y2milestone("Return: %1", return_code)
         if return_code != 0
           @stat = false
-          error = Ops.get(
-            Convert.convert(
-              SCR.Read(path(".background.newerr")),
-              :from => "any",
-              :to   => "list <string>"
-            ),
-            0,
-            ""
-          )
+          error = SCR.Read(path(".process.read_line_stderr"), pid)
           Builtins.y2error("Error: %1", error)
           Popup.Error(error)
         else
@@ -98,9 +92,7 @@
         end
       else
         # killing the process if it still runs
-        if Convert.to_boolean(SCR.Read(path(".background.output_open")))
-          SCR.Execute(path(".background.kill"), "")
-        end
+        SCR.Execute(path(".process.kill"), pid)
       end
       @bg_finish = true
       deep_copy(stdout)
@@ -639,6 +631,12 @@
       # targets won't change then (fate #317874, bnc #886796).
       option_new = (@current_tab == "client")
 
+      # The discovery command can take care of loading the needed kernel 
modules.
+      # But that doesn't work when YaST is running (and thus executing the
+      # discovery command) in a container. So this loads the modules in advance
+      # in a way that works in containers.
+      IscsiClientLib.load_modules
+
       command = IscsiClientLib.GetDiscoveryCmd(ip, port,
         use_fw:   false,
         only_new: option_new)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/yast2-iscsi-client-4.5.3/src/modules/IscsiClientLib.rb 
new/yast2-iscsi-client-4.5.4/src/modules/IscsiClientLib.rb
--- old/yast2-iscsi-client-4.5.3/src/modules/IscsiClientLib.rb  2022-05-16 
17:05:38.000000000 +0200
+++ new/yast2-iscsi-client-4.5.4/src/modules/IscsiClientLib.rb  2022-06-21 
16:04:53.000000000 +0200
@@ -1121,7 +1121,7 @@
     def getServiceStatus
       ret = true
       if Stage.initial
-        ModuleLoading.Load("iscsi_tcp", "", "", "", false, true)
+        load_modules
         # start daemon manually (systemd not available in inst-sys)
         start_services_initial
       else
@@ -1529,6 +1529,11 @@
       (ISCSIUIO_MODULES & GetOffloadModules()).any?
     end
 
+    # Loads the kernel modules needed to configure the iscsi client
+    def load_modules
+      ModuleLoading.Load("iscsi_tcp", "", "", "", false, true)
+    end
+
     publish :variable => :sessions, :type => "list <string>"
     publish :variable => :discovered, :type => "list <string>"
     publish :variable => :targets, :type => "list <string>"

Reply via email to