From 855a7803198c6632a049ac54c26fed0d23e2dadb Mon Sep 17 00:00:00 2001 From: Steve Baker Date: Thu, 13 Aug 2020 14:23:16 +1200 Subject: [PATCH] Wait for lock release during power state change When power state change is slow, the subsequent provide workflow can fail because getting a lock on the node times out. Apparently a node can remain locked for some time after a power state change, so this issue should be solved by *also* waiting for the node to be unlocked in the wait_for_power_state action. Change-Id: I26f23330c50ccf7cb11fb9171d0a82279a497d22 Closes-Bug: #1846791 (cherry picked from commit bc29d7f938179e593403a29510d9989bd52e647c) --- workbooks/baremetal.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/workbooks/baremetal.yaml b/workbooks/baremetal.yaml index a8c73a28f..0092491cc 100644 --- a/workbooks/baremetal.yaml +++ b/workbooks/baremetal.yaml @@ -84,12 +84,12 @@ workflows: action: ironic.node_get input: node_id: <% $.node_uuid %> - fields: ['power_state', 'last_error'] + fields: ['power_state', 'last_error', 'reservation'] timeout: 120 #2 minutes retry: delay: 6 count: 20 - continue-on: <% not task().result.power_state in [$.target_state, $.error_state] %> + continue-on: <% not (task().result.power_state in [$.target_state, $.error_state] and task().result.reservation = null)%> on-complete: - state_not_reached: <% task().result.power_state != $.target_state %>