From aaf9572d082aa679ad452df1b09f88da0fb18576 Mon Sep 17 00:00:00 2001 From: Mark Goddard Date: Thu, 4 Feb 2021 15:44:40 +0000 Subject: [PATCH] Wait for overcloud manage and provide state transitions During the 'kayobe overcloud provision' command, wait for the nodes to become manageable and available. Adds two variables, 'wait_manageable_timeout' and 'wait_available_timeout', to control the wait timeout. Change-Id: I7435bd06d58501e361312bacfa4e55394aba5b57 --- ansible/overcloud-provision.yml | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/ansible/overcloud-provision.yml b/ansible/overcloud-provision.yml index 7ad3647cb..ce1c318bb 100644 --- a/ansible/overcloud-provision.yml +++ b/ansible/overcloud-provision.yml @@ -6,6 +6,8 @@ tags: - provision vars: + wait_manageable_timeout: 60 + wait_available_timeout: 60 # Set to False to avoid waiting for the nodes to become active. wait_active: True wait_active_timeout: 600 @@ -82,7 +84,7 @@ -e @/etc/bifrost/dib.yml --limit {{ inventory_hostname }} -m command - -a "baremetal node manage {% raw %}{{ inventory_hostname }}{% endraw %}"' + -a "baremetal node manage --wait {{ wait_manageable_timeout }} {% raw %}{{ inventory_hostname }}{% endraw %}"' register: manage_result until: manage_result is successful or 'is locked by host' in manage_result.stdout retries: "{{ ironic_retries }}" @@ -107,7 +109,7 @@ -e @/etc/bifrost/dib.yml --limit {{ inventory_hostname }} -m command - -a "baremetal node provide {% raw %}{{ inventory_hostname }}{% endraw %}"' + -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 retries: "{{ ironic_retries }}"