Resync icehous helpers with fix for cinder/ceph syslog
This commit is contained in:
parent
f43cda3f90
commit
5f7a624ce5
@ -1,4 +1,4 @@
|
|||||||
branch: lp:charm-helpers
|
branch: lp:~openstack-charmers/charm-helpers/icehouse
|
||||||
destination: hooks/charmhelpers
|
destination: hooks/charmhelpers
|
||||||
include:
|
include:
|
||||||
- core
|
- core
|
||||||
|
@ -250,13 +250,12 @@ class CephContext(OSContextGenerator):
|
|||||||
unit=unit))
|
unit=unit))
|
||||||
auth = relation_get('auth', rid=rid, unit=unit)
|
auth = relation_get('auth', rid=rid, unit=unit)
|
||||||
key = relation_get('key', rid=rid, unit=unit)
|
key = relation_get('key', rid=rid, unit=unit)
|
||||||
use_syslog = str(config('use-syslog')).lower()
|
|
||||||
|
|
||||||
ctxt = {
|
ctxt = {
|
||||||
'mon_hosts': ' '.join(mon_hosts),
|
'mon_hosts': ' '.join(mon_hosts),
|
||||||
'auth': auth,
|
'auth': auth,
|
||||||
'key': key,
|
'key': key,
|
||||||
'use_syslog': use_syslog
|
'use_syslog': str(config('use-syslog')).lower()
|
||||||
}
|
}
|
||||||
|
|
||||||
if not os.path.isdir('/etc/ceph'):
|
if not os.path.isdir('/etc/ceph'):
|
||||||
|
@ -18,6 +18,22 @@ def headers_package():
|
|||||||
return 'linux-headers-%s' % kver
|
return 'linux-headers-%s' % kver
|
||||||
|
|
||||||
|
|
||||||
|
def kernel_version():
|
||||||
|
""" Retrieve the current major kernel version as a tuple e.g. (3, 13) """
|
||||||
|
kver = check_output(['uname' , '-r']).strip()
|
||||||
|
kver = kver.split('.')
|
||||||
|
return (int(kver[0]), int(kver[1]))
|
||||||
|
|
||||||
|
|
||||||
|
def determine_dkms_package():
|
||||||
|
""" Determine which DKMS package should be used based on kernel version """
|
||||||
|
# NOTE: 3.13 kernels have support for GRE and VXLAN native
|
||||||
|
if kernel_version() >= (3, 13):
|
||||||
|
return []
|
||||||
|
else:
|
||||||
|
return ['openvswitch-datapath-dkms']
|
||||||
|
|
||||||
|
|
||||||
# legacy
|
# legacy
|
||||||
def quantum_plugins():
|
def quantum_plugins():
|
||||||
from charmhelpers.contrib.openstack import context
|
from charmhelpers.contrib.openstack import context
|
||||||
@ -32,7 +48,7 @@ def quantum_plugins():
|
|||||||
database=config('neutron-database'),
|
database=config('neutron-database'),
|
||||||
relation_prefix='neutron')],
|
relation_prefix='neutron')],
|
||||||
'services': ['quantum-plugin-openvswitch-agent'],
|
'services': ['quantum-plugin-openvswitch-agent'],
|
||||||
'packages': [[headers_package(), 'openvswitch-datapath-dkms'],
|
'packages': [[headers_package()] + determine_dkms_package(),
|
||||||
['quantum-plugin-openvswitch-agent']],
|
['quantum-plugin-openvswitch-agent']],
|
||||||
'server_packages': ['quantum-server',
|
'server_packages': ['quantum-server',
|
||||||
'quantum-plugin-openvswitch'],
|
'quantum-plugin-openvswitch'],
|
||||||
@ -57,7 +73,8 @@ def quantum_plugins():
|
|||||||
|
|
||||||
def neutron_plugins():
|
def neutron_plugins():
|
||||||
from charmhelpers.contrib.openstack import context
|
from charmhelpers.contrib.openstack import context
|
||||||
return {
|
release = os_release('nova-common')
|
||||||
|
plugins = {
|
||||||
'ovs': {
|
'ovs': {
|
||||||
'config': '/etc/neutron/plugins/openvswitch/'
|
'config': '/etc/neutron/plugins/openvswitch/'
|
||||||
'ovs_neutron_plugin.ini',
|
'ovs_neutron_plugin.ini',
|
||||||
@ -68,8 +85,8 @@ def neutron_plugins():
|
|||||||
database=config('neutron-database'),
|
database=config('neutron-database'),
|
||||||
relation_prefix='neutron')],
|
relation_prefix='neutron')],
|
||||||
'services': ['neutron-plugin-openvswitch-agent'],
|
'services': ['neutron-plugin-openvswitch-agent'],
|
||||||
'packages': [[headers_package(), 'openvswitch-datapath-dkms'],
|
'packages': [[headers_package()] + determine_dkms_package(),
|
||||||
['quantum-plugin-openvswitch-agent']],
|
['neutron-plugin-openvswitch-agent']],
|
||||||
'server_packages': ['neutron-server',
|
'server_packages': ['neutron-server',
|
||||||
'neutron-plugin-openvswitch'],
|
'neutron-plugin-openvswitch'],
|
||||||
'server_services': ['neutron-server']
|
'server_services': ['neutron-server']
|
||||||
@ -89,6 +106,13 @@ def neutron_plugins():
|
|||||||
'server_services': ['neutron-server']
|
'server_services': ['neutron-server']
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
# NOTE: patch in ml2 plugin for icehouse onwards
|
||||||
|
if release >= 'icehouse':
|
||||||
|
plugins['ovs']['config'] = '/etc/neutron/plugins/ml2/ml2_conf.ini'
|
||||||
|
plugins['ovs']['driver'] = 'neutron.plugins.ml2.plugin.Ml2Plugin'
|
||||||
|
plugins['ovs']['server_packages'] = ['neutron-server',
|
||||||
|
'neutron-plugin-ml2']
|
||||||
|
return plugins
|
||||||
|
|
||||||
|
|
||||||
def neutron_plugin_attribute(plugin, attr, net_manager=None):
|
def neutron_plugin_attribute(plugin, attr, net_manager=None):
|
||||||
|
@ -65,6 +65,8 @@ SWIFT_CODENAMES = OrderedDict([
|
|||||||
('1.10.0', 'havana'),
|
('1.10.0', 'havana'),
|
||||||
('1.9.1', 'havana'),
|
('1.9.1', 'havana'),
|
||||||
('1.9.0', 'havana'),
|
('1.9.0', 'havana'),
|
||||||
|
('1.12.0', 'icehouse'),
|
||||||
|
('1.11.0', 'icehouse'),
|
||||||
])
|
])
|
||||||
|
|
||||||
DEFAULT_LOOPBACK_SIZE = '5G'
|
DEFAULT_LOOPBACK_SIZE = '5G'
|
||||||
|
Loading…
Reference in New Issue
Block a user