update to 2.1.fb14-1

Signed-off-by: Andy Grover <agrover@redhat.com>
This commit is contained in:
Andy Grover 2012-05-30 20:30:44 -07:00
parent e7fb19a164
commit d47eefff32
4 changed files with 62 additions and 4 deletions

1
.gitignore vendored
View File

@ -12,3 +12,4 @@
/v2.1.fb11 /v2.1.fb11
/v2.1.fb12 /v2.1.fb12
/v2.1.fb13 /v2.1.fb13
/rtslib-fb-2.1.fb14.tar.gz

View File

@ -0,0 +1,50 @@
commit ff8f663b0f29995d3c01fd68e5388979f9f344d9
Author: Andy Grover <agrover@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@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

View File

@ -4,10 +4,11 @@ Name: python-rtslib
License: AGPLv3 License: AGPLv3
Group: System Environment/Libraries Group: System Environment/Libraries
Summary: API for RisingTide Systems generic SCSI target Summary: API for RisingTide Systems generic SCSI target
Version: 2.1.fb13 Version: 2.1.fb14
Release: 1%{?dist} Release: 1%{?dist}
URL: https://github.com/agrover/rtslib-fb/ 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) BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
BuildArch: noarch BuildArch: noarch
BuildRequires: python-ipaddr python-ethtool python-configobj python-devel epydoc 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. kernel target.
%prep %prep
%setup -q -n agrover-%{oname}-01451a9 %setup -q -n %{oname}-%{version}
%patch1 -p1
%build %build
%{__python} setup.py build %{__python} setup.py build
@ -54,6 +56,11 @@ rm -rf %{buildroot}
%doc doc/html %doc doc/html
%changelog %changelog
* Wed May 30 2012 Andy Grover <agrover@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@redhat.com> - 2.1.fb13-1 * Mon Apr 9 2012 Andy Grover <agrover@redhat.com> - 2.1.fb13-1
- New upstream release - New upstream release

View File

@ -1 +1 @@
270141478ca137ba093b1a09ec221ffb v2.1.fb13 f112c4ee19856f794226135a89aa4024 rtslib-fb-2.1.fb14.tar.gz