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

Proposed by Edward Hope-Morley
Status: Merged
Merged at revision: 116
Proposed branch: lp:~hopem/charms/trusty/nova-compute/fix-libvirt-bin
Merge into: lp:~openstack-charmers-archive/charms/trusty/nova-compute/next
Diff against target: 70 lines (+19/-3)
4 files modified
hooks/nova_compute_context.py (+10/-0)
hooks/nova_compute_utils.py (+6/-0)
templates/libvirt-bin (+0/-3)
templates/libvirt-bin.override (+3/-0)
To merge this branch: bzr merge lp:~hopem/charms/trusty/nova-compute/fix-libvirt-bin
Reviewer Review Type Date Requested Status
James Page Approve
Review via email: mp+254750@code.launchpad.net
To post a comment you must log in.
116. By Edward Hope-Morley

Fixes broken rev 112 by using /etc/init.d/libvirt-bin.override
instead of /etc/default/libvirt-bin

Revision history for this message
James Page (james-page) :
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_context.py'
2--- hooks/nova_compute_context.py 2015-03-31 08:46:52 +0000
3+++ hooks/nova_compute_context.py 2015-03-31 13:23:07 +0000
4@@ -128,6 +128,16 @@
5 return ctxt
6
7
8+class NovaComputeLibvirtOverrideContext(context.OSContextGenerator):
9+ """Provides overrides to the libvirt-bin service"""
10+ interfaces = []
11+
12+ def __call__(self):
13+ ctxt = {}
14+ ctxt['overrides'] = "limit nofile 65535 65535"
15+ return ctxt
16+
17+
18 class NovaComputeVirtContext(context.OSContextGenerator):
19 interfaces = []
20
21
22=== modified file 'hooks/nova_compute_utils.py'
23--- hooks/nova_compute_utils.py 2015-03-31 11:43:21 +0000
24+++ hooks/nova_compute_utils.py 2015-03-31 13:23:07 +0000
25@@ -41,6 +41,7 @@
26 CloudComputeContext,
27 MetadataServiceContext,
28 NovaComputeLibvirtContext,
29+ NovaComputeLibvirtOverrideContext,
30 NovaComputeCephContext,
31 NeutronComputeContext,
32 InstanceConsoleContext,
33@@ -63,6 +64,7 @@
34 QEMU_CONF = '/etc/libvirt/qemu.conf'
35 LIBVIRTD_CONF = '/etc/libvirt/libvirtd.conf'
36 LIBVIRT_BIN = '/etc/default/libvirt-bin'
37+LIBVIRT_BIN_OVERRIDES = '/etc/init/libvirt-bin.override'
38 NOVA_CONF = '%s/nova.conf' % NOVA_CONF_DIR
39
40 BASE_RESOURCE_MAP = {
41@@ -78,6 +80,10 @@
42 'services': ['libvirt-bin'],
43 'contexts': [NovaComputeLibvirtContext()],
44 },
45+ LIBVIRT_BIN_OVERRIDES: {
46+ 'services': ['libvirt-bin'],
47+ 'contexts': [NovaComputeLibvirtOverrideContext()],
48+ },
49 NOVA_CONF: {
50 'services': ['nova-compute'],
51 'contexts': [context.AMQPContext(ssl_dir=NOVA_CONF_DIR),
52
53=== modified file 'templates/libvirt-bin'
54--- templates/libvirt-bin 2015-03-31 08:46:52 +0000
55+++ templates/libvirt-bin 2015-03-31 13:23:07 +0000
56@@ -14,6 +14,3 @@
57
58 # pass in location of kerberos keytab
59 #export KRB5_KTNAME=/etc/libvirt/libvirt.keytab
60-
61-# Increase nofile limits to support use with ceph rbd volumes
62-limit nofile 65535 65535
63
64=== added file 'templates/libvirt-bin.override'
65--- templates/libvirt-bin.override 1970-01-01 00:00:00 +0000
66+++ templates/libvirt-bin.override 2015-03-31 13:23:07 +0000
67@@ -0,0 +1,3 @@
68+{% if overrides -%}
69+{{ overrides }}
70+{% endif -%}

Subscribers

People subscribed via source and target branches