Upgrade python-keystoneauth1 to 3.13.0

Issue:
   'rate_limit' error when executing openstack network commands.
Failure was tracked to a failure to satisfy the lower-constraints.txt
of openstacksdk, keystoneauth1==3.13.0.  We currently only provide
python2-keystoneauth1-3.10.0-1.el7.noarch.rpm.

Solution:
    Investigation showed that there is currently no centos rpm
providing python2-keystoneauth1-3.13.0 or better.  Solution
is to build python2-keystoneauth1-3.13.1 from openstack's git.
We can revert to a downloaded rpm when one becomes available.

Note:
    I'm taking this opportunity to clean up stale patches
that pre-date python2-keystoneauth1-3.10.0.  None of these
where in use.

Closes-Bug: 1819020
Change-Id: Ie2300f352dffc2fc87fbc84a9fc98d2a4e9484d4
Depends-On: I715ee3f05dacaa320083dd40c2b23f0f599b910e
Signed-off-by: Scott Little <scott.little@windriver.com>
This commit is contained in:
Scott Little 2019-03-07 13:10:06 -05:00
parent 53cfbc9f06
commit eb6883ff55
12 changed files with 187 additions and 225 deletions

View File

@ -25,6 +25,7 @@ openstack/python-heat/wrs-heat-template
openstack/python-heatclient
openstack/python-horizon
openstack/python-keystone
openstack/python-keystoneauth1
openstack/python-keystoneclient
openstack/python-networking-bgpvpn
openstack/python-networking-sfc

View File

@ -1 +1,5 @@
TIS_PATCH_VER=5
TAR_NAME=keystoneauth1
SRC_DIR="$CGCS_BASE/git/python-keystoneauth"
TIS_BASE_SRCREV=bde07bc95b5b5d16b829f72be7aaa62fab9d716a
TIS_PATCH_VER=GITREVCOUNT+0

View File

@ -1,27 +0,0 @@
From 6326d77cf992363766099fc4a8405ec1deac082e Mon Sep 17 00:00:00 2001
From: Scott Little <scott.little@windriver.com>
Date: Mon, 20 Mar 2017 09:21:36 -0400
Subject: [PATCH 4/4] WRS: 0001-Update-package-versioning-for-TIS-format.patch
Conflicts:
SPECS/python-keystoneauth1.spec
---
SPECS/python-keystoneauth1.spec | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/SPECS/python-keystoneauth1.spec b/SPECS/python-keystoneauth1.spec
index b97182b..d0c26a0 100644
--- a/SPECS/python-keystoneauth1.spec
+++ b/SPECS/python-keystoneauth1.spec
@@ -8,7 +8,7 @@
Name: python-%{pypi_name}
Version: 3.1.0
-Release: 1%{?dist}
+Release: 1.el7%{?_tis_dist}.%{tis_patch_ver}
Summary: Authentication Library for OpenStack Clients
License: ASL 2.0
URL: https://pypi.io/pypi/%{pypi_name}
--
1.8.3.1

View File

@ -1,26 +0,0 @@
From ef9e70e4a52b958bbc88c148cb3c4c9d18030b7d Mon Sep 17 00:00:00 2001
From: Scott Little <scott.little@windriver.com>
Date: Mon, 20 Mar 2017 09:21:36 -0400
Subject: [PATCH 1/4] WRS: meta-fix-neutron-error-not-shown-to-user.patch
---
SPECS/python-keystoneauth1.spec | 3 +++
1 file changed, 3 insertions(+)
diff --git a/SPECS/python-keystoneauth1.spec b/SPECS/python-keystoneauth1.spec
index ff1673b..fb9e8e1 100644
--- a/SPECS/python-keystoneauth1.spec
+++ b/SPECS/python-keystoneauth1.spec
@@ -14,6 +14,9 @@ License: ASL 2.0
URL: https://pypi.io/pypi/%{pypi_name}
Source0: https://tarballs.openstack.org/keystoneauth/keystoneauth1-%{upstream_version}.tar.gz
+# WRS
+Patch0001: fix-neutron-error-not-shown-to-user.patch
+
BuildArch: noarch
%description
--
1.8.3.1

View File

@ -1,55 +0,0 @@
From 8777fc48e9b3e2086e6a68eb3601bde8ec927d6b Mon Sep 17 00:00:00 2001
From: Scott Little <scott.little@windriver.com>
Date: Mon, 20 Mar 2017 09:21:36 -0400
Subject: [PATCH 2/4] WRS: 0002-meta-spec-remote-client.patch
---
SPECS/python-keystoneauth1.spec | 14 ++++++++++++++
1 file changed, 14 insertions(+)
diff --git a/SPECS/python-keystoneauth1.spec b/SPECS/python-keystoneauth1.spec
index fb9e8e1..dad6758 100644
--- a/SPECS/python-keystoneauth1.spec
+++ b/SPECS/python-keystoneauth1.spec
diff --git a/SPECS/python-keystoneauth1.spec b/SPECS/python-keystoneauth1.spec
index 91968cc..578cc19 100644
--- a/SPECS/python-keystoneauth1.spec
+++ b/SPECS/python-keystoneauth1.spec
@@ -116,6 +116,12 @@ BuildRequires: python-fixtures
%description doc
Documentation for OpenStack Identity Authentication Library
+%package sdk
+Summary: SDK files for %{name}
+
+%description sdk
+Contains SDK files for %{name} package
+
%prep
%autosetup -n %{pypi_name}-%{upstream_version} -S git
@@ -142,6 +148,11 @@ rm -rf %{pypi_name}.egg-info
%{__python} setup.py build_sphinx -b html
rm -rf doc/build/html/.buildinfo
+
+# install SDK package
+mkdir -p %{buildroot}/usr/share/remote-clients
+tar zcf %{buildroot}/usr/share/remote-clients/%{name}-%{version}.tgz --exclude='.gitignore' --exclude='.gitreview' --transform="s/keystoneauth1-%{version}/%{name}-%{version}/" -C .. keystoneauth1-%{version}
+
%check
%{__python2} setup.py testr
%if 0%{?with_python3}
@@ -168,6 +179,9 @@ rm -rf .testrepository
%license LICENSE
%doc doc/build/html
+%files sdk
+/usr/share/remote-clients/%{name}-%{version}.tgz
+
%changelog
* Fri Aug 11 2017 Alfredo Moralejo <amoralej@redhat.com> 3.1.0-1
- Update to 3.1.0
--
1.8.3.1

View File

@ -1,25 +0,0 @@
From b7378bf717a0930e2e57be89572b05a5da7cd2f2 Mon Sep 17 00:00:00 2001
From: Scott Little <scott.little@windriver.com>
Date: Mon, 20 Mar 2017 09:21:36 -0400
Subject: [PATCH 3/4] WRS: meta-dont-remove-requirements-txt.patch
---
SPECS/python-keystoneauth1.spec | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/SPECS/python-keystoneauth1.spec b/SPECS/python-keystoneauth1.spec
index dad6758..b97182b 100644
--- a/SPECS/python-keystoneauth1.spec
+++ b/SPECS/python-keystoneauth1.spec
@@ -128,7 +128,7 @@ Contains SDK files for %{name} package
sed -i '/sphinx.ext.intersphinx.*$/d' doc/source/conf.py
# Let RPM handle the dependencies
-rm -rf {test-,}requirements.txt
+rm -rf test-requirements.txt
# Remove bundled egg-info
rm -rf %{pypi_name}.egg-info
--
1.8.3.1

View File

@ -1,25 +0,0 @@
From 927307745579900e1f207a0df8b715a19fb36407 Mon Sep 17 00:00:00 2001
From: Kam Nasim <kam.nasim@windriver.com>
Date: Wed, 13 Dec 2017 18:59:08 -0500
Subject: [PATCH] meta patch for ignoring unexpected arguments to token auth
plugin
---
SPECS/python-keystoneauth1.spec | 1 +
1 file changed, 1 insertion(+)
diff --git a/SPECS/python-keystoneauth1.spec b/SPECS/python-keystoneauth1.spec
index 2375ec7..818488b 100644
--- a/SPECS/python-keystoneauth1.spec
+++ b/SPECS/python-keystoneauth1.spec
@@ -16,6 +16,7 @@ Source0: https://tarballs.openstack.org/keystoneauth/keystoneauth1-%{upstream
# WRS
Patch0001: fix-neutron-error-not-shown-to-user.patch
+Patch0002: ignore-unexpected-arguments-to-token-auth-plugin.patch
BuildArch: noarch
--
1.8.3.1

View File

@ -1,5 +0,0 @@
0001-Update-package-versioning-for-TIS-format.patch
0002-meta-fix-neutron-error-not-shown-to-user.patch
0003-meta-spec-remote-client.patch
0004-meta-dont-remove-requirements-txt.patch
0005-meta-ignore-unexpected-arguments-to-token-plugin.patch

View File

@ -1,31 +0,0 @@
From 4fe0798dc5f1457b19fe43361d5a1b235bd7a6a6 Mon Sep 17 00:00:00 2001
From: rpm-build <rpm-build>
Date: Thu, 25 Aug 2016 10:54:38 -0400
Subject: [PATCH 1/1] US80213:Support for the openstack CLI command Fixed
an issue where neutron error response message was not fully propagating
through to the user
---
keystoneauth1/exceptions/http.py | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/keystoneauth1/exceptions/http.py b/keystoneauth1/exceptions/http.py
index 6f725ed..0265575 100644
--- a/keystoneauth1/exceptions/http.py
+++ b/keystoneauth1/exceptions/http.py
@@ -415,6 +415,12 @@ def from_response(response, method, url):
error = body["error"]
kwargs["message"] = error.get("message")
kwargs["details"] = error.get("details")
+ # Neutron error response has "NeutronError" instead of "error" in the body
+ # This block ensures the error response is correctly constructed into an exception object
+ elif isinstance(body, dict) and isinstance(body.get("NeutronError"), dict):
+ error = body["NeutronError"]
+ kwargs["message"] = error.get("message")
+ kwargs["details"] = error.get("details")
elif content_type.startswith("text/"):
kwargs["details"] = response.text
--
1.8.3.1

View File

@ -1,29 +0,0 @@
From 559c134057501228adb585cc85ae0cac84cc450b Mon Sep 17 00:00:00 2001
From: rpm-build <rpm-build>
Date: Wed, 13 Dec 2017 18:53:18 -0500
Subject: [PATCH] ignore unexpected arguments to token auth plugin
When creating the token auth plugin, for authentication via token, extra
arguments might get passed in by the application that the auth plugin
doesn't care about. This will cause a TypeError due to unexpected
keyword arguments. These extra arguments should just be ignored instead
---
keystoneauth1/token_endpoint.py | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/keystoneauth1/token_endpoint.py b/keystoneauth1/token_endpoint.py
index 675d4c1..0a2f160 100644
--- a/keystoneauth1/token_endpoint.py
+++ b/keystoneauth1/token_endpoint.py
@@ -20,7 +20,7 @@ class Token(plugin.BaseAuthPlugin):
have a known endpoint and admin token that you want to use.
"""
- def __init__(self, endpoint, token):
+ def __init__(self, endpoint, token, **kwargs):
# NOTE(jamielennox): endpoint is reserved for when plugins
# can be used to provide that information
self.endpoint = endpoint
--
1.8.3.1

View File

@ -0,0 +1,181 @@
%global pypi_name keystoneauth1
%global common_desc \
Keystoneauth provides a standard way to do authentication and service requests \
within the OpenStack ecosystem. It is designed for use in conjunction with \
the existing OpenStack clients and for simplifying the process of writing \
new clients.
%if 0%{?fedora} >= 24
%global with_python3 1
%endif
%{!?upstream_version: %global upstream_version %{version}%{?milestone}}
Name: python-%{pypi_name}
Version: 3.13.1
Release: 1%{?_tis_dist}.%{tis_patch_ver}
Summary: Authentication Library for OpenStack Clients
License: ASL 2.0
URL: https://pypi.io/pypi/%{pypi_name}
Source0: https://tarballs.openstack.org/keystoneauth/keystoneauth1-%{upstream_version}.tar.gz
BuildArch: noarch
%description
%{common_desc}
%package -n python2-%{pypi_name}
Summary: Authentication Libarary for OpenStack Identity
%{?python_provide:%python_provide python2-%{pypi_name}}
%{?python_provide:%python_provide python2-keystoneauth}
BuildRequires: git
BuildRequires: python2-devel
BuildRequires: python2-setuptools
BuildRequires: python2-six
BuildRequires: python2-pbr >= 2.0.0
# test requires
BuildRequires: python2-betamax >= 0.7.0
BuildRequires: python2-fixtures >= 1.3.1
BuildRequires: python2-oslotest
BuildRequires: python2-oslo-utils
BuildRequires: python2-os-testr
BuildRequires: python2-oauthlib
%if 0%{?fedora} || 0%{?rhel} > 7
BuildRequires: python2-pyyaml
BuildRequires: python2-lxml
BuildRequires: python2-requests-kerberos
BuildRequires: python2-requests-mock >= 1.1
%else
BuildRequires: PyYAML
BuildRequires: python-lxml
BuildRequires: python-requests-kerberos
BuildRequires: python-requests-mock >= 1.1
%endif
Requires: python2-iso8601 >= 0.1.11
Requires: python2-os-service-types >= 1.2.0
Requires: python2-pbr >= 2.0.0
Requires: python2-requests >= 2.14.2
Requires: python2-six => 1.10.0
Requires: python2-stevedore >= 1.20.0
%description -n python2-%{pypi_name}
%{common_desc}
%if 0%{?with_python3}
%package -n python3-%{pypi_name}
Summary: Authentication Libarary for OpenStack Identity
Provides: python3-keystoneauth = %{version}-%{release}
%{?python_provide:%python_provide python3-%{pypi_name}}
BuildRequires: python3-devel
BuildRequires: python3-setuptools
BuildRequires: python3-pbr >= 2.0.0
BuildRequires: python3-sphinx
# test requres
BuildRequires: python3-betamax >= 0.7.0
BuildRequires: python3-fixtures >= 1.3.1
BuildRequires: python3-lxml
BuildRequires: python3-requests-mock >= 1.1
BuildRequires: python3-oslotest
BuildRequires: python3-oslo-utils
BuildRequires: python3-os-testr
BuildRequires: python3-oauthlib
BuildRequires: python3-PyYAML
Requires: python3-iso8601 >= 0.1.11
Requires: python3-os-service-types
Requires: python3-pbr >= 2.0.0
Requires: python3-requests >= 2.14.2
Requires: python3-six => 1.10.0
Requires: python3-stevedore >= 1.20.0
%description -n python3-%{pypi_name}
%{common_desc}
%endif
%package doc
Summary: Documentation for OpenStack Identity Authentication Library
BuildRequires: python2-sphinx
BuildRequires: python2-openstackdocstheme
BuildRequires: python2-mock
BuildRequires: python2-requests
BuildRequires: python2-mox3
BuildRequires: python2-oslo-config
BuildRequires: python2-os-service-types
BuildRequires: python2-stevedore
BuildRequires: python2-iso8601
BuildRequires: python2-fixtures
%if 0%{?fedora} || 0%{?rhel} > 7
BuildRequires: python2-pep8
%else
BuildRequires: python-pep8
%endif
%description doc
Documentation for OpenStack Identity Authentication Library
%prep
%autosetup -n %{pypi_name}-%{upstream_version} -S git
sed -i '/sphinx.ext.intersphinx.*$/d' doc/source/conf.py
# Let RPM handle the dependencies
rm -rf {test-,}requirements.txt
# Remove bundled egg-info
rm -rf %{pypi_name}.egg-info
%build
%py2_build
%if 0%{?with_python3}
%py3_build
%endif
%install
%py2_install
%if 0%{?with_python3}
%py3_install
%endif
# generate html docs
%{__python} setup.py build_sphinx -b html
rm -rf doc/build/html/.buildinfo
# %check
# %{__python2} /usr/bin/ostestr
# %if 0%{?with_python3}
# # cleanup testrepository
# rm -rf .testrepository
# %{__python3} /usr/bin/ostestr
# %endif
%files -n python2-%{pypi_name}
%doc README.rst
%license LICENSE
%{python2_sitelib}/%{pypi_name}
%{python2_sitelib}/*.egg-info
%if 0%{?with_python3}
%files -n python3-%{pypi_name}
%doc README.rst
%license LICENSE
%{python3_sitelib}/%{pypi_name}
%{python3_sitelib}/*.egg-info
%endif
%files doc
%license LICENSE
%doc doc/build/html
%changelog
* Tue Mar 07 2019 <scott.little@windriver.com> 3.13.1
- Update to 3.13.1
* Tue Aug 07 2018 RDO <dev@lists.rdoproject.org> 3.10.0-1
- Update to 3.10.0

View File

@ -1 +0,0 @@
mirror:Source/python-keystoneauth1-3.1.0-1.el7.src.rpm