From 53ec32d121a5248fcda521c7d85130e52487b1d3 Mon Sep 17 00:00:00 2001 From: Mark Goddard Date: Fri, 19 Mar 2021 13:39:50 +0000 Subject: [PATCH] Fix overcloud provision with fast track enabled Change-Id: I98428837153ef604af9a415f7139e07d8548fd46 --- ansible/overcloud-provision.yml | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/ansible/overcloud-provision.yml b/ansible/overcloud-provision.yml index ce1c318bb..e3a8590a8 100644 --- a/ansible/overcloud-provision.yml +++ b/ansible/overcloud-provision.yml @@ -111,7 +111,16 @@ -m command -a "baremetal node provide --wait {{ wait_available_timeout }} {% raw %}{{ inventory_hostname }}{% endraw %}"' register: provide_result - until: provide_result is successful or 'is locked by host' in provide_result.stdout + until: >- + provide_result is successful or + 'is locked by host' in provide_result.stdout or + 'while it is in state "available"' in provide_result.stdout + failed_when: + - provide_result is not successful + # If fast-track deployment is enabled, it's possible that ironic will + # move the node to available, even though the initial state was + # manageable. + - "'while it is in state \"available\"' not in provide_result.stdout" retries: "{{ ironic_retries }}" delay: "{{ ironic_retry_interval }}" when: initial_provision_state in ['enroll', 'manageable']