Merge "Add options to configure cache in nova"
This commit is contained in:
commit
1f6bea1768
@ -131,6 +131,9 @@ KEYSTONE_UNIQUE_LAST_PASSWORD_COUNT=${KEYSTONE_UNIQUE_LAST_PASSWORD_COUNT:-2}
|
||||
# however may not be suitable for real production.
|
||||
KEYSTONE_PASSWORD_HASH_ROUNDS=${KEYSTONE_PASSWORD_HASH_ROUNDS:-4}
|
||||
|
||||
# Cache settings
|
||||
KEYSTONE_ENABLE_CACHE=${KEYSTONE_ENABLE_CACHE:-True}
|
||||
|
||||
# Functions
|
||||
# ---------
|
||||
|
||||
@ -213,9 +216,9 @@ function configure_keystone {
|
||||
iniset $KEYSTONE_CONF resource driver "$KEYSTONE_RESOURCE_BACKEND"
|
||||
|
||||
# Enable caching
|
||||
iniset $KEYSTONE_CONF cache enabled "True"
|
||||
iniset $KEYSTONE_CONF cache backend "dogpile.cache.memcached"
|
||||
iniset $KEYSTONE_CONF cache memcache_servers localhost:11211
|
||||
iniset $KEYSTONE_CONF cache enabled $KEYSTONE_ENABLE_CACHE
|
||||
iniset $KEYSTONE_CONF cache backend $CACHE_BACKEND
|
||||
iniset $KEYSTONE_CONF cache memcache_servers $MEMCACHE_SERVERS
|
||||
|
||||
iniset_rpc_backend keystone $KEYSTONE_CONF oslo_messaging_notifications
|
||||
|
||||
|
12
lib/nova
12
lib/nova
@ -91,6 +91,7 @@ NOVA_SERVICE_PROTOCOL=${NOVA_SERVICE_PROTOCOL:-$SERVICE_PROTOCOL}
|
||||
NOVA_SERVICE_LOCAL_HOST=${NOVA_SERVICE_LOCAL_HOST:-$SERVICE_LOCAL_HOST}
|
||||
NOVA_SERVICE_LISTEN_ADDRESS=${NOVA_SERVICE_LISTEN_ADDRESS:-$(ipv6_unquote $SERVICE_LISTEN_ADDRESS)}
|
||||
METADATA_SERVICE_PORT=${METADATA_SERVICE_PORT:-8775}
|
||||
NOVA_ENABLE_CACHE=${NOVA_ENABLE_CACHE:-True}
|
||||
|
||||
# Option to enable/disable config drive
|
||||
# NOTE: Set ``FORCE_CONFIG_DRIVE="False"`` to turn OFF config drive
|
||||
@ -416,8 +417,8 @@ function create_nova_conf {
|
||||
iniset $NOVA_CONF DEFAULT bindir "/usr/bin"
|
||||
fi
|
||||
|
||||
# only setup database connections if there are services that
|
||||
# require them running on the host. The ensures that n-cpu doesn't
|
||||
# only setup database connections and cache backend if there are services
|
||||
# that require them running on the host. The ensures that n-cpu doesn't
|
||||
# leak a need to use the db in a multinode scenario.
|
||||
if is_service_enabled n-api n-cond n-sched; then
|
||||
# If we're in multi-tier cells mode, we want our control services pointing
|
||||
@ -434,6 +435,13 @@ function create_nova_conf {
|
||||
|
||||
iniset $NOVA_CONF database connection `database_connection_url $db`
|
||||
iniset $NOVA_CONF api_database connection `database_connection_url nova_api`
|
||||
|
||||
# Cache related settings
|
||||
# Those settings aren't really needed in n-cpu thus it is configured
|
||||
# only on nodes which runs controller services
|
||||
iniset $NOVA_CONF cache enabled $NOVA_ENABLE_CACHE
|
||||
iniset $NOVA_CONF cache backend $CACHE_BACKEND
|
||||
iniset $NOVA_CONF cache memcache_servers $MEMCACHE_SERVERS
|
||||
fi
|
||||
|
||||
if is_service_enabled n-api; then
|
||||
|
4
stackrc
4
stackrc
@ -770,6 +770,10 @@ ETCD_DOWNLOAD_LOCATION=$ETCD_DOWNLOAD_URL/$ETCD_VERSION/$ETCD_DOWNLOAD_FILE
|
||||
# etcd is always required, so place it into list of pre-cached downloads
|
||||
EXTRA_CACHE_URLS+=",$ETCD_DOWNLOAD_LOCATION"
|
||||
|
||||
# Cache settings
|
||||
CACHE_BACKEND=${CACHE_BACKEND:-"dogpile.cache.memcached"}
|
||||
MEMCACHE_SERVERS=${MEMCACHE_SERVERS:-"localhost:11211"}
|
||||
|
||||
# Detect duplicate values in IMAGE_URLS
|
||||
for image_url in ${IMAGE_URLS//,/ }; do
|
||||
if [ $(echo "$IMAGE_URLS" | grep -o -F "$image_url" | wc -l) -gt 1 ]; then
|
||||
|
Loading…
Reference in New Issue
Block a user