[python-rtslib] update to 2.1.fb14-1
Andy Grover
grover at fedoraproject.org
Thu May 31 03:34:33 UTC 2012
commit d47eefff3213f8ab0a46efa637abd51308b60acc
Author: Andy Grover <agrover at redhat.com>
Date: Wed May 30 20:30:44 2012 -0700
update to 2.1.fb14-1
Signed-off-by: Andy Grover <agrover at redhat.com>
.gitignore | 1 +
python-rtslib-retry-target-creation.patch | 50 +++++++++++++++++++++++++++++
python-rtslib.spec | 13 ++++++--
sources | 2 +-
4 files changed, 62 insertions(+), 4 deletions(-)
---
diff --git a/.gitignore b/.gitignore
index 3a50563..aca61d1 100644
--- a/.gitignore
+++ b/.gitignore
@@ -12,3 +12,4 @@
/v2.1.fb11
/v2.1.fb12
/v2.1.fb13
+/rtslib-fb-2.1.fb14.tar.gz
diff --git a/python-rtslib-retry-target-creation.patch b/python-rtslib-retry-target-creation.patch
new file mode 100644
index 0000000..19a4223
--- /dev/null
+++ b/python-rtslib-retry-target-creation.patch
@@ -0,0 +1,50 @@
+commit ff8f663b0f29995d3c01fd68e5388979f9f344d9
+Author: Andy Grover <agrover at redhat.com>
+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 <agrover at redhat.com>
+
+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 eaff5f8..c993a62 100644
--- a/python-rtslib.spec
+++ b/python-rtslib.spec
@@ -4,10 +4,11 @@ Name: python-rtslib
License: AGPLv3
Group: System Environment/Libraries
Summary: API for RisingTide Systems generic SCSI target
-Version: 2.1.fb13
+Version: 2.1.fb14
Release: 1%{?dist}
URL: https://github.com/agrover/rtslib-fb/
-Source: https://github.com/agrover/%{oname}/tarball/v%{version}
+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
@@ -27,7 +28,8 @@ API documentation for rtslib, to configure the generic Linux SCSI
kernel target.
%prep
-%setup -q -n agrover-%{oname}-01451a9
+%setup -q -n %{oname}-%{version}
+%patch1 -p1
%build
%{__python} setup.py build
@@ -54,6 +56,11 @@ rm -rf %{buildroot}
%doc doc/html
%changelog
+* Wed May 30 2012 Andy Grover <agrover at redhat.com> - 2.1.fb14-1
+- Update Source URL to proper tarball
+- Add patch retry-target-creation.patch
+- New upstream release
+
* Mon Apr 9 2012 Andy Grover <agrover at redhat.com> - 2.1.fb13-1
- New upstream release
diff --git a/sources b/sources
index 6e23be4..317f998 100644
--- a/sources
+++ b/sources
@@ -1 +1 @@
-270141478ca137ba093b1a09ec221ffb v2.1.fb13
+f112c4ee19856f794226135a89aa4024 rtslib-fb-2.1.fb14.tar.gz
More information about the scm-commits
mailing list