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

instead of /etc/default/libvirt-bin
This commit is contained in:
Edward Hope-Morley 2015-03-31 14:22:53 +01:00
parent e9188ccd57
commit 91000bf600
4 changed files with 19 additions and 3 deletions

View File

@ -128,6 +128,16 @@ class NovaComputeLibvirtContext(context.OSContextGenerator):
return ctxt
class NovaComputeLibvirtOverrideContext(context.OSContextGenerator):
"""Provides overrides to the libvirt-bin service"""
interfaces = []
def __call__(self):
ctxt = {}
ctxt['overrides'] = "limit nofile 65535 65535"
return ctxt
class NovaComputeVirtContext(context.OSContextGenerator):
interfaces = []

View File

@ -41,6 +41,7 @@ from nova_compute_context import (
CloudComputeContext,
MetadataServiceContext,
NovaComputeLibvirtContext,
NovaComputeLibvirtOverrideContext,
NovaComputeCephContext,
NeutronComputeContext,
InstanceConsoleContext,
@ -63,6 +64,7 @@ NOVA_CONF_DIR = "/etc/nova"
QEMU_CONF = '/etc/libvirt/qemu.conf'
LIBVIRTD_CONF = '/etc/libvirt/libvirtd.conf'
LIBVIRT_BIN = '/etc/default/libvirt-bin'
LIBVIRT_BIN_OVERRIDES = '/etc/init/libvirt-bin.override'
NOVA_CONF = '%s/nova.conf' % NOVA_CONF_DIR
BASE_RESOURCE_MAP = {
@ -78,6 +80,10 @@ BASE_RESOURCE_MAP = {
'services': ['libvirt-bin'],
'contexts': [NovaComputeLibvirtContext()],
},
LIBVIRT_BIN_OVERRIDES: {
'services': ['libvirt-bin'],
'contexts': [NovaComputeLibvirtOverrideContext()],
},
NOVA_CONF: {
'services': ['nova-compute'],
'contexts': [context.AMQPContext(ssl_dir=NOVA_CONF_DIR),

View File

@ -14,6 +14,3 @@ libvirtd_opts="{{ libvirtd_opts }}"
# pass in location of kerberos keytab
#export KRB5_KTNAME=/etc/libvirt/libvirt.keytab
# Increase nofile limits to support use with ceph rbd volumes
limit nofile 65535 65535

View File

@ -0,0 +1,3 @@
{% if overrides -%}
{{ overrides }}
{% endif -%}