From 3fff96c361a929764b337bb5784ec2efa169111c Mon Sep 17 00:00:00 2001 From: Saravanan KR Date: Mon, 10 Feb 2020 18:30:34 +0530 Subject: [PATCH] Fail NetworkConfig task on timeout Running os-net-config as async, with failed_when as false results in undefined variable error if async task times out. Instead of ignoring failure of task, check for the presense of results of the command execution 'rc', if it is not defined, then rest of the tasks are not useful. Closes-Bug: #1862627 Change-Id: Ibbcde856ac69bf73a47086d95a52c3b1a0d10911 (cherry picked from commit f17e06a778e7663bcd88d6d83474d426f62ef6be) --- common/deploy-steps.j2 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/common/deploy-steps.j2 b/common/deploy-steps.j2 index 264f6b25d5..d892f55b0d 100644 --- a/common/deploy-steps.j2 +++ b/common/deploy-steps.j2 @@ -564,7 +564,7 @@ outputs: bridge_name: "{{ neutron_physical_bridge_name }}" interface_name: "{{ neutron_public_interface_name }}" register: NetworkConfig_result - failed_when: false + failed_when: NetworkConfig_result.rc is not defined - name: Write rc of NetworkConfig script copy: