Enable oslo.cache library
Add aodh:server:cache metadata
cache:
engine: memcached
expiration_time: 600
backend_argument:
memcached_expire_time:
value: 660
members:
- host: ${_param:cluster_node01_address}
port: 11211
- host: ${_param:cluster_node02_address}
port: 11211
- host: ${_param:cluster_node01_address}
port: 11211
Enable oslo.cache in the aodh.conf file
Change-Id: I4445faafb95c3d7b4a88bd033c65cc0ba99f2488
Related-Prod: PROD-26960
(cherry picked from commit bf9a845c77edf894b9e7e86fbd42d3a0d59e1102)
diff --git a/aodh/files/queens/aodh.conf.Debian b/aodh/files/queens/aodh.conf.Debian
index 88c50fc..9ba0bce 100644
--- a/aodh/files/queens/aodh.conf.Debian
+++ b/aodh/files/queens/aodh.conf.Debian
@@ -262,3 +262,10 @@
{%- endif %}
{%- include "oslo_templates/files/queens/keystonemiddleware/_auth_token.conf" %}
{%- include "oslo_templates/files/queens/keystoneauth/_type_" + auth_type + ".conf" %}
+
+{%- if server.cache is defined %}
+{%- set _data = {} %}
+{%- do _data.update(server.cache) %}
+[cache]
+{%- include "oslo_templates/files/queens/oslo/_cache.conf" %}
+{%- endif %}
diff --git a/metadata/service/server/cluster.yml b/metadata/service/server/cluster.yml
index 4da061d..7724e24 100644
--- a/metadata/service/server/cluster.yml
+++ b/metadata/service/server/cluster.yml
@@ -55,3 +55,16 @@
rpc_thread_pool_size: 5
notifications:
store_events: true
+ cache:
+ engine: memcached
+ expiration_time: 600
+ backend_argument:
+ memcached_expire_time:
+ value: 660
+ members:
+ - host: ${_param:cluster_node01_address}
+ port: 11211
+ - host: ${_param:cluster_node02_address}
+ port: 11211
+ - host: ${_param:cluster_node03_address}
+ port: 11211
diff --git a/metadata/service/server/single.yml b/metadata/service/server/single.yml
index 20f8f5f..5615125 100644
--- a/metadata/service/server/single.yml
+++ b/metadata/service/server/single.yml
@@ -52,3 +52,12 @@
rpc_thread_pool_size: 5
notifications:
store_events: true
+ cache:
+ engine: memcached
+ expiration_time: 600
+ backend_argument:
+ memcached_expire_time:
+ value: 660
+ members:
+ - host: ${_param:single_address}
+ port: 11211
diff --git a/tests/pillar/server_cluster.sls b/tests/pillar/server_cluster.sls
index e25b502..9cf1c07 100644
--- a/tests/pillar/server_cluster.sls
+++ b/tests/pillar/server_cluster.sls
@@ -47,6 +47,10 @@
store_events: default
cache:
engine: memcached
+ expiration_time: 600
+ backend_argument:
+ memcached_expire_time:
+ value: 660
members:
- host: 127.0.0.1
port: 11211