Merge "Unhardcode instance_build_timeout option"
diff --git a/nova/files/queens/nova-compute.conf.Debian b/nova/files/queens/nova-compute.conf.Debian
index 2253255..d1763dd 100644
--- a/nova/files/queens/nova-compute.conf.Debian
+++ b/nova/files/queens/nova-compute.conf.Debian
@@ -3738,97 +3738,11 @@
[cache]
-#
-# From nova.conf
-#
{%- if compute.cache is defined %}
-backend = oslo_cache.memcache_pool
-enabled = true
-memcache_servers={%- for member in compute.cache.members %}{{ member.host }}:11211{% if not loop.last %},{% endif %}{%- endfor %}
+{%- set _data = compute.cache %}
+{%- include "oslo_templates/files/queens/oslo/_cache.conf" %}
{%- endif %}
-# Prefix for building the configuration dictionary for the cache
-# region. This should not need to be changed unless there is another
-# dogpile.cache region with the same configuration name. (string
-# value)
-#config_prefix = cache.oslo
-
-# Default TTL, in seconds, for any cached item in the dogpile.cache
-# region. This applies to any cached method that doesn't have an
-# explicit cache expiration time defined for it. (integer value)
-#expiration_time = 600
-
-# Cache backend module. For eventlet-based or environments with
-# hundreds of threaded servers, Memcache with pooling
-# (oslo_cache.memcache_pool) is recommended. For environments with
-# less than 100 threaded servers, Memcached (dogpile.cache.memcached)
-# or Redis (dogpile.cache.redis) is recommended. Test environments
-# with a single instance of the server can use the
-# dogpile.cache.memory backend. (string value)
-# Possible values:
-# oslo_cache.memcache_pool - <No description provided>
-# oslo_cache.dict - <No description provided>
-# oslo_cache.mongo - <No description provided>
-# oslo_cache.etcd3gw - <No description provided>
-# dogpile.cache.memcached - <No description provided>
-# dogpile.cache.pylibmc - <No description provided>
-# dogpile.cache.bmemcached - <No description provided>
-# dogpile.cache.dbm - <No description provided>
-# dogpile.cache.redis - <No description provided>
-# dogpile.cache.memory - <No description provided>
-# dogpile.cache.memory_pickle - <No description provided>
-# dogpile.cache.null - <No description provided>
-#backend = dogpile.cache.null
-
-# Arguments supplied to the backend module. Specify this option once
-# per argument to be passed to the dogpile.cache backend. Example
-# format: "<argname>:<value>". (multi valued)
-#backend_argument =
-
-# Proxy classes to import that will affect the way the dogpile.cache
-# backend functions. See the dogpile.cache documentation on changing-
-# backend-behavior. (list value)
-#proxies =
-
-# Global toggle for caching. (boolean value)
-#enabled = false
-
-# Extra debugging from the cache backend (cache keys,
-# get/set/delete/etc calls). This is only really useful if you need to
-# see the specific cache-backend get/set/delete calls with the
-# keys/values. Typically this should be left set to false. (boolean
-# value)
-#debug_cache_backend = false
-
-# Memcache servers in the format of "host:port".
-# (dogpile.cache.memcache and oslo_cache.memcache_pool backends only).
-# (list value)
-#memcache_servers = localhost:11211
-
-# Number of seconds memcached server is considered dead before it is
-# tried again. (dogpile.cache.memcache and oslo_cache.memcache_pool
-# backends only). (integer value)
-#memcache_dead_retry = 300
-
-# Timeout in seconds for every call to a server.
-# (dogpile.cache.memcache and oslo_cache.memcache_pool backends only).
-# (integer value)
-#memcache_socket_timeout = 3
-
-# Max total number of open connections to every memcached server.
-# (oslo_cache.memcache_pool backend only). (integer value)
-#memcache_pool_maxsize = 10
-
-# Number of seconds a connection to memcached is held unused in the
-# pool before it is closed. (oslo_cache.memcache_pool backend only).
-# (integer value)
-#memcache_pool_unused_timeout = 60
-
-# Number of seconds that an operation will wait to get a memcache
-# client connection. (integer value)
-#memcache_pool_connection_get_timeout = 10
-
-
[cells]
#
# DEPRECATED: Cells options allow you to use cells v1 functionality in
diff --git a/nova/files/queens/nova-controller.conf.Debian b/nova/files/queens/nova-controller.conf.Debian
index 0bf9f65..948084c 100644
--- a/nova/files/queens/nova-controller.conf.Debian
+++ b/nova/files/queens/nova-controller.conf.Debian
@@ -3740,96 +3740,11 @@
[cache]
-#
-# From nova.conf
-#
{%- if controller.cache is defined %}
-backend = oslo_cache.memcache_pool
-enabled = true
-memcache_servers={%- for member in controller.cache.members %}{{ member.host }}:11211{% if not loop.last %},{% endif %}{%- endfor %}
+{%- set _data = controller.cache %}
+{%- include "oslo_templates/files/queens/oslo/_cache.conf" %}
{%- endif %}
-# Prefix for building the configuration dictionary for the cache
-# region. This should not need to be changed unless there is another
-# dogpile.cache region with the same configuration name. (string
-# value)
-#config_prefix = cache.oslo
-
-# Default TTL, in seconds, for any cached item in the dogpile.cache
-# region. This applies to any cached method that doesn't have an
-# explicit cache expiration time defined for it. (integer value)
-#expiration_time = 600
-
-# Cache backend module. For eventlet-based or environments with
-# hundreds of threaded servers, Memcache with pooling
-# (oslo_cache.memcache_pool) is recommended. For environments with
-# less than 100 threaded servers, Memcached (dogpile.cache.memcached)
-# or Redis (dogpile.cache.redis) is recommended. Test environments
-# with a single instance of the server can use the
-# dogpile.cache.memory backend. (string value)
-# Possible values:
-# oslo_cache.memcache_pool - <No description provided>
-# oslo_cache.dict - <No description provided>
-# oslo_cache.mongo - <No description provided>
-# oslo_cache.etcd3gw - <No description provided>
-# dogpile.cache.memcached - <No description provided>
-# dogpile.cache.pylibmc - <No description provided>
-# dogpile.cache.bmemcached - <No description provided>
-# dogpile.cache.dbm - <No description provided>
-# dogpile.cache.redis - <No description provided>
-# dogpile.cache.memory - <No description provided>
-# dogpile.cache.memory_pickle - <No description provided>
-# dogpile.cache.null - <No description provided>
-#backend = dogpile.cache.null
-
-# Arguments supplied to the backend module. Specify this option once
-# per argument to be passed to the dogpile.cache backend. Example
-# format: "<argname>:<value>". (multi valued)
-#backend_argument =
-
-# Proxy classes to import that will affect the way the dogpile.cache
-# backend functions. See the dogpile.cache documentation on changing-
-# backend-behavior. (list value)
-#proxies =
-
-# Global toggle for caching. (boolean value)
-#enabled = false
-
-# Extra debugging from the cache backend (cache keys,
-# get/set/delete/etc calls). This is only really useful if you need to
-# see the specific cache-backend get/set/delete calls with the
-# keys/values. Typically this should be left set to false. (boolean
-# value)
-#debug_cache_backend = false
-
-# Memcache servers in the format of "host:port".
-# (dogpile.cache.memcache and oslo_cache.memcache_pool backends only).
-# (list value)
-#memcache_servers = localhost:11211
-
-# Number of seconds memcached server is considered dead before it is
-# tried again. (dogpile.cache.memcache and oslo_cache.memcache_pool
-# backends only). (integer value)
-#memcache_dead_retry = 300
-
-# Timeout in seconds for every call to a server.
-# (dogpile.cache.memcache and oslo_cache.memcache_pool backends only).
-# (integer value)
-#memcache_socket_timeout = 3
-
-# Max total number of open connections to every memcached server.
-# (oslo_cache.memcache_pool backend only). (integer value)
-#memcache_pool_maxsize = 10
-
-# Number of seconds a connection to memcached is held unused in the
-# pool before it is closed. (oslo_cache.memcache_pool backend only).
-# (integer value)
-#memcache_pool_unused_timeout = 60
-
-# Number of seconds that an operation will wait to get a memcache
-# client connection. (integer value)
-#memcache_pool_connection_get_timeout = 10
-
[cells]
#
diff --git a/nova/files/rocky/nova-compute.conf.Debian b/nova/files/rocky/nova-compute.conf.Debian
index ed0aceb..62d8503 100644
--- a/nova/files/rocky/nova-compute.conf.Debian
+++ b/nova/files/rocky/nova-compute.conf.Debian
@@ -3223,88 +3223,11 @@
[cache]
-
-#
-# From nova.conf
-#
-
{%- if compute.cache is defined %}
-# Global toggle for caching. (boolean value)
-enabled = true
-
-# Cache backend module. For eventlet-based or environments with hundreds of
-# threaded servers, Memcache with pooling (oslo_cache.memcache_pool) is
-# recommended. For environments with less than 100 threaded servers, Memcached
-# (dogpile.cache.memcached) or Redis (dogpile.cache.redis) is recommended. Test
-# environments with a single instance of the server can use the
-# dogpile.cache.memory backend. (string value)
-# Possible values:
-# oslo_cache.memcache_pool - <No description provided>
-# oslo_cache.dict - <No description provided>
-# oslo_cache.mongo - <No description provided>
-# oslo_cache.etcd3gw - <No description provided>
-# dogpile.cache.memcached - <No description provided>
-# dogpile.cache.pylibmc - <No description provided>
-# dogpile.cache.bmemcached - <No description provided>
-# dogpile.cache.dbm - <No description provided>
-# dogpile.cache.redis - <No description provided>
-# dogpile.cache.memory - <No description provided>
-# dogpile.cache.memory_pickle - <No description provided>
-# dogpile.cache.null - <No description provided>
-backend = oslo_cache.memcache_pool
-
-# Memcache servers in the format of "host:port". (dogpile.cache.memcache and
-# oslo_cache.memcache_pool backends only). (list value)
-memcache_servers = {%- for member in compute.cache.members %}{{ member.host }}:11211{% if not loop.last %},{% endif %}{%- endfor %}
+{%- set _data = compute.cache %}
+{%- include "oslo_templates/files/" ~ compute.version ~ "/oslo/_cache.conf" %}
{%- endif %}
-# Prefix for building the configuration dictionary for the cache region. This
-# should not need to be changed unless there is another dogpile.cache region
-# with the same configuration name. (string value)
-#config_prefix = cache.oslo
-
-# Default TTL, in seconds, for any cached item in the dogpile.cache region. This
-# applies to any cached method that doesn't have an explicit cache expiration
-# time defined for it. (integer value)
-#expiration_time = 600
-
-# Arguments supplied to the backend module. Specify this option once per
-# argument to be passed to the dogpile.cache backend. Example format:
-# "<argname>:<value>". (multi valued)
-#backend_argument =
-
-# Proxy classes to import that will affect the way the dogpile.cache backend
-# functions. See the dogpile.cache documentation on changing-backend-behavior.
-# (list value)
-#proxies =
-
-# Extra debugging from the cache backend (cache keys, get/set/delete/etc calls).
-# This is only really useful if you need to see the specific cache-backend
-# get/set/delete calls with the keys/values. Typically this should be left set
-# to false. (boolean value)
-#debug_cache_backend = false
-
-# Number of seconds memcached server is considered dead before it is tried
-# again. (dogpile.cache.memcache and oslo_cache.memcache_pool backends only).
-# (integer value)
-#memcache_dead_retry = 300
-
-# Timeout in seconds for every call to a server. (dogpile.cache.memcache and
-# oslo_cache.memcache_pool backends only). (floating point value)
-#memcache_socket_timeout = 3.0
-
-# Max total number of open connections to every memcached server.
-# (oslo_cache.memcache_pool backend only). (integer value)
-#memcache_pool_maxsize = 10
-
-# Number of seconds a connection to memcached is held unused in the pool before
-# it is closed. (oslo_cache.memcache_pool backend only). (integer value)
-#memcache_pool_unused_timeout = 60
-
-# Number of seconds that an operation will wait to get a memcache client
-# connection. (integer value)
-#memcache_pool_connection_get_timeout = 10
-
[cells]
#
diff --git a/nova/files/rocky/nova-controller.conf.Debian b/nova/files/rocky/nova-controller.conf.Debian
index 717df93..bf72a10 100644
--- a/nova/files/rocky/nova-controller.conf.Debian
+++ b/nova/files/rocky/nova-controller.conf.Debian
@@ -3218,88 +3218,11 @@
[cache]
-
-#
-# From nova.conf
-#
-
{%- if controller.cache is defined %}
-# Global toggle for caching. (boolean value)
-enabled = true
-
-# Cache backend module. For eventlet-based or environments with hundreds of
-# threaded servers, Memcache with pooling (oslo_cache.memcache_pool) is
-# recommended. For environments with less than 100 threaded servers, Memcached
-# (dogpile.cache.memcached) or Redis (dogpile.cache.redis) is recommended. Test
-# environments with a single instance of the server can use the
-# dogpile.cache.memory backend. (string value)
-# Possible values:
-# oslo_cache.memcache_pool - <No description provided>
-# oslo_cache.dict - <No description provided>
-# oslo_cache.mongo - <No description provided>
-# oslo_cache.etcd3gw - <No description provided>
-# dogpile.cache.memcached - <No description provided>
-# dogpile.cache.pylibmc - <No description provided>
-# dogpile.cache.bmemcached - <No description provided>
-# dogpile.cache.dbm - <No description provided>
-# dogpile.cache.redis - <No description provided>
-# dogpile.cache.memory - <No description provided>
-# dogpile.cache.memory_pickle - <No description provided>
-# dogpile.cache.null - <No description provided>
-backend = oslo_cache.memcache_pool
-
-# Memcache servers in the format of "host:port". (dogpile.cache.memcache and
-# oslo_cache.memcache_pool backends only). (list value)
-memcache_servers = {%- for member in controller.cache.members %}{{ member.host }}:11211{% if not loop.last %},{% endif %}{%- endfor %}
+{%- set _data = controller.cache %}
+{%- include "oslo_templates/files/" ~ controller.version ~ "/oslo/_cache.conf" %}
{%- endif %}
-# Prefix for building the configuration dictionary for the cache region. This
-# should not need to be changed unless there is another dogpile.cache region
-# with the same configuration name. (string value)
-#config_prefix = cache.oslo
-
-# Default TTL, in seconds, for any cached item in the dogpile.cache region. This
-# applies to any cached method that doesn't have an explicit cache expiration
-# time defined for it. (integer value)
-#expiration_time = 600
-
-# Arguments supplied to the backend module. Specify this option once per
-# argument to be passed to the dogpile.cache backend. Example format:
-# "<argname>:<value>". (multi valued)
-#backend_argument =
-
-# Proxy classes to import that will affect the way the dogpile.cache backend
-# functions. See the dogpile.cache documentation on changing-backend-behavior.
-# (list value)
-#proxies =
-
-# Extra debugging from the cache backend (cache keys, get/set/delete/etc calls).
-# This is only really useful if you need to see the specific cache-backend
-# get/set/delete calls with the keys/values. Typically this should be left set
-# to false. (boolean value)
-#debug_cache_backend = false
-
-# Number of seconds memcached server is considered dead before it is tried
-# again. (dogpile.cache.memcache and oslo_cache.memcache_pool backends only).
-# (integer value)
-#memcache_dead_retry = 300
-
-# Timeout in seconds for every call to a server. (dogpile.cache.memcache and
-# oslo_cache.memcache_pool backends only). (floating point value)
-#memcache_socket_timeout = 3.0
-
-# Max total number of open connections to every memcached server.
-# (oslo_cache.memcache_pool backend only). (integer value)
-#memcache_pool_maxsize = 10
-
-# Number of seconds a connection to memcached is held unused in the pool before
-# it is closed. (oslo_cache.memcache_pool backend only). (integer value)
-#memcache_pool_unused_timeout = 60
-
-# Number of seconds that an operation will wait to get a memcache client
-# connection. (integer value)
-#memcache_pool_connection_get_timeout = 10
-
[cells]
#
diff --git a/nova/upgrade/upgrade/init.sls b/nova/upgrade/upgrade/init.sls
index 31f23f8..061e474 100644
--- a/nova/upgrade/upgrade/init.sls
+++ b/nova/upgrade/upgrade/init.sls
@@ -9,5 +9,7 @@
- nova.upgrade.service_stopped
- nova.upgrade.pkgs_latest
- nova.upgrade.render_config
+{%- if controller.get('enabled', False) %}
- nova.db.offline_sync
+{%- endif %}
- nova.upgrade.service_running