Merge lp:~openstack-charmers/charms/precise/nova-compute/ceilometer-agent into lp:~charmers/charms/precise/nova-compute/trunk

Proposed by James Page
Status: Merged
Merged at revision: 52
Proposed branch: lp:~openstack-charmers/charms/precise/nova-compute/ceilometer-agent
Merge into: lp:~charmers/charms/precise/nova-compute/trunk
Diff against target: 76 lines (+22/-2)
4 files modified
hooks/nova_compute_hooks.py (+6/-0)
hooks/nova_compute_utils.py (+6/-1)
metadata.yaml (+4/-1)
templates/havana/nova.conf (+6/-0)
To merge this branch: bzr merge lp:~openstack-charmers/charms/precise/nova-compute/ceilometer-agent
Reviewer Review Type Date Requested Status
Marco Ceppi (community) Abstain
Adam Gandelman (community) Approve
Review via email: mp+197751@code.launchpad.net

Description of the change

Add subordinate interface to allow ceilometer-agent charm to pass
configuration to nova.

To post a comment you must log in.
Revision history for this message
Adam Gandelman (gandelman-a) wrote :

Looks like a simple but useful change. Will wait till the ceilometer agent/server charms officially hit the store before merging this.

review: Approve
Revision history for this message
Marco Ceppi (marcoceppi) :
review: Abstain

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== added symlink 'hooks/nova-ceilometer-relation-changed'
2=== target is u'nova_compute_hooks.py'
3=== added symlink 'hooks/nova-ceilometer-relation-joined'
4=== target is u'nova_compute_hooks.py'
5=== modified file 'hooks/nova_compute_hooks.py'
6--- hooks/nova_compute_hooks.py 2013-11-08 05:48:58 +0000
7+++ hooks/nova_compute_hooks.py 2013-12-04 16:30:15 +0000
8@@ -209,6 +209,12 @@
9 amqp_joined(relation_id=r_id)
10
11
12+@hooks.hook('nova-ceilometer-relation-changed')
13+@restart_on_change(restart_map())
14+def nova_ceilometer_relation_changed():
15+ CONFIGS.write_all()
16+
17+
18 def main():
19 try:
20 hooks.execute(sys.argv)
21
22=== modified file 'hooks/nova_compute_utils.py'
23--- hooks/nova_compute_utils.py 2013-11-01 16:11:43 +0000
24+++ hooks/nova_compute_utils.py 2013-12-04 16:30:15 +0000
25@@ -69,7 +69,12 @@
26 context.OSConfigFlagContext(),
27 CloudComputeContext(),
28 NovaComputeLibvirtContext(),
29- NovaComputeCephContext()],
30+ NovaComputeCephContext(),
31+ context.SubordinateConfigContext(
32+ interface='nova-ceilometer',
33+ service='nova',
34+ config_file=NOVA_CONF,
35+ )],
36 },
37 }
38
39
40=== modified file 'metadata.yaml'
41--- metadata.yaml 2013-08-01 23:21:58 +0000
42+++ metadata.yaml 2013-12-04 16:30:15 +0000
43@@ -6,7 +6,7 @@
44 addition to its "native" API (the OpenStack API), it also supports the Amazon
45 EC2 API.
46 categories:
47- - openstack
48+ - openstack
49 provides:
50 cloud-compute:
51 interface: nova-compute
52@@ -22,6 +22,9 @@
53 nrpe-external-master:
54 interface: nrpe-external-master
55 scope: container
56+ nova-ceilometer:
57+ interface: nova-ceilometer
58+ scope: container
59 peers:
60 compute-peer:
61 interface: nova
62
63=== modified file 'templates/havana/nova.conf'
64--- templates/havana/nova.conf 2013-11-01 22:05:27 +0000
65+++ templates/havana/nova.conf 2013-12-04 16:30:15 +0000
66@@ -84,3 +84,9 @@
67 {% if live_migration_uri -%}
68 live_migration_uri = {{ live_migration_uri }}
69 {% endif -%}
70+
71+{% if sections and 'DEFAULT' in sections -%}
72+{% for key, value in sections['DEFAULT'] -%}
73+{{ key }} = {{ value }}
74+{% endfor -%}
75+{% endif -%}
76\ No newline at end of file

Subscribers

People subscribed via source and target branches