Only run cellv2 host discovery on default cell

While it would be not an issue to run the host discovery on sub
sequent deploy runs, on the initial cell deplouy the discovery
fails because the cell is not yet defined in nova as this is
a manual post task after the initial cell deployment [1]

[1] https://docs.openstack.org/tripleo-docs/latest/install/advanced_deployment/deploy_cellv2.html#create-the-cell-and-discover-compute-nodes

Change-Id: I42451a8b4dcc690319439415570ce36e5c5333c3
Closes-bug: #1836915
This commit is contained in:
Martin Schuppert 2019-07-17 16:28:15 +02:00
parent cce33e878b
commit 3e7c15da24

View File

@ -32,6 +32,10 @@ parameters:
default: {}
description: Parameters specific to the role
type: json
NovaAdditionalCell:
default: false
description: Whether this is an cell additional to the default cell.
type: boolean
outputs:
container_config_scripts:
@ -51,6 +55,13 @@ outputs:
description: Common host prep tasks for nova-compute services (compute + ironic)
value: &nova_compute_common_deploy_steps_tasks
- when: step|int == 5
block:
- name: is additonal Cell?
set_fact:
nova_additional_cell: {get_param: NovaAdditionalCell}
- name: discover nodes if it is not an additional cell
when:
- not nova_additional_cell|bool
block:
- name: discover via nova_compute?
set_fact: