From 242c559a044ede8c20134ba40f6643719498c6a2 Mon Sep 17 00:00:00 2001 From: Jeffrey Zhang Date: Sun, 26 Feb 2017 16:58:23 +0800 Subject: [PATCH] Add until in restart nova libvirt task retries only works with until. Change-Id: I350ee69b0eca7a1763bb7eab34f874d7e22c1340 Closes-bug: #1668023 --- ansible/roles/nova/handlers/main.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/ansible/roles/nova/handlers/main.yml b/ansible/roles/nova/handlers/main.yml index 1046b920fd..8d6174e94e 100644 --- a/ansible/roles/nova/handlers/main.yml +++ b/ansible/roles/nova/handlers/main.yml @@ -35,9 +35,11 @@ pid_mode: "{{ service.pid_mode | default('') }}" privileged: "{{ service.privileged | default(False) }}" volumes: "{{ service.volumes|reject('equalto', '')|list }}" + register: restart_nova_libvirt # NOTE(Jeffrey4l): retry 5 to remove nova_libvirt container because when # guests running, nova_libvirt will raise error even though it is removed. retries: 5 + until: restart_nova_libvirt | success when: - action != "config" - inventory_hostname in groups[service.group]