Finally, in deploy.yml, the include of discover_computes.yml was changed from:
when: inventory_hostname in groups[nova_cell_conductor_group]
to:
when:
# Run discovery when one or more compute hosts are in the Ansible batch,
# and there is a cell conductor in the inventory to delegate to.
- all_computes_in_batch | length > 0
- inventory_hostname == all_computes_in_batch[0]
- groups[nova_cell_conductor_group] | length > 0
So the task is supposed to be executed on one of the compute nodes, and delegated to one of the cell conductors.
However, in the logs in the description, the task has been executed on what appear to be a controller and a cell controller.
The task in the description is imported from two places, but only in discover_ computes. yml is it delegated. In https:/ /review. opendev. org/c/openstack /kolla- ansible/ +/715474/, the following condition was removed from that task:
when: inventory_hostname == groups[ nova_conductor. group][ 0] | default(None)
At the same time, the following was added to the import of get_cell_ settings. yml:
delegate_to: "{{ groups[ nova_cell_ conductor_ group][ 0] }}"
Finally, in deploy.yml, the include of discover_ computes. yml was changed from:
when: inventory_hostname in groups[ nova_cell_ conductor_ group]
to:
when: in_batch | length > 0 in_batch[ 0] nova_cell_ conductor_ group] | length > 0
# Run discovery when one or more compute hosts are in the Ansible batch,
# and there is a cell conductor in the inventory to delegate to.
- all_computes_
- inventory_hostname == all_computes_
- groups[
So the task is supposed to be executed on one of the compute nodes, and delegated to one of the cell conductors.
However, in the logs in the description, the task has been executed on what appear to be a controller and a cell controller.