Hello community, here is the log from the commit of package lio-utils for openSUSE:Factory checked in at 2014-04-02 17:24:44 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/lio-utils (Old) and /work/SRC/openSUSE:Factory/.lio-utils.new (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "lio-utils" Changes: -------- --- /work/SRC/openSUSE:Factory/lio-utils/lio-utils.changes 2014-01-02 11:15:03.000000000 +0100 +++ /work/SRC/openSUSE:Factory/.lio-utils.new/lio-utils.changes 2014-04-02 17:24:46.000000000 +0200 @@ -1,0 +2,8 @@ +Mon Mar 31 16:40:41 CEST 2014 - h...@suse.de + +- Add patch: + * 0024-lio_node-do-not-fail-if-target-port-is-already-disab.patch: + lio_node should not fail if target port is already disabled + (bnc#863284) + +------------------------------------------------------------------- New: ---- 0024-lio_node-do-not-fail-if-target-port-is-already-disab.patch ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ lio-utils.spec ++++++ --- /var/tmp/diff_new_pack.tGC1vT/_old 2014-04-02 17:24:46.000000000 +0200 +++ /var/tmp/diff_new_pack.tGC1vT/_new 2014-04-02 17:24:46.000000000 +0200 @@ -1,7 +1,7 @@ # # spec file for package lio-utils # -# Copyright (c) 2013 SUSE LINUX Products GmbH, Nuernberg, Germany. +# Copyright (c) 2014 SUSE LINUX Products GmbH, Nuernberg, Germany. # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -17,20 +17,20 @@ Summary: Linux-iSCSI.org Target Userspace utils +License: GPL-2.0+ +Group: System/Kernel Name: lio-utils Version: 4.0 Release: 0.<RELEASE7> -Group: System/Kernel Url: http://linux-iscsi.org/index.php/Lio-utils Source: lio-utils-4.0.tar.bz2 Source1: target.service -License: GPL-2.0+ -BuildRequires: net-snmp-devel python-devel +BuildRequires: net-snmp-devel +BuildRequires: python-devel %if 0%{?suse_version} && 0%{?suse_version} <= 1110 %{!?python_sitelib: %global python_sitelib %(python -c "from distutils.sysconfig import get_python_lib; print get_python_lib()")} %endif -AutoReqProv: on Patch1: 0001-Remove-tcm_snap-reference.patch Patch2: 0002-Fixup-paths-for-SLES-11-SP2.patch Patch3: 0003-Add-init-script-for-SUSE.patch @@ -54,6 +54,7 @@ Patch21: 0021-lio_dump-Error-checking-in-startup-script.patch Patch22: 0022-rc.target.suse-Save-configuration-during-shutdown.patch Patch23: 0023-Use-OPTFLAGS-when-compiling.patch +Patch24: 0024-lio_node-do-not-fail-if-target-port-is-already-disab.patch BuildRoot: %{_tmppath}/%{name}-%{version}-build @@ -78,10 +79,10 @@ Nicholas Bellinger <n...@linux-iscsi.org> %package -n lio-mibs -License: GPL-2.0+ Summary: Linux-iSCSI.org Target Userspace utils Group: System/Kernel -Requires: %{name} = %{version} net-snmp +Requires: %{name} = %{version} +Requires: net-snmp %description -n lio-mibs lio-utils provide a simple low-level configuration tool @@ -130,6 +131,7 @@ %patch21 -p1 %patch22 -p1 %patch23 -p1 +%patch24 -p1 %build make %{?_smp_mflags} OPTFLAGS="$RPM_OPT_FLAGS" ++++++ 0024-lio_node-do-not-fail-if-target-port-is-already-disab.patch ++++++ >From 14722ab97272df00c30d7619a74b420659e6ad98 Mon Sep 17 00:00:00 2001 From: Hannes Reinecke <h...@suse.de> Date: Mon, 31 Mar 2014 14:36:02 +0200 Subject: [PATCH] lio_node: do not fail if target port is already disabled When calling 'lio_node --unload' the command should not fail if the target port is already disabled. References: bnc#863284 Signed-off-by: Hannes Reinecke <h...@suse.de> --- lio-py/lio_node.py | 31 ++++++++++++++++++++----------- 1 file changed, 20 insertions(+), 11 deletions(-) diff --git a/lio-py/lio_node.py b/lio-py/lio_node.py index db6b94f..725ee94 100755 --- a/lio-py/lio_node.py +++ b/lio-py/lio_node.py @@ -97,7 +97,6 @@ def lio_alua_process_secondary_md(option, opt_str, value, parser): # LIO-Target endpoint (iqn+tpgt) exists.. lio_alua_check_secondary_md(iqn, tpgt) lio_alua_set_secondary_write_md(iqn, tpgt, lun) - lio_err("Unable to locate ALUA secondary metadata file: " + alua_sec_md_file) return # print "Using alua_sec_md_file: " + alua_sec_md_file @@ -202,10 +201,15 @@ def __lio_target_del_tpg(option, opt_str, value, parser, delete_tpg_md): # This will set TPG Status to INACTIVE force all of the iSCSI sessions for this # tiqn+tpgt tuple to be released. - disable_op = "echo 0 > " + lio_root + "/" + iqn + "/tpgt_" + tpgt + "/enable" - ret = os.system(disable_op) - if ret: - lio_err("Unable to disable TPG: " + iqn + " TPGT: " + tpgt) + enable_path = lio_root + "/" + iqn + "/tpgt_" + tpgt + "/enable" + p = os.open(enable_path, 0); + value = os.read(p, 8) + os.close(p) + if value.rstrip() == "1": + disable_op = "echo 0 > " + enable_path + ret = os.system(disable_op) + if ret: + lio_err("Unable to disable TPG: " + iqn + " TPGT: " + tpgt) np_root = os.listdir(lio_root + "/" + iqn + "/tpgt_" + tpgt + "/np") for np in np_root: @@ -509,12 +513,17 @@ def lio_target_disable_tpg(option, opt_str, value, parser): iqn = iqn.lower(); tpgt = str(value[1]); - disable_op = "echo 0 > " + lio_root + "/" + iqn + "/tpgt_" + tpgt + "/enable" - ret = os.system(disable_op) - if ret: - lio_err("Unable to disable iSCSI Target Portal Group: " + iqn + " " + tpgt) - else: - lio_dbg("Successfully disabled iSCSI Target Portal Group: " + iqn + " " + tpgt) + enable_path = lio_root + "/" + iqn + "/tpgt_" + tpgt + "/enable" + p = os.open(enable_path, 0) + value = os.read(p, 8) + os.close(p) + if value.rstrip() == "1": + disable_op = "echo 0 > " + enable_path + ret = os.system(disable_op) + if ret: + lio_err("Unable to disable iSCSI Target Portal Group: " + iqn + " " + tpgt) + else: + lio_dbg("Successfully disabled iSCSI Target Portal Group: " + iqn + " " + tpgt) return -- 1.8.1.4 -- To unsubscribe, e-mail: opensuse-commit+unsubscr...@opensuse.org For additional commands, e-mail: opensuse-commit+h...@opensuse.org