From 882d65fc4aec53499547649642f7a340f2a984a1 Mon Sep 17 00:00:00 2001 From: Manuel Buil Date: Thu, 21 Dec 2017 16:45:08 +0100 Subject: [PATCH] Add retry to OVS Manager task The previous task which starts the ovs process must be ready before the OvS manager is retrieved, otherwise, it fails. I experienced already a problem because OvS was not ready. Adding a retries logic fixes the problem Change-Id: I7bfecfc65c76e31ea14aae4728679e434193c092 Signed-off-by: Manuel Buil --- tasks/providers/setup_ovs_opendaylight.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/tasks/providers/setup_ovs_opendaylight.yml b/tasks/providers/setup_ovs_opendaylight.yml index b28c287a..98a2be25 100644 --- a/tasks/providers/setup_ovs_opendaylight.yml +++ b/tasks/providers/setup_ovs_opendaylight.yml @@ -23,6 +23,9 @@ command: ovs-vsctl get-manager register: ovs_manager changed_when: False + until: ovs_manager.rc == 0 + retries: 3 + delay: 5 - name: Set ODL as OvS manager command: ovs-vsctl set-manager {{ ovs_manager_list }}