Browse Source

Use dogpile.cache.memcached in nova caching

According to the latest keystone configuration help,
dogpile.cache.memcached is more recommended option in TripleO
deployment than oslo_cache.memcache_pool, because it uses httpd+wsgi
to run apis and has less than 100 threaded servers.

This patch replaces backend used in nova caching, and also introduces
the new parameter tripleo::profile::base::nova::cache_backend so that
operators can use another backend if they want.

Change-Id: I36c0c474fb5e665392c1fb8d93dc3949ab6e8b67
(cherry picked from commit 8d4ea840bf)
changes/90/793190/1
Takashi Kajinami 1 year ago
committed by Grzegorz Grasza
parent
commit
8d3ea85a36
2 changed files with 8 additions and 3 deletions
  1. +7
    -2
      manifests/profile/base/nova.pp
  2. +1
    -1
      spec/classes/tripleo_profile_base_nova_spec.rb

+ 7
- 2
manifests/profile/base/nova.pp View File

@ -86,7 +86,11 @@
# (Optional) Enable the use of cache. Note that it is unsupported
# to disable this key. It is only useful for debugging purposes.
# Defaults to true
#
# [*cache_backend*]
# (Optional) Backend implementation to store cache
# Defaults to 'dogpile.cache.memcached'
#
class tripleo::profile::base::nova (
$bootstrap_node = hiera('nova_api_short_bootstrap_node_name', undef),
$oslomsg_rpc_proto = hiera('oslo_messaging_rpc_scheme', 'rabbit'),
@ -105,6 +109,7 @@ class tripleo::profile::base::nova (
$memcached_ips = hiera('memcached_node_ips', []),
$memcached_port = hiera('memcached_port', 11211),
$enable_cache = true,
$cache_backend = 'dogpile.cache.memcached',
) {
if $bootstrap_node and $::hostname == downcase($bootstrap_node) {
@ -131,7 +136,7 @@ class tripleo::profile::base::nova (
include ::nova::logging
class { '::nova::cache':
enabled => $enable_cache,
backend => 'oslo_cache.memcache_pool',
backend => $cache_backend,
memcache_servers => $memcache_servers,
}
class { '::nova':


+ 1
- 1
spec/classes/tripleo_profile_base_nova_spec.rb View File

@ -55,7 +55,7 @@ describe 'tripleo::profile::base::nova' do
is_expected.to contain_class('nova::logging')
is_expected.to contain_class('nova::cache').with(
:enabled => true,
:backend => 'oslo_cache.memcache_pool',
:backend => 'dogpile.cache.memcached',
:memcache_servers => ['127.0.0.1:11211']
)
is_expected.to contain_class('nova::placement')


Loading…
Cancel
Save