Fix removing nova_libvirt container issue
Retry once when removing or upgrading nova_libvirt to ensure it is removed Closes-Bug: #1617741 Change-Id: I8b5046a438c0ef3599a4333bbe77333f0af323ff Signed-off-by: Jeffrey Zhang <zhang.lei.fly@gmail.com>
This commit is contained in:
parent
92b2fd94c1
commit
9092f4a104
@ -164,12 +164,16 @@
|
|||||||
name: "{{ item[0]['name'] }}"
|
name: "{{ item[0]['name'] }}"
|
||||||
action: "remove_container"
|
action: "remove_container"
|
||||||
register: remove_containers
|
register: remove_containers
|
||||||
|
until: remote_container|success
|
||||||
|
retries: "{{ item[0]['retries']|default(0) }}"
|
||||||
when:
|
when:
|
||||||
- inventory_hostname in groups[item[0]['group']]
|
- inventory_hostname in groups[item[0]['group']]
|
||||||
- config_strategy == "COPY_ONCE" or item[1]['KOLLA_CONFIG_STRATEGY'] == 'COPY_ONCE'
|
- config_strategy == "COPY_ONCE" or item[1]['KOLLA_CONFIG_STRATEGY'] == 'COPY_ONCE'
|
||||||
- item[2]['rc'] == 1
|
- item[2]['rc'] == 1
|
||||||
with_together:
|
with_together:
|
||||||
- [{ name: nova_libvirt, group: compute },
|
# NOTE(Jeffrey4l): retry 1 to remove nova_libvirt container because when
|
||||||
|
# guests running, nova_libvirt will raise error even though it is removed.
|
||||||
|
- [{ name: nova_libvirt, group: compute, retries: 1 },
|
||||||
{ name: nova_ssh, group: compute },
|
{ name: nova_ssh, group: compute },
|
||||||
{ name: nova_conductor, group: nova-conductor },
|
{ name: nova_conductor, group: nova-conductor },
|
||||||
{ name: nova_api, group: nova-api },
|
{ name: nova_api, group: nova-api },
|
||||||
|
@ -18,6 +18,11 @@
|
|||||||
- "libvirtd:/var/lib/libvirt"
|
- "libvirtd:/var/lib/libvirt"
|
||||||
- "nova_compute:/var/lib/nova/"
|
- "nova_compute:/var/lib/nova/"
|
||||||
- "nova_libvirt_qemu:/etc/libvirt/qemu"
|
- "nova_libvirt_qemu:/etc/libvirt/qemu"
|
||||||
|
register: start_nova_libvirt_container
|
||||||
|
# NOTE(Jeffrey4l): retry 1 to remove nova_libvirt container because when
|
||||||
|
# guests running, nova_libvirt will raise error even though it is removed.
|
||||||
|
retries: 1
|
||||||
|
until: start_nova_libvirt_container|success
|
||||||
when: inventory_hostname in groups['compute']
|
when: inventory_hostname in groups['compute']
|
||||||
|
|
||||||
- name: Prepare volumes list
|
- name: Prepare volumes list
|
||||||
|
Loading…
Reference in New Issue
Block a user