From 10cb205fe0556769dc688c9059d8802f49a4ee07 Mon Sep 17 00:00:00 2001 From: Sean McGinnis Date: Fri, 22 Mar 2019 10:23:36 -0500 Subject: [PATCH] Fix lower-constraint deps handling When the lower-constraints tox target was added, it was assumed the install_command was just running the install and that the dependencies and constraints were being set using "deps = ". This fixed the install_command and deps to follow the expected pattern so the lower-constraints job actual does install the lower constraints. Also: * raise the minimum for netifaces as the existing version would fail to load * pin oslo.log to the minimum required by our minimum keystonemiddleware * fix up some error handling for ancient versions of pastedeploy * specify that we shouldn't install xattr on a platform we don't support anyway, because reasons Change-Id: Ie78c0dabe12e01109db2b6412166c3564b87ee96 Signed-off-by: Sean McGinnis --- lower-constraints.txt | 5 +++-- requirements.txt | 14 +++++++------- swift/container/sharder.py | 5 +++-- swift/container/sync.py | 5 +++-- tox.ini | 3 ++- 5 files changed, 18 insertions(+), 14 deletions(-) diff --git a/lower-constraints.txt b/lower-constraints.txt index 8f698ee1ee..2d89f16625 100644 --- a/lower-constraints.txt +++ b/lower-constraints.txt @@ -10,7 +10,7 @@ chardet==3.0.4 cliff==2.11.0 cmd2==0.8.1 coverage==3.6 -cryptography==1.6 +cryptography==1.8.2 debtcollector==1.19.0 dnspython==1.14.0 docutils==0.11 @@ -40,7 +40,7 @@ mock==2.0 monotonic==1.4 msgpack==0.5.6 netaddr==0.7.19 -netifaces==0.5 +netifaces==0.8 nose==1.3.7 nosehtmloutput==0.0.3 nosexcover==1.0.10 @@ -49,6 +49,7 @@ os-api-ref==1.0.0 os-testr==0.8.0 oslo.config==4.0.0 oslo.i18n==3.20.0 +oslo.log==3.22.0 oslo.serialization==2.25.0 oslo.utils==3.36.0 PasteDeploy==1.3.3 diff --git a/requirements.txt b/requirements.txt index df5d26b69a..3e59ee4c1d 100644 --- a/requirements.txt +++ b/requirements.txt @@ -2,15 +2,15 @@ # of appearance. Changing the order has an impact on the overall integration # process, which may cause wedges in the gate later. -dnspython>=1.14.0;python_version=='2.7' # http://www.dnspython.org/LICENSE -eventlet>=0.17.4,!=0.23.0 # MIT +dnspython>=1.14.0;python_version=='2.7' # http://www.dnspython.org/LICENSE +eventlet>=0.17.4,!=0.23.0 # MIT greenlet>=0.3.1 -netifaces>=0.5,!=0.10.0,!=0.10.1 +netifaces>=0.8,!=0.10.0,!=0.10.1 PasteDeploy>=1.3.3 lxml>=3.4.1 -requests>=2.14.2 # Apache-2.0 +requests>=2.14.2 # Apache-2.0 six>=1.9.0 -xattr>=0.4 +xattr>=0.4;sys_platform!='win32' # MIT PyECLib>=1.3.1 # BSD -cryptography!=2.0,>=1.6 # BSD/Apache-2.0 -ipaddress>=1.0.16;python_version<'3.3' # PSF +cryptography!=2.0,>=1.8.2 # BSD/Apache-2.0 +ipaddress>=1.0.16;python_version<'3.3' # PSF diff --git a/swift/container/sharder.py b/swift/container/sharder.py index d5f125968a..c87912e10f 100644 --- a/swift/container/sharder.py +++ b/swift/container/sharder.py @@ -365,8 +365,9 @@ class ContainerSharder(ContainerReplicator): 'Swift Container Sharder', request_tries, allow_modify_pipeline=False) - except IOError as err: - if err.errno != errno.ENOENT: + except (OSError, IOError) as err: + if err.errno != errno.ENOENT and \ + not str(err).endswith(' not found'): raise raise SystemExit( 'Unable to load internal client from config: %r (%s)' % diff --git a/swift/container/sync.py b/swift/container/sync.py index 0f96c496a1..b498b2c2c8 100644 --- a/swift/container/sync.py +++ b/swift/container/sync.py @@ -238,8 +238,9 @@ class ContainerSync(Daemon): try: self.swift = InternalClient( internal_client_conf, 'Swift Container Sync', request_tries) - except IOError as err: - if err.errno != errno.ENOENT: + except (OSError, IOError) as err: + if err.errno != errno.ENOENT and \ + not str(err).endswith(' not found'): raise raise SystemExit( _('Unable to load internal client from config: ' diff --git a/tox.ini b/tox.ini index 613d145499..787f30ce37 100644 --- a/tox.ini +++ b/tox.ini @@ -5,11 +5,12 @@ skipsdist = True [testenv] usedevelop = True -install_command = pip install -c{env:UPPER_CONSTRAINTS_FILE:https://git.openstack.org/cgit/openstack/requirements/plain/upper-constraints.txt} -U {opts} {packages} +install_command = pip install -U {opts} {packages} setenv = VIRTUAL_ENV={envdir} NOSE_WITH_COVERAGE=1 NOSE_COVER_BRANCHES=1 deps = + -c{env:UPPER_CONSTRAINTS_FILE:https://git.openstack.org/cgit/openstack/requirements/plain/upper-constraints.txt} -r{toxinidir}/requirements.txt -r{toxinidir}/test-requirements.txt commands = find . -type f -name "*.py[c|o]" -delete