Cache metadata entries in memory for 5 seconds, starting in icehouse.

This commit is contained in:
Corey Bryant 2014-09-08 19:02:06 +00:00
parent 2cc8ced26e
commit 75c6fae078
2 changed files with 21 additions and 0 deletions

View File

@ -0,0 +1,19 @@
###############################################################################
# [ WARNING ]
# Configuration file maintained by Juju. Local changes may be overwritten.
###############################################################################
# Metadata service seems to cache neutron api url from keystone so trigger
# restart if it changes: {{ quantum_url }}
[DEFAULT]
auth_url = {{ service_protocol }}://{{ keystone_host }}:{{ service_port }}/v2.0
auth_region = {{ region }}
admin_tenant_name = {{ service_tenant }}
admin_user = {{ service_username }}
admin_password = {{ service_password }}
root_helper = sudo neutron-rootwrap /etc/neutron/rootwrap.conf
state_path = /var/lib/neutron
# Gateway runs a metadata API server locally
nova_metadata_ip = {{ local_ip }}
nova_metadata_port = 8775
metadata_proxy_shared_secret = {{ shared_secret }}
cache_url = memory://?default_ttl=5

View File

@ -628,6 +628,8 @@ class QuantumGatewayBasicDeployment(OpenStackAmuletDeployment):
'nova_metadata_ip': quantum_gateway_relation['private-address'],
'nova_metadata_port': '8775'
}
if self._get_openstack_release() >= self.precise_icehouse:
expected['cache_url'] = 'memory://?default_ttl=5'
ret = u.validate_config_data(unit, conf, 'DEFAULT', expected)
if ret: