Hello community,
here is the log from the commit of package yast2-iscsi-client for
openSUSE:Factory checked in at 2014-03-21 12:13:58
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/yast2-iscsi-client (Old)
and /work/SRC/openSUSE:Factory/.yast2-iscsi-client.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "yast2-iscsi-client"
Changes:
--------
--- /work/SRC/openSUSE:Factory/yast2-iscsi-client/yast2-iscsi-client.changes
2014-01-27 11:24:07.000000000 +0100
+++
/work/SRC/openSUSE:Factory/.yast2-iscsi-client.new/yast2-iscsi-client.changes
2014-03-21 12:14:04.000000000 +0100
@@ -1,0 +2,7 @@
+Fri Mar 14 10:47:43 CET 2014 - [email protected]
+
+- start iscsid socket and iscsi service correctly
+ (bnc #867378, bnc #853300)
+- 3.1.4
+
+-------------------------------------------------------------------
Old:
----
yast2-iscsi-client-3.1.3.tar.bz2
New:
----
yast2-iscsi-client-3.1.4.tar.bz2
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ yast2-iscsi-client.spec ++++++
--- /var/tmp/diff_new_pack.H4RVTb/_old 2014-03-21 12:14:05.000000000 +0100
+++ /var/tmp/diff_new_pack.H4RVTb/_new 2014-03-21 12:14:05.000000000 +0100
@@ -17,7 +17,7 @@
Name: yast2-iscsi-client
-Version: 3.1.3
+Version: 3.1.4
Release: 0
BuildRoot: %{_tmppath}/%{name}-%{version}-build
@@ -49,7 +49,7 @@
BuildArch: noarch
-Requires: yast2-ruby-bindings >= 1.0.0
+Requires: yast2-ruby-bindings >= 3.1.7
Summary: YaST2 - iSCSI Client Configuration
License: GPL-2.0
++++++ yast2-iscsi-client-3.1.3.tar.bz2 -> yast2-iscsi-client-3.1.4.tar.bz2
++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/yast2-iscsi-client-3.1.3/MAINTAINER
new/yast2-iscsi-client-3.1.4/MAINTAINER
--- old/yast2-iscsi-client-3.1.3/MAINTAINER 2014-01-23 15:48:54.000000000
+0100
+++ new/yast2-iscsi-client-3.1.4/MAINTAINER 2014-03-14 11:10:38.000000000
+0100
@@ -1 +1 @@
-Thomas Fehr <[email protected]>
+Gabriele Mohr <[email protected]>
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/yast2-iscsi-client-3.1.3/package/yast2-iscsi-client.changes
new/yast2-iscsi-client-3.1.4/package/yast2-iscsi-client.changes
--- old/yast2-iscsi-client-3.1.3/package/yast2-iscsi-client.changes
2014-01-23 15:48:54.000000000 +0100
+++ new/yast2-iscsi-client-3.1.4/package/yast2-iscsi-client.changes
2014-03-14 11:10:38.000000000 +0100
@@ -1,4 +1,11 @@
-------------------------------------------------------------------
+Fri Mar 14 10:47:43 CET 2014 - [email protected]
+
+- start iscsid socket and iscsi service correctly
+ (bnc #867378, bnc #853300)
+- 3.1.4
+
+-------------------------------------------------------------------
Wed Jan 22 14:16:37 CET 2014 - [email protected]
- detect persistent portal correctly (bnc#856494)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/yast2-iscsi-client-3.1.3/package/yast2-iscsi-client.spec
new/yast2-iscsi-client-3.1.4/package/yast2-iscsi-client.spec
--- old/yast2-iscsi-client-3.1.3/package/yast2-iscsi-client.spec
2014-01-23 15:48:54.000000000 +0100
+++ new/yast2-iscsi-client-3.1.4/package/yast2-iscsi-client.spec
2014-03-14 11:10:38.000000000 +0100
@@ -17,7 +17,7 @@
Name: yast2-iscsi-client
-Version: 3.1.3
+Version: 3.1.4
Release: 0
BuildRoot: %{_tmppath}/%{name}-%{version}-build
@@ -40,7 +40,7 @@
BuildArchitectures: noarch
-Requires: yast2-ruby-bindings >= 1.0.0
+Requires: yast2-ruby-bindings >= 3.1.7
Summary: YaST2 - iSCSI Client Configuration
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/yast2-iscsi-client-3.1.3/src/clients/iscsi-client_finish.rb
new/yast2-iscsi-client-3.1.4/src/clients/iscsi-client_finish.rb
--- old/yast2-iscsi-client-3.1.3/src/clients/iscsi-client_finish.rb
2014-01-23 15:48:54.000000000 +0100
+++ new/yast2-iscsi-client-3.1.4/src/clients/iscsi-client_finish.rb
2014-03-14 11:10:38.000000000 +0100
@@ -41,6 +41,7 @@
Yast.import "String"
Yast.import "IscsiClientLib"
Yast.import "Service"
+ Yast.import "SystemdSocket"
Yast.include self, "installation/misc.rb"
@ret = nil
@@ -87,9 +88,10 @@
)
)
if Ops.greater_than(Builtins.size(IscsiClientLib.sessions), 0)
- Service.Enable("boot.iscsid-early")
- Service.Enable("iscsid")
- Builtins.y2milestone("iscsid service enabled")
+ socket = SystemdSocket.find("iscsid")
+ socket.enable if socket
+ Service.Enable("iscsi")
+ Builtins.y2milestone("iscsi service and iscsid socket enabled")
end
else
Builtins.y2error("unknown function: %1", @func)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/yast2-iscsi-client-3.1.3/src/modules/IscsiClientLib.rb
new/yast2-iscsi-client-3.1.4/src/modules/IscsiClientLib.rb
--- old/yast2-iscsi-client-3.1.3/src/modules/IscsiClientLib.rb 2014-01-23
15:48:54.000000000 +0100
+++ new/yast2-iscsi-client-3.1.4/src/modules/IscsiClientLib.rb 2014-03-14
11:10:38.000000000 +0100
@@ -26,6 +26,9 @@
module Yast
class IscsiClientLibClass < Module
+
+ include Yast::Logger
+
def main
textdomain "iscsi-client"
@@ -37,6 +40,7 @@
Yast.import "Mode"
Yast.import "String"
Yast.import "Arch"
+ Yast.import "SystemdSocket"
@sessions = []
@discovered = []
@@ -45,8 +49,10 @@
@iface_file = {}
@iface_eth = []
- # status of rciscsid service
+ # status of iscsi.service
@serviceStatus = false
+ # status of iscsid.socket
+ @socketStatus = false
# main configuration file (/etc/iscsi/iscsid.conf)
@config = {}
# iBFT (iSCSI Boot Firmware Table)
@@ -76,6 +82,71 @@
]
@offload_valid = nil
+
+ @iscsid_socket = nil
+ end
+
+ def iscsidSocketActive?
+ if @iscsid_socket
+ @iscsid_socket.active?
+ else
+ log.error("iscsid.socket not found")
+ false
+ end
+ end
+
+ def iscsidSocketStart
+ if @iscsid_socket
+ @iscsid_socket.start
+ else
+ log.error("iscsid.socket not found")
+ false
+ end
+ end
+
+ def iscsidSocketStop
+ if @iscsid_socket
+ @iscsid_socket.stop
+ else
+ log.error("iscsid.socket not found")
+ false
+ end
+ end
+
+ def iscsidSocketEnabled?
+ if @iscsid_socket
+ @iscsid_socket.enabled?
+ else
+ log.error("iscsid.socket not found")
+ false
+ end
+ end
+
+ def iscsidSocketDisabled?
+ if @iscsid_socket
+ @iscsid_socket.disabled?
+ else
+ log.error("iscsid.socket not found")
+ false
+ end
+ end
+
+ def iscsidSocketEnable
+ if @iscsid_socket
+ @iscsid_socket.enable
+ else
+ log.error("iscsid.socket not found")
+ false
+ end
+ end
+
+ def iscsidSocketDisable
+ if @iscsid_socket
+ @iscsid_socket.disable
+ else
+ log.error("iscsid.socket not found")
+ false
+ end
end
def GetOffloadCard
@@ -160,20 +231,22 @@
# get accessor for service status
def GetStartService
- status = Service.Enabled("iscsid")
- Builtins.y2milestone("Status of iscsid %1", status)
- status
+ status_d = iscsidSocketEnabled?
+ status = Service.Enabled("iscsi")
+ Builtins.y2milestone("Start at boot enabled for iscsid.socket: %1,
iscsi: %2", status_d, status)
+ return status_d && status
end
# set accessor for service status
def SetStartService(status)
- Builtins.y2milestone("Set status of iscsid to %1", status)
+ Builtins.y2milestone("Set start at boot for iscsid.socket and
iscsi.service to %1",
+ status)
if status == true
- Service.Enable("boot.iscsid-early")
- Service.Enable("iscsid")
+ Service.Enable("iscsi")
+ iscsidSocketEnable
else
- Service.Disable("boot.iscsid-early")
- Service.Disable("iscsid")
+ Service.Disable("iscsi")
+ iscsidSocketDisable
end
nil
@@ -495,7 +568,8 @@
Builtins.y2milestone("Initiatorname %1 written", @initiatorname)
end
# reload service when initiatorname is changed to re-read new value
(bnc#482429)
- Service.Reload("iscsid")
+ # restart the daemon (reload not supported with systemd)
+ Service.Restart("iscsid")
ret
end
@@ -921,13 +995,25 @@
ret = true
if Stage.initial
ModuleLoading.Load("iscsi_tcp", "", "", "", false, true)
- # start daemon before
+ # start daemon manually (systemd not available in inst-sys)
startIScsid
else
- @serviceStatus = true if Service.Status("iscsid") == 0
- Builtins.y2milestone("Service status = %1", @serviceStatus)
- # if not enabled, start it manually
- Service.Start("iscsid") if !@serviceStatus
+ # find socket (only in installed system)
+ # raise exception if socket isn't available
+ @iscsid_socket = SystemdSocket.find!("iscsid")
+
+ @serviceStatus = true if Service.Status("iscsi") == 0
+ @socketStatus = true if iscsidSocketActive?
+ Builtins.y2milestone("Status of iscsi.service = %1 iscsid.socket = %2",
+ @serviceStatus, @socketStatus)
+ # if not running, start iscsi.service and iscsid.socket
+ if !@socketStatus
+ Service.Stop("iscsid") if Service.Status("iscsid") == 0
+ Builtins.y2error("Cannot start iscsid.socket") if !iscsidSocketStart
+ end
+ if !@serviceStatus && !Service.Start("iscsi")
+ Builtins.y2error("Cannot start iscsi.service")
+ end
end
ret
end
@@ -935,13 +1021,20 @@
# set startup status of iscsid
def setServiceStatus
ret = true
- # if disabled and no connected targets - stop it
- # otherwise keep it running
- if !GetStartService()
- readSessions
- if Builtins.size(@sessions) == 0
- Builtins.y2milestone("No active sessions - stopping service")
- Service.Stop("iscsid")
+ # only makes sense in installed system
+ if !Stage.initial
+ # if disabled and no connected targets - stop it
+ # otherwise keep it running
+ if !GetStartService()
+ readSessions
+ if Builtins.size(@sessions) == 0
+ Builtins.y2milestone("No active sessions - stopping iscsi
+ service and iscsid service/socket")
+ # stop iscsid.socket and iscsid.service
+ iscsidSocketStop
+ Service.Stop("iscsid")
+ Service.Stop("iscsi")
+ end
end
end
Builtins.y2milestone("Status service for iscsid: %1", ret)
--
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]