Remove cache configuration from service level
Cache configuration is specific to each cluster and in
other formulas is kept on system level with ability to override
from cluster level. Cache configuration for Gnocchi should be
aligned with this approach.
Also members option is made optional
Change-Id: I61a5e49a6ab8a10e240015bed7b281a5c103aa59
diff --git a/gnocchi/files/4.0/gnocchi.conf b/gnocchi/files/4.0/gnocchi.conf
index 1658172..0f08a08 100644
--- a/gnocchi/files/4.0/gnocchi.conf
+++ b/gnocchi/files/4.0/gnocchi.conf
@@ -57,7 +57,7 @@
{%- endif %}
-{%- if server.cache is defined %}
+{%- if server.get('cache', {}).members is defined %}
memcached_servers={%- for member in server.cache.members %}{{ member.host }}:{{ member.port }}{% if not loop.last %},{% endif %}{%- endfor %}
{%- endif %}
diff --git a/metadata/service/server/cluster.yml b/metadata/service/server/cluster.yml
index 4b95b57..0303fae 100644
--- a/metadata/service/server/cluster.yml
+++ b/metadata/service/server/cluster.yml
@@ -19,13 +19,4 @@
private_port: 5000
user: gnocchi
password: ${_param:keystone_gnocchi_password}
- tenant: service
- cache:
- engine: memcached
- members:
- - host: ${_param:cluster_node01_address}
- port: 11211
- - host: ${_param:cluster_node02_address}
- port: 11211
- - host: ${_param:cluster_node03_address}
- port: 11211
\ No newline at end of file
+ tenant: service
\ No newline at end of file
diff --git a/metadata/service/server/single.yml b/metadata/service/server/single.yml
index fb9bf26..cc48bbb 100644
--- a/metadata/service/server/single.yml
+++ b/metadata/service/server/single.yml
@@ -21,9 +21,4 @@
user: gnocchi
password: ${_param:keystone_gnocchi_password}
tenant: service
- auth_type: password
- cache:
- engine: memcached
- members:
- - host: ${_param:single_address}
- port: 11211
\ No newline at end of file
+ auth_type: password
\ No newline at end of file