Merge lp:~hopem/charms/trusty/nova-cloud-controller/novnc-ssl into lp:~openstack-charmers-archive/charms/trusty/nova-cloud-controller/next

Proposed by Edward Hope-Morley
Status: Merged
Merged at revision: 151
Proposed branch: lp:~hopem/charms/trusty/nova-cloud-controller/novnc-ssl
Merge into: lp:~openstack-charmers-archive/charms/trusty/nova-cloud-controller/next
Diff against target: 116 lines (+41/-0)
6 files modified
hooks/nova_cc_context.py (+20/-0)
templates/icehouse/nova.conf (+2/-0)
templates/juno/nova.conf (+2/-0)
templates/kilo/nova.conf (+2/-0)
templates/parts/novnc (+9/-0)
unit_tests/test_nova_cc_contexts.py (+6/-0)
To merge this branch: bzr merge lp:~hopem/charms/trusty/nova-cloud-controller/novnc-ssl
Reviewer Review Type Date Requested Status
Billy Olsen Approve
Review via email: mp+255444@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 #3111 nova-cloud-controller-next for hopem mp255444
    LINT OK: passed

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

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

charm_unit_test #2899 nova-cloud-controller-next for hopem mp255444
    UNIT OK: passed

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

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

charm_amulet_test #2944 nova-cloud-controller-next for hopem mp255444
    AMULET FAIL: amulet-test failed

AMULET Results (max last 2 lines):
make: *** [test] Error 1
ERROR:root:Make target returned non-zero.

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

Revision history for this message
Billy Olsen (billy-olsen) wrote :

Changes look good to me, approve.

review: Approve
151. By Edward Hope-Morley

[hopem,r=]

Fixes novnc SSL (ha and single unit)

Closes-Bug: 1441143

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

charm_lint_check #3155 nova-cloud-controller-next for hopem mp255444
    LINT OK: passed

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

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

charm_unit_test #2943 nova-cloud-controller-next for hopem mp255444
    UNIT OK: passed

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

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

charm_amulet_test #2947 nova-cloud-controller-next for hopem mp255444
    AMULET FAIL: amulet-test failed

AMULET Results (max last 2 lines):
make: *** [test] Error 1
ERROR:root:Make target returned non-zero.

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

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'hooks/nova_cc_context.py'
--- hooks/nova_cc_context.py 2015-01-22 16:00:02 +0000
+++ hooks/nova_cc_context.py 2015-04-08 12:10:41 +0000
@@ -1,3 +1,5 @@
1import os
2
1from charmhelpers.core.hookenv import (3from charmhelpers.core.hookenv import (
2 config,4 config,
3 relation_ids,5 relation_ids,
@@ -329,4 +331,22 @@
329 servers = []331 servers = []
330332
331 ctxt['memcached_servers'] = ','.join(servers)333 ctxt['memcached_servers'] = ','.join(servers)
334
335 # Configure nova-novncproxy https if nova-api is using https.
336 if https():
337 cn = resolve_address(endpoint_type=INTERNAL)
338 if cn:
339 cert_filename = 'cert_{}'.format(cn)
340 key_filename = 'key_{}'.format(cn)
341 else:
342 cert_filename = 'cert'
343 key_filename = 'key'
344
345 ssl_dir = '/etc/apache2/ssl/nova'
346 cert = os.path.join(ssl_dir, cert_filename)
347 key = os.path.join(ssl_dir, key_filename)
348 if os.path.exists(cert) and os.path.exists(key):
349 ctxt['ssl_cert'] = cert
350 ctxt['ssl_key'] = key
351
332 return ctxt352 return ctxt
333353
=== modified file 'templates/icehouse/nova.conf'
--- templates/icehouse/nova.conf 2015-03-31 14:56:11 +0000
+++ templates/icehouse/nova.conf 2015-04-08 12:10:41 +0000
@@ -42,6 +42,8 @@
42memcached_servers = {{ memcached_servers }}42memcached_servers = {{ memcached_servers }}
43{% endif %}43{% endif %}
4444
45{% include "parts/novnc" %}
46
45{% if keystone_ec2_url -%}47{% if keystone_ec2_url -%}
46keystone_ec2_url = {{ keystone_ec2_url }}48keystone_ec2_url = {{ keystone_ec2_url }}
47{% endif -%}49{% endif -%}
4850
=== modified file 'templates/juno/nova.conf'
--- templates/juno/nova.conf 2015-03-30 17:00:34 +0000
+++ templates/juno/nova.conf 2015-04-08 12:10:41 +0000
@@ -42,6 +42,8 @@
42memcached_servers = {{ memcached_servers }}42memcached_servers = {{ memcached_servers }}
43{% endif %}43{% endif %}
4444
45{% include "parts/novnc" %}
46
45{% if keystone_ec2_url -%}47{% if keystone_ec2_url -%}
46keystone_ec2_url = {{ keystone_ec2_url }}48keystone_ec2_url = {{ keystone_ec2_url }}
47{% endif -%}49{% endif -%}
4850
=== modified file 'templates/kilo/nova.conf'
--- templates/kilo/nova.conf 2015-03-31 14:56:11 +0000
+++ templates/kilo/nova.conf 2015-04-08 12:10:41 +0000
@@ -41,6 +41,8 @@
41memcached_servers = {{ memcached_servers }}41memcached_servers = {{ memcached_servers }}
42{% endif %}42{% endif %}
4343
44{% include "parts/novnc" %}
45
44{% if keystone_ec2_url -%}46{% if keystone_ec2_url -%}
45keystone_ec2_url = {{ keystone_ec2_url }}47keystone_ec2_url = {{ keystone_ec2_url }}
46{% endif -%}48{% endif -%}
4749
=== added file 'templates/parts/novnc'
--- templates/parts/novnc 1970-01-01 00:00:00 +0000
+++ templates/parts/novnc 2015-04-08 12:10:41 +0000
@@ -0,0 +1,9 @@
1{%- if ssl_only -%}
2ssl_only=true
3{% endif -%}
4{% if ssl_cert -%}
5cert={{ ssl_cert }}
6{% endif -%}
7{% if ssl_key -%}
8key={{ ssl_key }}
9{% endif %}
010
=== modified file 'unit_tests/test_nova_cc_contexts.py'
--- unit_tests/test_nova_cc_contexts.py 2015-01-20 09:32:55 +0000
+++ unit_tests/test_nova_cc_contexts.py 2015-04-08 12:10:41 +0000
@@ -47,6 +47,8 @@
47 self.config.side_effect = self.test_config.get47 self.config.side_effect = self.test_config.get
48 self.log.side_effect = fake_log48 self.log.side_effect = fake_log
4949
50 @mock.patch.object(context, 'resolve_address',
51 lambda *args, **kwargs: None)
50 @mock.patch.object(utils, 'os_release')52 @mock.patch.object(utils, 'os_release')
51 @mock.patch('charmhelpers.contrib.network.ip.log')53 @mock.patch('charmhelpers.contrib.network.ip.log')
52 def test_instance_console_context_without_memcache(self, os_release, log_):54 def test_instance_console_context_without_memcache(self, os_release, log_):
@@ -57,6 +59,8 @@
57 self.assertEqual({'memcached_servers': ''},59 self.assertEqual({'memcached_servers': ''},
58 instance_console())60 instance_console())
5961
62 @mock.patch.object(context, 'resolve_address',
63 lambda *args, **kwargs: None)
60 @mock.patch.object(utils, 'os_release')64 @mock.patch.object(utils, 'os_release')
61 @mock.patch('charmhelpers.contrib.network.ip.log')65 @mock.patch('charmhelpers.contrib.network.ip.log')
62 def test_instance_console_context_with_memcache(self, os_release, log_):66 def test_instance_console_context_with_memcache(self, os_release, log_):
@@ -64,6 +68,8 @@
64 '127.0.1.1',68 '127.0.1.1',
65 '127.0.1.1')69 '127.0.1.1')
6670
71 @mock.patch.object(context, 'resolve_address',
72 lambda *args, **kwargs: None)
67 @mock.patch.object(utils, 'os_release')73 @mock.patch.object(utils, 'os_release')
68 @mock.patch('charmhelpers.contrib.network.ip.log')74 @mock.patch('charmhelpers.contrib.network.ip.log')
69 def test_instance_console_context_with_memcache_ipv6(self, os_release,75 def test_instance_console_context_with_memcache_ipv6(self, os_release,

Subscribers

People subscribed via source and target branches