Merge lp:~hopem/charms/trusty/nova-compute/lp1489463 into lp:~openstack-charmers-archive/charms/trusty/nova-compute/next

Proposed by Edward Hope-Morley
Status: Merged
Merged at revision: 201
Proposed branch: lp:~hopem/charms/trusty/nova-compute/lp1489463
Merge into: lp:~openstack-charmers-archive/charms/trusty/nova-compute/next
Diff against target: 90 lines (+17/-13)
2 files modified
hooks/nova_compute_hooks.py (+11/-4)
templates/kilo/nova.conf (+6/-9)
To merge this branch: bzr merge lp:~hopem/charms/trusty/nova-compute/lp1489463
Reviewer Review Type Date Requested Status
Liam Young (community) Approve
Review via email: mp+285486@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 #139 nova-compute-next for hopem mp285486
    LINT OK: passed

Build: http://10.245.162.36:8080/job/charm_lint_check/139/

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

charm_unit_test #131 nova-compute-next for hopem mp285486
    UNIT OK: passed

Build: http://10.245.162.36:8080/job/charm_unit_test/131/

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

charm_amulet_test #26 nova-compute-next for hopem mp285486
    AMULET FAIL: amulet-test failed

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

Full amulet test output: http://paste.ubuntu.com/15004581/
Build: http://10.245.162.36:8080/job/charm_amulet_test/26/

Revision history for this message
Ryan Beisner (1chb1n) wrote :

^ FYI, an undercloud network issue occurred as this test was being executed. I've retriggered.

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

charm_amulet_test #28 nova-compute-next for hopem mp285486
    AMULET OK: passed

Build: http://10.245.162.36:8080/job/charm_amulet_test/28/

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

Approved

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'hooks/nova_compute_hooks.py'
2--- hooks/nova_compute_hooks.py 2016-01-15 14:13:25 +0000
3+++ hooks/nova_compute_hooks.py 2016-02-09 15:55:50 +0000
4@@ -8,6 +8,7 @@
5 log,
6 ERROR,
7 relation_ids,
8+ related_units,
9 relation_get,
10 relation_set,
11 service_name,
12@@ -161,6 +162,12 @@
13 if config('hugepages'):
14 install_hugepages()
15
16+ if (config('libvirt-image-backend') == 'rbd' and
17+ assert_libvirt_imagebackend_allowed()):
18+ for rid in relation_ids('ceph'):
19+ for unit in related_units(rid):
20+ ceph_changed(rid=rid, unit=unit)
21+
22 CONFIGS.write_all()
23
24
25@@ -291,7 +298,7 @@
26
27 @hooks.hook('ceph-relation-changed')
28 @restart_on_change(restart_map())
29-def ceph_changed():
30+def ceph_changed(rid=None, unit=None):
31 if 'ceph' not in CONFIGS.complete_contexts():
32 log('ceph relation incomplete. Peer not ready?')
33 return
34@@ -307,10 +314,10 @@
35
36 # With some refactoring, this can move into NovaComputeCephContext
37 # and allow easily extended to support other compute flavors.
38- if config('virt-type') in ['kvm', 'qemu', 'lxc'] and relation_get('key'):
39+ key = relation_get(attribute='key', rid=rid, unit=unit)
40+ if config('virt-type') in ['kvm', 'qemu', 'lxc'] and key:
41 create_libvirt_secret(secret_file=CEPH_SECRET,
42- secret_uuid=CEPH_SECRET_UUID,
43- key=relation_get('key'))
44+ secret_uuid=CEPH_SECRET_UUID, key=key)
45
46 if (config('libvirt-image-backend') == 'rbd' and
47 assert_libvirt_imagebackend_allowed()):
48
49=== modified file 'templates/kilo/nova.conf'
50--- templates/kilo/nova.conf 2015-11-04 16:06:18 +0000
51+++ templates/kilo/nova.conf 2016-02-09 15:55:50 +0000
52@@ -147,7 +147,7 @@
53 keymap = {{ console_keymap }}
54 server_listen = 0.0.0.0
55 server_proxyclient_address = {{ console_listen_addr }}
56-{% endif -%}
57+{% endif %}
58
59 [libvirt]
60 {% if cpu_mode -%}
61@@ -156,25 +156,22 @@
62 {% if cpu_model -%}
63 cpu_model = {{ cpu_model }}
64 {% endif -%}
65-{% if libvirt_images_type -%}
66+{% if libvirt_images_type and rbd_pool -%}
67 images_type = {{ libvirt_images_type }}
68 images_rbd_pool = {{ rbd_pool }}
69 images_rbd_ceph_conf = {{ libvirt_rbd_images_ceph_conf }}
70-inject_password=false
71-inject_key=false
72-inject_partition=-2
73+inject_password = false
74+inject_key = false
75+inject_partition = -2
76 {% endif -%}
77-{% if rbd_pool -%}
78-rbd_pool = {{ rbd_pool }}
79 rbd_user = {{ rbd_user }}
80 rbd_secret_uuid = {{ rbd_secret_uuid }}
81-{% endif -%}
82 {% if live_migration_uri -%}
83 live_migration_uri = {{ live_migration_uri }}
84 {% endif -%}
85 {% if disk_cachemodes -%}
86 disk_cachemodes = {{ disk_cachemodes }}
87-{% endif -%}
88+{% endif %}
89
90 {% include "parts/section-database" %}
91

Subscribers

People subscribed via source and target branches