From f5d06ad80225fa0d626e84f186f9b2bd3eb97e4c Mon Sep 17 00:00:00 2001 From: Dmitry Tantsur Date: Mon, 4 Mar 2019 17:20:38 +0100 Subject: [PATCH] Fix running the baremetal provide workflow with node names Currently we try to pass the same input to the cells v2 discovery workflow, but it only accepts node UUIDs. Convert names to UUIDs before calling it. Change-Id: I09d4104b42e858cf49242b191cd1aec17f9a8b8a Closes-Bug: #1818541 (cherry picked from commit 03454b89a1451a3e6c2930a2f9217efb26cddea0) --- .../notes/provide-name-f75b6b61d3d8d693.yaml | 4 ++++ workbooks/baremetal.yaml | 12 +++++++++++- 2 files changed, 15 insertions(+), 1 deletion(-) create mode 100644 releasenotes/notes/provide-name-f75b6b61d3d8d693.yaml diff --git a/releasenotes/notes/provide-name-f75b6b61d3d8d693.yaml b/releasenotes/notes/provide-name-f75b6b61d3d8d693.yaml new file mode 100644 index 000000000..ead4eb493 --- /dev/null +++ b/releasenotes/notes/provide-name-f75b6b61d3d8d693.yaml @@ -0,0 +1,4 @@ +--- +fixes: + - | + Fixes running the baremetal ``provide`` workflow with node names. diff --git a/workbooks/baremetal.yaml b/workbooks/baremetal.yaml index 058eb24d3..8ca288df4 100644 --- a/workbooks/baremetal.yaml +++ b/workbooks/baremetal.yaml @@ -1182,9 +1182,19 @@ workflows: tasks: cell_v2_discover_hosts: - on-success: wait_for_nova_resources + on-success: name_to_uuids action: tripleo.baremetal.cell_v2_discover_hosts + name_to_uuids: + on-success: wait_for_nova_resources + action: ironic.node_get + input: + node_id: <% $.node %> + fields: ['uuid'] + with-items: node in <% $.node_uuids %> + publish: + node_uuids: <% task().result.uuid %> + wait_for_nova_resources: with-items: node_uuid in <% $.node_uuids %> action: nova.hypervisors_find hypervisor_hostname=<% $.node_uuid %>