Merge "Add option to disable container builds on specific hosts"

This commit is contained in:
Zuul 2019-02-14 19:15:05 +00:00 committed by Gerrit Code Review
commit 02b3f17d9c
2 changed files with 21 additions and 0 deletions

View File

@ -354,6 +354,9 @@ def _add_container_hosts(assignment, config, container_name, container_type,
# Get any set host options
host_options = config[physical_host_type][host_type]
affinity = host_options.get('affinity', {})
no_containers = host_options.get('no_containers', False)
if no_containers:
properties['is_metal'] = True
container_affinity = affinity.get(container_name, 1)
# Ensures that container names are not longer than 63

View File

@ -0,0 +1,18 @@
---
features:
- |
A new option has been added allowing deployers to disable any and all
containers on a given host. The option `no_containers` is a boolean
which, if undefined, will default to *false*. This option can be added
to any host in the `openstack_user_config.yml` or via an override in
`conf.d`. When this option is set to *true* the given host will be
treated as a baremetal machine. The new option mirrors the existing
environmental option `is_metal` but allows deployers to target
specific hosts instead of entire groups.
.. code-block:: yaml
log_hosts:
infra-1:
ip: 172.16.24.2
no_containers: true