[os-cloud-config] Update to upstream 0.1.10
slagle
slagle at fedoraproject.org
Mon Sep 29 22:29:49 UTC 2014
commit f47bd79fcc1ee02543eb1e0baf98059844e8ce50
Author: James Slagle <jslagle at redhat.com>
Date: Mon Sep 29 18:29:38 2014 -0400
Update to upstream 0.1.10
.gitignore | 1 +
0001-Do-not-create-the-_member_-role.patch | 113 ++++++++++++++++++++++++++++
os-cloud-config.spec | 9 ++-
sources | 2 +-
4 files changed, 123 insertions(+), 2 deletions(-)
---
diff --git a/.gitignore b/.gitignore
index 01772a3..e691af4 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,2 +1,3 @@
/os-cloud-config-0.1.8.tar.gz
/os-cloud-config-0.1.9.tar.gz
+/os-cloud-config-0.1.10.tar.gz
diff --git a/0001-Do-not-create-the-_member_-role.patch b/0001-Do-not-create-the-_member_-role.patch
new file mode 100644
index 0000000..63580ba
--- /dev/null
+++ b/0001-Do-not-create-the-_member_-role.patch
@@ -0,0 +1,113 @@
+From 26e140d62b8035197184a640ac0452d1c8aaec12 Mon Sep 17 00:00:00 2001
+From: James Slagle <jslagle at redhat.com>
+Date: Fri, 26 Sep 2014 16:18:12 -0400
+Subject: [PATCH] Do not create the _member_ role
+
+Keystone will automatically create the _member_ role if it does not
+exist, so there's no need to do it in os-cloud-config. Further,
+explicitly creating it will cause an issue when you go to create the
+first user in Keystone.
+
+Keystone will try to add the user to the _member_ role, but use the
+default *id*:
+http://git.openstack.org/cgit/openstack/keystone/tree/keystone/assignment/core.py#n261
+
+Since os-cloud-config has precreated the role, it has a different id, so
+then when Keystone will try and create _member_ again, and failing with
+a duplicate entry.
+
+This change was introduced in os-cloud-config via commit:
+Ia4d965335f900e03465f45c701f0bd5a3a4a0ea6
+
+Instead of just reverting that commit, I figured we could remove the
+_member_ role creation entirely.
+
+We aren't seeing this failure scenario in CI, because we haven't had a
+os-cloud-config release in a while apparently and we don't use
+os-cloud-config from git (for better or worse).
+
+Change-Id: Iaa05c71173140e68e47357ac8a9ab3fdb276c838
+
+Conflicts:
+ os_cloud_config/cmd/init_keystone.py
+ os_cloud_config/keystone.py
+ os_cloud_config/tests/test_keystone.py
+---
+ doc/source/usage.rst | 8 ++++----
+ os_cloud_config/cmd/init_keystone.py | 7 +++----
+ os_cloud_config/keystone.py | 1 -
+ os_cloud_config/tests/test_keystone.py | 5 -----
+ 4 files changed, 7 insertions(+), 14 deletions(-)
+
+diff --git a/doc/source/usage.rst b/doc/source/usage.rst
+index 859c29f..ee8e64d 100644
+--- a/doc/source/usage.rst
++++ b/doc/source/usage.rst
+@@ -10,10 +10,10 @@ To use os-cloud-config in a project::
+ Initializing Keystone for a host
+ -----------------------------------
+
+-The init-keystone command line utility initializes Keystone for use with
+-normal authentication by creating the admin and service tenants, the admin
+-and Member roles, the admin user, configure certificates and finally
+-registers the initial identity endpoint.
++The init-keystone command line utility initializes Keystone for use with normal
++authentication by creating the admin and service tenants, the admin role, the
++admin user, configure certificates and finally registers the initial identity
++endpoint.
+
+ .. note::
+
+diff --git a/os_cloud_config/cmd/init_keystone.py b/os_cloud_config/cmd/init_keystone.py
+index c82877a..3e54726 100644
+--- a/os_cloud_config/cmd/init_keystone.py
++++ b/os_cloud_config/cmd/init_keystone.py
+@@ -24,10 +24,9 @@ def parse_args():
+ description = textwrap.dedent("""
+ Perform initial setup of keystone for a new cloud.
+
+- This will create the admin and service tenants, the admin and Member
+- roles, the admin user, configure certificates and finally register the
+- initial identity endpoint, after which Keystone may be used with normal
+- authentication.
++ This will create the admin and service tenants, the admin role, the admin
++ user, configure certificates and finally register the initial identity
++ endpoint, after which Keystone may be used with normal authentication.
+
+ This command will wait for a user-specified amount of time for a Keystone
+ service to be running on the specified host. The default is a 10 minute
+diff --git a/os_cloud_config/keystone.py b/os_cloud_config/keystone.py
+index 62137ba..59140d9 100644
+--- a/os_cloud_config/keystone.py
++++ b/os_cloud_config/keystone.py
+@@ -395,7 +395,6 @@ def _create_roles(keystone, timeout=600, poll_interval=10):
+ LOG.debug('Unable to create, sleeping for %d seconds.'
+ % poll_interval)
+ time.sleep(poll_interval)
+- _create_role(keystone, 'Member')
+
+
+ def _create_tenants(keystone):
+diff --git a/os_cloud_config/tests/test_keystone.py b/os_cloud_config/tests/test_keystone.py
+index 7b5b515..085c964 100644
+--- a/os_cloud_config/tests/test_keystone.py
++++ b/os_cloud_config/tests/test_keystone.py
+@@ -50,9 +50,6 @@ class KeystoneTest(base.TestCase):
+ keystone.initialize(
+ '192.0.0.3', 'mytoken', 'admin at example.org', 'adminpasswd')
+
+- self.client.roles.create.assert_has_calls(
+- [mock.call('admin'), mock.call('Member')])
+-
+ self.client.tenants.create.assert_has_calls(
+ [mock.call('admin', None), mock.call('service', None)])
+
+@@ -240,8 +237,6 @@ class KeystoneTest(base.TestCase):
+
+ keystone._create_roles(self.client)
+ sleep.assert_has_calls([mock.call(10), mock.call(10)])
+- self.client.roles.create.assert_has_calls(
+- [mock.call('admin'), mock.call('Member')])
+
+ def test_setup_endpoints(self):
+ self.client = mock.MagicMock()
diff --git a/os-cloud-config.spec b/os-cloud-config.spec
index 666f1ed..ecd8847 100644
--- a/os-cloud-config.spec
+++ b/os-cloud-config.spec
@@ -1,5 +1,5 @@
Name: os-cloud-config
-Version: 0.1.9
+Version: 0.1.10
Release: 1%{?dist}
Summary: Configuration for OpenStack clouds
@@ -7,6 +7,8 @@ License: ASL 2.0
URL: http://pypi.python.org/pypi/%{name}
Source0: http://tarballs.openstack.org/%{name}/%{name}-%{version}.tar.gz
+Patch0001: 0001-Do-not-create-the-_member_-role.patch
+
BuildArch: noarch
BuildRequires: python-setuptools
BuildRequires: python2-devel
@@ -28,6 +30,8 @@ configuration of OpenStack clouds.
%prep
%setup -q -n %{name}-%{version}
+%patch0001 -p1
+
#
# patches_base: 0.1.9
#
@@ -49,6 +53,9 @@ configuration of OpenStack clouds.
%{_bindir}/setup-neutron
%changelog
+* Mon Sep 29 2014 James Slagle <jslagle at redhat.com> 0.1.10-1
+- Update to upstream 0.1.10
+
* Fri Sep 12 2014 James Slagle <jslagle at redhat.com> - 0.1.9-1
- Setup for rdopkg
- Bump to 0.1.9
diff --git a/sources b/sources
index 5b7b10f..2a548bd 100644
--- a/sources
+++ b/sources
@@ -1 +1 @@
-1fe84193f96a54095a7adbfa9c3e4c95 os-cloud-config-0.1.9.tar.gz
+aac3d17c08d31f95b105cefbe24a5277 os-cloud-config-0.1.10.tar.gz
More information about the scm-commits
mailing list