From c0700ff6d38404fb8f33e4b79f6a754e4afbe8cd Mon Sep 17 00:00:00 2001 From: Andy Grover Date: Thu, 28 Jun 2012 13:40:35 -0700 Subject: [PATCH] Update to 2.1.fb17-1 Signed-off-by: Andy Grover --- .gitignore | 1 + python-rtslib-retry-target-creation.patch | 50 ----------------------- python-rtslib.spec | 9 ++-- sources | 2 +- 4 files changed, 8 insertions(+), 54 deletions(-) delete mode 100644 python-rtslib-retry-target-creation.patch diff --git a/.gitignore b/.gitignore index 91c40ef..e56fc3e 100644 --- a/.gitignore +++ b/.gitignore @@ -14,3 +14,4 @@ /v2.1.fb13 /rtslib-fb-2.1.fb14.tar.gz /rtslib-fb-2.1.fb15.tar.gz +/rtslib-fb-2.1.fb17.tar.gz diff --git a/python-rtslib-retry-target-creation.patch b/python-rtslib-retry-target-creation.patch deleted file mode 100644 index 19a4223..0000000 --- a/python-rtslib-retry-target-creation.patch +++ /dev/null @@ -1,50 +0,0 @@ -commit ff8f663b0f29995d3c01fd68e5388979f9f344d9 -Author: Andy Grover -Date: Fri May 25 08:04:07 2012 -0700 - - retry target creation - - For bz 815981, fcoe may not be fully initialized before fcoe-target - restore, so give them 60 seconds to show up. - - Signed-off-by: Andy Grover - -diff --git a/rtslib/target.py b/rtslib/target.py -index 62d4169..a8a2062 100644 ---- a/rtslib/target.py -+++ b/rtslib/target.py -@@ -1284,6 +1284,8 @@ class TPG(CFSNode): - return d - - -+target_timeout = 60 -+ - class Target(CFSNode): - ''' - This is an interface to Targets in configFS. -@@ -1377,9 +1379,22 @@ class Target(CFSNode): - Returns how many recoverable errors happened. - ''' - -- try: -- t_obj = Target(fm_obj, t.get('wwn')) -- except RTSLibError: -+ # HACK: Give FCoE interfaces time to show up -+ # HACK2: Make timeout global so we don't end up waiting -+ # target_timeout * num_failing_targets -+ global target_timeout -+ per_try = 5 -+ t_obj = None -+ while target_timeout > 0: -+ try: -+ t_obj = Target(fm_obj, t.get('wwn')) -+ break -+ except RTSLibError: -+ pass -+ import time -+ time.sleep(per_try) -+ target_timeout -= per_try -+ if not t_obj: - return 1 - - errors = 0 diff --git a/python-rtslib.spec b/python-rtslib.spec index 6cd6b19..d88a923 100644 --- a/python-rtslib.spec +++ b/python-rtslib.spec @@ -4,11 +4,10 @@ Name: python-rtslib License: AGPLv3 Group: System Environment/Libraries Summary: API for RisingTide Systems generic SCSI target -Version: 2.1.fb15 +Version: 2.1.fb17 Release: 1%{?dist} URL: https://github.com/agrover/rtslib-fb/ Source: https://github.com/downloads/agrover/%{oname}/%{oname}-%{version}.tar.gz -Patch1: %{name}-retry-target-creation.patch BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) BuildArch: noarch BuildRequires: python-ipaddr python-ethtool python-configobj python-devel epydoc @@ -29,7 +28,6 @@ kernel target. %prep %setup -q -n %{oname}-%{version} -%patch1 -p1 %build %{__python} setup.py build @@ -56,6 +54,11 @@ rm -rf %{buildroot} %doc doc/html %changelog +* Thu Jun 28 2012 Andy Grover - 2.1.fb17-1 +- New upstream release +- Remove patch retry-target-creation.patch, upstream has alternate + fix. + * Tue Jun 12 2012 Andy Grover - 2.1.fb15-1 - New upstream release diff --git a/sources b/sources index f5c00c3..fbd47bf 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -9472fa3d0ada97268abaad0aefe4d7ef rtslib-fb-2.1.fb15.tar.gz +6c2de891f476c9463acf7103d8052339 rtslib-fb-2.1.fb17.tar.gz