diff --git a/osa_toolkit/generate.py b/osa_toolkit/generate.py index 158edd5398..6ddd731eae 100755 --- a/osa_toolkit/generate.py +++ b/osa_toolkit/generate.py @@ -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 diff --git a/releasenotes/notes/no_containers_option-39034d48825e8966.yaml b/releasenotes/notes/no_containers_option-39034d48825e8966.yaml new file mode 100644 index 0000000000..9df5e952e4 --- /dev/null +++ b/releasenotes/notes/no_containers_option-39034d48825e8966.yaml @@ -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