Hello community,
here is the log from the commit of package yast2-iscsi-client for
openSUSE:Factory checked in at 2016-03-16 10:26:01
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
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
2016-02-25 22:36:50.000000000 +0100
+++
/work/SRC/openSUSE:Factory/.yast2-iscsi-client.new/yast2-iscsi-client.changes
2016-03-16 10:26:03.000000000 +0100
@@ -1,0 +2,6 @@
+Thu Mar 10 09:19:54 CET 2016 - [email protected]
+
+- show correct error message if host name isn't found (bsc#959292)
+- 3.1.26
+
+-------------------------------------------------------------------
Old:
----
yast2-iscsi-client-3.1.25.tar.bz2
New:
----
yast2-iscsi-client-3.1.26.tar.bz2
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ yast2-iscsi-client.spec ++++++
--- /var/tmp/diff_new_pack.xD3OCT/_old 2016-03-16 10:26:04.000000000 +0100
+++ /var/tmp/diff_new_pack.xD3OCT/_new 2016-03-16 10:26:04.000000000 +0100
@@ -17,7 +17,7 @@
Name: yast2-iscsi-client
-Version: 3.1.25
+Version: 3.1.26
Release: 0
BuildRoot: %{_tmppath}/%{name}-%{version}-build
++++++ yast2-iscsi-client-3.1.25.tar.bz2 -> yast2-iscsi-client-3.1.26.tar.bz2
++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/yast2-iscsi-client-3.1.25/package/yast2-iscsi-client.changes
new/yast2-iscsi-client-3.1.26/package/yast2-iscsi-client.changes
--- old/yast2-iscsi-client-3.1.25/package/yast2-iscsi-client.changes
2016-02-16 11:57:08.000000000 +0100
+++ new/yast2-iscsi-client-3.1.26/package/yast2-iscsi-client.changes
2016-03-10 13:34:43.000000000 +0100
@@ -1,4 +1,10 @@
-------------------------------------------------------------------
+Thu Mar 10 09:19:54 CET 2016 - [email protected]
+
+- show correct error message if host name isn't found (bsc#959292)
+- 3.1.26
+
+-------------------------------------------------------------------
Tue Feb 16 11:28:14 CET 2016 - [email protected]
- fix syntax error in "publish" section of IscsiClientLib.rb
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/yast2-iscsi-client-3.1.25/package/yast2-iscsi-client.spec
new/yast2-iscsi-client-3.1.26/package/yast2-iscsi-client.spec
--- old/yast2-iscsi-client-3.1.25/package/yast2-iscsi-client.spec
2016-02-16 11:57:08.000000000 +0100
+++ new/yast2-iscsi-client-3.1.26/package/yast2-iscsi-client.spec
2016-03-10 13:34:43.000000000 +0100
@@ -17,7 +17,7 @@
Name: yast2-iscsi-client
-Version: 3.1.25
+Version: 3.1.26
Release: 0
BuildRoot: %{_tmppath}/%{name}-%{version}-build
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/yast2-iscsi-client-3.1.25/src/include/iscsi-client/widgets.rb
new/yast2-iscsi-client-3.1.26/src/include/iscsi-client/widgets.rb
--- old/yast2-iscsi-client-3.1.25/src/include/iscsi-client/widgets.rb
2016-02-16 11:57:08.000000000 +0100
+++ new/yast2-iscsi-client-3.1.26/src/include/iscsi-client/widgets.rb
2016-03-10 13:34:43.000000000 +0100
@@ -560,54 +560,51 @@
# do discovery to selected portal
def validateServerLocation(key, event)
- event = deep_copy(event)
- ret = true
ip = Builtins.tostring(UI.QueryWidget(:hostname, :Value))
ip.strip!
+
port = Builtins.tostring(UI.QueryWidget(:port, :Value))
- # validate IP address
- isns_info = IscsiClientLib.useISNS()
+ isns_info = IscsiClientLib.useISNS
+
if !isns_info["use"]
- if Ops.greater_than(Builtins.size(ip), 0)
- if !IP.Check(ip)
- # check for valid host name (take only first line of 'host'
- # output because with IPv6 there might be several lines)
- output = Convert.convert(
- SCR.Execute(
- path(".target.bash_output"),
- "LC_ALL=POSIX host #{ip}|head -1|tr -d '\n'"
- ),
- :from => "any",
- :to => "map <string, any>"
- )
- out = Builtins.splitstring(
- Ops.get_string(output, "stdout", ""),
- " "
- )
- ip = Ops.get(out, Ops.subtract(Builtins.size(out), 1), "")
- Builtins.y2internal("%1", out)
- if Ops.get_integer(output, "exit", -1) == 0
-
- else
- Popup.Error(Ops.get_string(output, "stdout", ""))
- UI.SetFocus(:hostname)
- return false
- end
- elsif IP.Check6(ip)
- ip = "[#{ip}]" # brackets needed around IPv6
- end
- else
+ # validate ip
+ if ip.empty?
Popup.Error(_("Insert the IP address."))
UI.SetFocus(:ip)
return false
end
+ if !IP.Check(ip)
+ # check for valid host name (take only first line of 'host'
+ # output because with IPv6 there might be several lines)
+ result = SCR.Execute( path(".target.bash_output"),
+ "LC_ALL=POSIX host #{ip}|head -1|tr -d '\n'")
+ output = result["stdout"] || ""
+ Builtins.y2milestone("%1", output)
+
+ if (result["exit"] != 0) || output.include?("not found:")
+ Popup.Error(_("Please check IP address resp. host name.\n") +
"#{output}")
+ UI.SetFocus(:hostname)
+ return false
+ elsif !output.empty?
+ ip = output.split(" ").last
+ end
+ end
# validate port number
- if Builtins.size(port) == 0
+ if port.empty?
Popup.Error(_("Insert the port."))
UI.SetFocus(:port)
return false
end
+ else
+ # use iSNS (ip and port already validated in validateISNS)
+ ip = isns_info["address"] || ""
+ port = isns_info["port"] || ""
+ end
+
+ if IP.Check6(ip)
+ ip = "[#{ip}]" # brackets needed around IPv6
end
+
# store old config
IscsiClientLib.getConfig
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/yast2-iscsi-client-3.1.25/src/modules/IscsiClientLib.rb
new/yast2-iscsi-client-3.1.26/src/modules/IscsiClientLib.rb
--- old/yast2-iscsi-client-3.1.25/src/modules/IscsiClientLib.rb 2016-02-16
11:57:08.000000000 +0100
+++ new/yast2-iscsi-client-3.1.26/src/modules/IscsiClientLib.rb 2016-03-10
13:34:43.000000000 +0100
@@ -1663,7 +1663,7 @@
command = "-m discovery -P 1"
isns_info = useISNS()
if isns_info["use"]
- command << " -t isns -p #{isns_info["address"]}:#{isns_info["port"]}"
+ command << " -t isns -p #{ip}:#{port}"
else
ifs = GetDiscIfaces()
Builtins.y2milestone("ifs=%1", ifs)
@@ -1671,16 +1671,7 @@
Builtins.y2milestone("ifs=%1", ifs)
tgt = "st"
tgt = "fw" if use_fw
- command = Ops.add(
- command,
- Builtins.sformat(
- " -t %4 %3 -p %1:%2",
- ip,
- port,
- Builtins.mergestring(ifs, " "),
- tgt
- )
- )
+ command << " -t #{tgt} #{ifs.join(" ")} -p #{ip}:#{port}"
end
command << " -o new" if only_new