Properly configure nova cache for compute

This change properly pulls in the nova::cache configuration for
the compute role.

Change-Id: Ia54aaf6e2b93e2acdbe66314771e88a59c303206
Closes-Bug: #1599559
This commit is contained in:
Alex Schultz 2016-07-06 09:59:24 -06:00
parent 9126c46503
commit 69aece333b
2 changed files with 17 additions and 0 deletions

View File

@ -49,6 +49,7 @@ class openstack_tasks::roles::compute {
$use_1g_huge_pages = $allocated_hugepages['1G']
$libvirt_type = hiera('libvirt_type', undef)
$kombu_compression = hiera('kombu_compression', $::os_service_default)
$nova_cache = pick($nova_hash['use_cache'], true)
$dpdk_config = hiera_hash('dpdk', {})
$enable_dpdk = pick($dpdk_config['enabled'], false)
@ -285,6 +286,12 @@ class openstack_tasks::roles::compute {
block_device_allocate_retries_interval => $block_device_allocate_retries_interval,
}
class { '::nova::cache':
enabled => $nova_cache,
backend => 'oslo_cache.memcache_pool',
memcache_servers => $memcached_addresses,
}
class { '::nova::availability_zone':
default_availability_zone => $nova_hash_real['default_availability_zone'],
default_schedule_zone => $nova_hash_real['default_schedule_zone'],

View File

@ -83,6 +83,8 @@ describe manifest do
let(:config_drive_format) { Noop.puppet_function 'pick', compute_hash['config_drive_format'], 'vfat' }
let(:log_facility) { Noop.hiera 'syslog_log_facility_nova', 'LOG_LOCAL6' }
let(:use_cache) { Noop.puppet_function 'pick', nova_hash['use_cache'], true }
# Legacy openstack-compute tests
@ -348,6 +350,14 @@ describe manifest do
)
end
it 'should configure nova cache correctly' do
should contain_class('nova::cache').with(
:enabled => use_cache,
:backend => 'oslo_cache.memcache_pool',
:memcache_servers => memcache_servers.split(','),
)
end
it 'should install fping for nova API extension' do
should contain_package('fping').with('ensure' => 'present')
end