Merge lp:~hopem/charms/trusty/cinder/pki-token-support into lp:~openstack-charmers-archive/charms/trusty/cinder/next

Proposed by Edward Hope-Morley
Status: Merged
Merged at revision: 77
Proposed branch: lp:~hopem/charms/trusty/cinder/pki-token-support
Merge into: lp:~openstack-charmers-archive/charms/trusty/cinder/next
Diff against target: 123 lines (+48/-11)
5 files modified
hooks/charmhelpers/contrib/openstack/context.py (+28/-9)
hooks/charmhelpers/contrib/openstack/templates/zeromq (+14/-0)
hooks/cinder_hooks.py (+1/-0)
hooks/cinder_utils.py (+3/-1)
templates/icehouse/cinder.conf (+2/-1)
To merge this branch: bzr merge lp:~hopem/charms/trusty/cinder/pki-token-support
Reviewer Review Type Date Requested Status
Liam Young (community) Approve
Review via email: mp+250170@code.launchpad.net
To post a comment you must log in.
Revision history for this message
uosci-testing-bot (uosci-testing-bot) wrote :

charm_lint_check #2134 cinder-next for hopem mp250170
    LINT OK: passed

Build: http://10.245.162.77:8080/job/charm_lint_check/2134/

Revision history for this message
uosci-testing-bot (uosci-testing-bot) wrote :

charm_unit_test #1923 cinder-next for hopem mp250170
    UNIT OK: passed

Build: http://10.245.162.77:8080/job/charm_unit_test/1923/

Revision history for this message
uosci-testing-bot (uosci-testing-bot) wrote :

charm_amulet_test #2042 cinder-next for hopem mp250170
    AMULET OK: passed

Build: http://10.245.162.77:8080/job/charm_amulet_test/2042/

75. By Edward Hope-Morley

synced /next

76. By Edward Hope-Morley

synced charm-helpers;

77. By Edward Hope-Morley

ensure apache2 stop+start if config changed

Revision history for this message
uosci-testing-bot (uosci-testing-bot) wrote :

charm_lint_check #2207 cinder-next for hopem mp250170
    LINT OK: passed

Build: http://10.245.162.77:8080/job/charm_lint_check/2207/

Revision history for this message
uosci-testing-bot (uosci-testing-bot) wrote :

charm_unit_test #1996 cinder-next for hopem mp250170
    UNIT OK: passed

Build: http://10.245.162.77:8080/job/charm_unit_test/1996/

Revision history for this message
uosci-testing-bot (uosci-testing-bot) wrote :

charm_amulet_test #2153 cinder-next for hopem mp250170
    AMULET FAIL: amulet-test failed

AMULET Results (max last 2 lines):
  ERROR subprocess encountered error code 1
  make: *** [test] Error 1

Full amulet test output: http://paste.ubuntu.com/10396306/
Build: http://10.245.162.77:8080/job/charm_amulet_test/2153/

Revision history for this message
Liam Young (gnuoy) wrote :

Approve

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'hooks/charmhelpers/contrib/openstack/context.py'
--- hooks/charmhelpers/contrib/openstack/context.py 2015-01-26 09:47:37 +0000
+++ hooks/charmhelpers/contrib/openstack/context.py 2015-02-24 14:13:55 +0000
@@ -279,9 +279,25 @@
279class IdentityServiceContext(OSContextGenerator):279class IdentityServiceContext(OSContextGenerator):
280 interfaces = ['identity-service']280 interfaces = ['identity-service']
281281
282 def __init__(self, service=None, service_user=None):
283 self.service = service
284 self.service_user = service_user
285
282 def __call__(self):286 def __call__(self):
283 log('Generating template context for identity-service', level=DEBUG)287 log('Generating template context for identity-service', level=DEBUG)
284 ctxt = {}288 ctxt = {}
289
290 if self.service and self.service_user:
291 # This is required for pki token signing if we don't want /tmp to
292 # be used.
293 cachedir = '/var/cache/%s' % (self.service)
294 if not os.path.isdir(cachedir):
295 log("Creating service cache dir %s" % (cachedir), level=DEBUG)
296 mkdir(path=cachedir, owner=self.service_user,
297 group=self.service_user, perms=0o700)
298
299 ctxt['signing_dir'] = cachedir
300
285 for rid in relation_ids('identity-service'):301 for rid in relation_ids('identity-service'):
286 for unit in related_units(rid):302 for unit in related_units(rid):
287 rdata = relation_get(rid=rid, unit=unit)303 rdata = relation_get(rid=rid, unit=unit)
@@ -291,15 +307,16 @@
291 auth_host = format_ipv6_addr(auth_host) or auth_host307 auth_host = format_ipv6_addr(auth_host) or auth_host
292 svc_protocol = rdata.get('service_protocol') or 'http'308 svc_protocol = rdata.get('service_protocol') or 'http'
293 auth_protocol = rdata.get('auth_protocol') or 'http'309 auth_protocol = rdata.get('auth_protocol') or 'http'
294 ctxt = {'service_port': rdata.get('service_port'),310 ctxt.update({'service_port': rdata.get('service_port'),
295 'service_host': serv_host,311 'service_host': serv_host,
296 'auth_host': auth_host,312 'auth_host': auth_host,
297 'auth_port': rdata.get('auth_port'),313 'auth_port': rdata.get('auth_port'),
298 'admin_tenant_name': rdata.get('service_tenant'),314 'admin_tenant_name': rdata.get('service_tenant'),
299 'admin_user': rdata.get('service_username'),315 'admin_user': rdata.get('service_username'),
300 'admin_password': rdata.get('service_password'),316 'admin_password': rdata.get('service_password'),
301 'service_protocol': svc_protocol,317 'service_protocol': svc_protocol,
302 'auth_protocol': auth_protocol}318 'auth_protocol': auth_protocol})
319
303 if context_complete(ctxt):320 if context_complete(ctxt):
304 # NOTE(jamespage) this is required for >= icehouse321 # NOTE(jamespage) this is required for >= icehouse
305 # so a missing value just indicates keystone needs322 # so a missing value just indicates keystone needs
@@ -1021,6 +1038,8 @@
1021 for unit in related_units(rid):1038 for unit in related_units(rid):
1022 ctxt['zmq_nonce'] = relation_get('nonce', unit, rid)1039 ctxt['zmq_nonce'] = relation_get('nonce', unit, rid)
1023 ctxt['zmq_host'] = relation_get('host', unit, rid)1040 ctxt['zmq_host'] = relation_get('host', unit, rid)
1041 ctxt['zmq_redis_address'] = relation_get(
1042 'zmq_redis_address', unit, rid)
10241043
1025 return ctxt1044 return ctxt
10261045
10271046
=== added file 'hooks/charmhelpers/contrib/openstack/templates/zeromq'
--- hooks/charmhelpers/contrib/openstack/templates/zeromq 1970-01-01 00:00:00 +0000
+++ hooks/charmhelpers/contrib/openstack/templates/zeromq 2015-02-24 14:13:55 +0000
@@ -0,0 +1,14 @@
1{% if zmq_host -%}
2# ZeroMQ configuration (restart-nonce: {{ zmq_nonce }})
3rpc_backend = zmq
4rpc_zmq_host = {{ zmq_host }}
5{% if zmq_redis_address -%}
6rpc_zmq_matchmaker = oslo.messaging._drivers.matchmaker_redis.MatchMakerRedis
7matchmaker_heartbeat_freq = 15
8matchmaker_heartbeat_ttl = 30
9[matchmaker_redis]
10host = {{ zmq_redis_address }}
11{% else -%}
12rpc_zmq_matchmaker = oslo.messaging._drivers.matchmaker_ring.MatchMakerRing
13{% endif -%}
14{% endif -%}
015
=== modified file 'hooks/cinder_hooks.py'
--- hooks/cinder_hooks.py 2015-02-04 19:29:31 +0000
+++ hooks/cinder_hooks.py 2015-02-24 14:13:55 +0000
@@ -417,6 +417,7 @@
417 CONFIGS.write_all()417 CONFIGS.write_all()
418418
419419
420@restart_on_change(restart_map(), stopstart=True)
420def configure_https():421def configure_https():
421 '''Enables SSL API Apache config if appropriate and kicks identity-service422 '''Enables SSL API Apache config if appropriate and kicks identity-service
422 with any required api updates.423 with any required api updates.
423424
=== modified file 'hooks/cinder_utils.py'
--- hooks/cinder_utils.py 2014-12-15 10:17:11 +0000
+++ hooks/cinder_utils.py 2015-02-24 14:13:55 +0000
@@ -125,7 +125,9 @@
125 config_file=CINDER_CONF),125 config_file=CINDER_CONF),
126 cinder_contexts.StorageBackendContext(),126 cinder_contexts.StorageBackendContext(),
127 cinder_contexts.LoggingConfigContext(),127 cinder_contexts.LoggingConfigContext(),
128 context.IdentityServiceContext(),128 context.IdentityServiceContext(
129 service='cinder',
130 service_user='cinder'),
129 context.BindHostContext(),131 context.BindHostContext(),
130 context.WorkerConfigContext()],132 context.WorkerConfigContext()],
131 'services': ['cinder-api', 'cinder-volume',133 'services': ['cinder-api', 'cinder-volume',
132134
=== modified file 'templates/icehouse/cinder.conf'
--- templates/icehouse/cinder.conf 2014-10-07 12:27:23 +0000
+++ templates/icehouse/cinder.conf 2015-02-24 14:13:55 +0000
@@ -65,6 +65,7 @@
65admin_tenant_name = {{ admin_tenant_name }}65admin_tenant_name = {{ admin_tenant_name }}
66admin_user = {{ admin_user }}66admin_user = {{ admin_user }}
67admin_password = {{ admin_password }}67admin_password = {{ admin_password }}
68{% endif -%}68signing_dir = {{ signing_dir }}
69{% endif %}
6970
70{% include "parts/section-database" %}71{% include "parts/section-database" %}

Subscribers

People subscribed via source and target branches