Merge lp:~gandelman-a/charms/precise/openstack-dashboard/request_role into lp:~charmers/charms/precise/openstack-dashboard/trunk

Proposed by Adam Gandelman
Status: Merged
Merged at revision: 17
Proposed branch: lp:~gandelman-a/charms/precise/openstack-dashboard/request_role
Merge into: lp:~charmers/charms/precise/openstack-dashboard/trunk
Diff against target: 55 lines (+22/-3)
3 files modified
config.yaml (+6/-0)
hooks/horizon-relations (+15/-2)
revision (+1/-1)
To merge this branch: bzr merge lp:~gandelman-a/charms/precise/openstack-dashboard/request_role
Reviewer Review Type Date Requested Status
charmers Pending
Review via email: mp+143009@code.launchpad.net

Description of the change

The Keystone charm allows remote services to request roles to be created via the identity-service relation. This change adds a new config parameter that ends up in local_settings.py as OPENSTACK_KEYSTONE_DEFAULT_ROLE and is passed along to keystone for creation. This is role is required to exist for some operations in Keystone to function and avoids errors like those described in bug #1064433.

This depends on the following merge for role creation to actually happen on the Keystone side:

https://code.launchpad.net/~gandelman-a/charms/precise/keystone/grizzly/+merge/142429

To post a comment you must log in.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'config.yaml'
--- config.yaml 2012-10-12 17:30:30 +0000
+++ config.yaml 2013-01-12 00:39:28 +0000
@@ -20,3 +20,9 @@
20 description: |20 description: |
21 Directory where application will be accessible, relative to21 Directory where application will be accessible, relative to
22 http://$hostname/.22 http://$hostname/.
23 default-role:
24 default: "Member"
25 type: string
26 description: |
27 Default role for Horizon operations that will be created in
28 Keystone upon introduction of an identity-service relation.
2329
=== modified file 'hooks/horizon-relations'
--- hooks/horizon-relations 2012-11-20 12:52:41 +0000
+++ hooks/horizon-relations 2013-01-12 00:39:28 +0000
@@ -35,8 +35,12 @@
35 # service=None lets keystone know we don't need anything entered35 # service=None lets keystone know we don't need anything entered
36 # into the service catalog. we only really care about getting the36 # into the service catalog. we only really care about getting the
37 # private-address from the relation37 # private-address from the relation
38 relation-set service="None" region="None" public_url="None" \38 local relid="$1"
39 admin_url="None" internal_url="None"39 local rarg=""
40 [[ -n "$relid" ]] && rarg="-r $relid"
41 relation-set $rarg service="None" region="None" public_url="None" \
42 admin_url="None" internal_url="None" \
43 requested_roles="$(config-get default-role)"
40}44}
4145
42function keystone_changed {46function keystone_changed {
@@ -68,6 +72,15 @@
68 >/etc/apache2/conf.d/openstack-dashboard.conf72 >/etc/apache2/conf.d/openstack-dashboard.conf
69 set_or_update LOGIN_URL "$web_root/auth/login"73 set_or_update LOGIN_URL "$web_root/auth/login"
70 set_or_update LOGIN_REDIRECT_URL "$web_root"74 set_or_update LOGIN_REDIRECT_URL "$web_root"
75
76 # Set default role and trigger a identity-service relation event to
77 # ensure role is created in keystone.
78 set_or_update OPENSTACK_KEYSTONE_DEFAULT_ROLE "$(config-get default-role)"
79 local relids="$(relation-ids identity-service)"
80 for relid in $relids ; do
81 keystone_joined "$relid"
82 done
83
71 service apache2 reload84 service apache2 reload
7285
73}86}
7487
=== modified file 'revision'
--- revision 2013-01-11 18:30:45 +0000
+++ revision 2013-01-12 00:39:28 +0000
@@ -1,1 +1,1 @@
120122

Subscribers

People subscribed via source and target branches