Merge "Remove all the "container_cli rmi -f" from HA containers"

This commit is contained in:
Zuul 2020-02-03 17:55:42 +00:00 committed by Gerrit Code Review
commit a811055fba
10 changed files with 0 additions and 130 deletions

View File

@ -260,19 +260,6 @@ outputs:
container_image_latest: "{{cinder_backup_image_latest}}" container_image_latest: "{{cinder_backup_image_latest}}"
when: when:
- old_cinder_backup_image_id.stdout != new_cinder_backup_image_id.stdout - old_cinder_backup_image_id.stdout != new_cinder_backup_image_id.stdout
- block:
- name: Get a list of containers using cinder_backup image
shell: "{{container_cli}} ps -a -q -f 'ancestor={{old_cinder_backup_image_id.stdout}}'"
register: cinder_backup_containers_to_destroy
# It will be recreated with the deploy step.
- name: Remove any containers using the same cinder_backup image
shell: "{{container_cli}} rm -fv {{item}}"
with_items: "{{ cinder_backup_containers_to_destroy.stdout_lines }}"
- name: Remove previous cinder_backup images
shell: "{{container_cli}} rmi -f {{old_cinder_backup_image_id.stdout}}"
when:
- old_cinder_backup_image_id.stdout != ''
- old_cinder_backup_image_id.stdout != new_cinder_backup_image_id.stdout
upgrade_tasks: upgrade_tasks:
- name: Prepare switch of cinder_backup image name - name: Prepare switch of cinder_backup image name

View File

@ -246,19 +246,6 @@ outputs:
container_image_latest: "{{cinder_volume_image_latest}}" container_image_latest: "{{cinder_volume_image_latest}}"
when: when:
- old_cinder_volume_image_id.stdout != new_cinder_volume_image_id.stdout - old_cinder_volume_image_id.stdout != new_cinder_volume_image_id.stdout
- block:
- name: Get a list of containers using cinder_volume image
shell: "{{container_cli}} ps -a -q -f 'ancestor={{old_cinder_volume_image_id.stdout}}'"
register: cinder_volume_containers_to_destroy
# It will be recreated with the delpoy step.
- name: Remove any containers using the same cinder_volume image
shell: "{{container_cli}} rm -fv {{item}}"
with_items: "{{ cinder_volume_containers_to_destroy.stdout_lines }}"
- name: Remove previous cinder_volume images
shell: "{{container_cli}} rmi -f {{old_cinder_volume_image_id.stdout}}"
when:
- old_cinder_volume_image_id.stdout != ''
- old_cinder_volume_image_id.stdout != new_cinder_volume_image_id.stdout
upgrade_tasks: upgrade_tasks:
- name: Prepare switch of cinder_volume image name - name: Prepare switch of cinder_volume image name

View File

@ -352,19 +352,6 @@ outputs:
container_image_latest: "{{galera_image_latest}}" container_image_latest: "{{galera_image_latest}}"
when: when:
- old_galera_image_id.stdout != new_galera_image_id.stdout - old_galera_image_id.stdout != new_galera_image_id.stdout
- block:
- name: Get a list of container using galera image
shell: "{{container_cli}} ps -a -q -f 'ancestor={{old_galera_image_id.stdout}}'"
register: galera_containers_to_destroy
# It will be recreated with the delpoy step.
- name: Remove any container using the same galera image
shell: "{{container_cli}} rm -fv {{item}}"
with_items: "{{ galera_containers_to_destroy.stdout_lines }}"
- name: Remove previous galera images
shell: "{{container_cli}} rmi -f {{old_galera_image_id.stdout}}"
when:
- old_galera_image_id.stdout != ''
- old_galera_image_id.stdout != new_galera_image_id.stdout
upgrade_tasks: upgrade_tasks:
- vars: - vars:

View File

@ -330,19 +330,6 @@ outputs:
container_image_latest: "{{redis_image_latest}}" container_image_latest: "{{redis_image_latest}}"
when: when:
- old_redis_image_id.stdout != new_redis_image_id.stdout - old_redis_image_id.stdout != new_redis_image_id.stdout
- block:
- name: Get a list of containers using redis image
shell: "{{container_cli}} ps -a -q -f 'ancestor={{old_redis_image_id.stdout}}'"
register: redis_containers_to_destroy
# It will be recreated with the delpoy step.
- name: Remove any containers using the same redis image
shell: "{{container_cli}} rm -fv {{item}}"
with_items: "{{ redis_containers_to_destroy.stdout_lines }}"
- name: Remove previous redis images
shell: "{{container_cli}} rmi -f {{old_redis_image_id.stdout}}"
when:
- old_redis_image_id.stdout != ''
- old_redis_image_id.stdout != new_redis_image_id.stdout
upgrade_tasks: upgrade_tasks:
- name: Prepare switch of redis image name - name: Prepare switch of redis image name

View File

@ -431,19 +431,6 @@ outputs:
container_image_latest: "{{haproxy_image_latest}}" container_image_latest: "{{haproxy_image_latest}}"
when: when:
- old_haproxy_image_id.stdout != new_haproxy_image_id.stdout - old_haproxy_image_id.stdout != new_haproxy_image_id.stdout
- block:
- name: Get a list of container using haproxy image
shell: "{{container_cli}} ps -a -q -f 'ancestor={{old_haproxy_image_id.stdout}}'"
register: haproxy_containers_to_destroy
# It will be recreated with the delpoy step.
- name: Remove any container using the same haproxy image
shell: "{{container_cli}} rm -fv {{item}}"
with_items: "{{ haproxy_containers_to_destroy.stdout_lines }}"
- name: Remove previous haproxy images
shell: "{{container_cli}} rmi -f {{old_haproxy_image_id.stdout}}"
when:
- old_haproxy_image_id.stdout != ''
- old_haproxy_image_id.stdout != new_haproxy_image_id.stdout
upgrade_tasks: upgrade_tasks:
- name: Prepare switch of haproxy image name - name: Prepare switch of haproxy image name

View File

@ -240,19 +240,6 @@ outputs:
container_image_latest: "{{manila_share_image_latest}}" container_image_latest: "{{manila_share_image_latest}}"
when: when:
- old_manila_share_image_id.stdout != new_manila_share_image_id.stdout - old_manila_share_image_id.stdout != new_manila_share_image_id.stdout
- block:
- name: Get a list of containers using manila_share image
shell: "{{container_cli}} ps -a -q -f 'ancestor={{old_manila_share_image_id.stdout}}'"
register: manila_share_containers_to_destroy
# It will be recreated with the delpoy step.
- name: Remove any containers using the same manila_share image
shell: "{{container_cli}} rm -fv {{item}}"
with_items: "{{ manila_share_containers_to_destroy.stdout_lines }}"
- name: Remove previous manila_share images
shell: "{{container_cli}} rmi -f {{manila_share_image_id.stdout}}"
when:
- old_manila_share_image_id.stdout != ''
- old_manila_share_image_id.stdout != new_manila_share_image_id.stdout
upgrade_tasks: upgrade_tasks:
- name: Prepare switch of manila_share image name - name: Prepare switch of manila_share image name

View File

@ -308,19 +308,6 @@ outputs:
container_image_latest: "{{ovn_dbs_image_latest}}" container_image_latest: "{{ovn_dbs_image_latest}}"
when: when:
- old_ovn_dbs_image_id.stdout != new_ovn_dbs_image_id.stdout - old_ovn_dbs_image_id.stdout != new_ovn_dbs_image_id.stdout
- block:
- name: Get a list of containers using ovn-dbs image
shell: "{{container_cli}} ps -a -q -f 'ancestor={{old_ovn_dbs_image_id.stdout}}'"
register: ovn_dbs_containers_to_destroy
# It will be recreated with the deploy step.
- name: Remove any containers using the same ovn-dbs image
shell: "{{container_cli}} rm -fv {{item}}"
with_items: "{{ ovn_dbs_containers_to_destroy.stdout_lines }}"
- name: Remove previous ovn-dbs images
shell: "{{container_cli}} rmi -f {{old_ovn_dbs_image_id.stdout}}"
when:
- old_ovn_dbs_image_id.stdout != ''
- old_ovn_dbs_image_id.stdout != new_ovn_dbs_image_id.stdout
# We remove any leftover error and remove the ban. # We remove any leftover error and remove the ban.
- name: Ensure the cluster converge back even in case of schema change - name: Ensure the cluster converge back even in case of schema change
shell: "pcs resource cleanup ovn-dbs-bundle" shell: "pcs resource cleanup ovn-dbs-bundle"

View File

@ -288,19 +288,6 @@ outputs:
container_image_latest: "{{rabbitmq_image_latest}}" container_image_latest: "{{rabbitmq_image_latest}}"
when: when:
- old_rabbitmq_image_id.stdout != new_rabbitmq_image_id.stdout - old_rabbitmq_image_id.stdout != new_rabbitmq_image_id.stdout
- block:
- name: Get a list of container using rabbitmq image
shell: "{{container_cli}} ps -a -q -f 'ancestor={{old_rabbitmq_image_id.stdout}}'"
register: rabbitmq_containers_to_destroy
# It will be recreated with the delpoy step.
- name: Remove any container using the same rabbitmq image
shell: "{{container_cli}} rm -fv {{item}}"
with_items: "{{ rabbitmq_containers_to_destroy.stdout_lines }}"
- name: Remove previous rabbitmq images
shell: "{{container_cli}} rmi -f {{old_rabbitmq_image_id.stdout}}"
when:
- old_rabbitmq_image_id.stdout != ''
- old_rabbitmq_image_id.stdout != new_rabbitmq_image_id.stdout
upgrade_tasks: upgrade_tasks:
- name: Prepare switch of rabbitmq image name - name: Prepare switch of rabbitmq image name

View File

@ -288,19 +288,6 @@ outputs:
container_image_latest: "{{rabbitmq_image_latest}}" container_image_latest: "{{rabbitmq_image_latest}}"
when: when:
- old_rabbitmq_image_id.stdout != new_rabbitmq_image_id.stdout - old_rabbitmq_image_id.stdout != new_rabbitmq_image_id.stdout
- block:
- name: Get a list of container using rabbitmq image
shell: "{{container_cli}} ps -a -q -f 'ancestor={{old_rabbitmq_image_id.stdout}}'"
register: rabbitmq_containers_to_destroy
# It will be recreated with the delpoy step.
- name: Remove any container using the same rabbitmq image
shell: "{{container_cli}} rm -fv {{item}}"
with_items: "{{ rabbitmq_containers_to_destroy.stdout_lines }}"
- name: Remove previous rabbitmq images
shell: "{{container_cli}} rmi -f {{old_rabbitmq_image_id.stdout}}"
when:
- old_rabbitmq_image_id.stdout != ''
- old_rabbitmq_image_id.stdout != new_rabbitmq_image_id.stdout
upgrade_tasks: upgrade_tasks:
- name: Prepare switch of rabbitmq image name - name: Prepare switch of rabbitmq image name

View File

@ -294,19 +294,6 @@ outputs:
container_image_latest: "{{rabbitmq_image_latest}}" container_image_latest: "{{rabbitmq_image_latest}}"
when: when:
- old_rabbitmq_image_id.stdout != new_rabbitmq_image_id.stdout - old_rabbitmq_image_id.stdout != new_rabbitmq_image_id.stdout
- block:
- name: Get a list of container using rabbitmq image
shell: "{{container_cli}} ps -a -q -f 'ancestor={{old_rabbitmq_image_id.stdout}}'"
register: rabbitmq_containers_to_destroy
# It will be recreated with the delpoy step.
- name: Remove any container using the same rabbitmq image
shell: "{{container_cli}} rm -fv {{item}}"
with_items: "{{ rabbitmq_containers_to_destroy.stdout_lines }}"
- name: Remove previous rabbitmq images
shell: "{{container_cli}} rmi -f {{old_rabbitmq_image_id.stdout}}"
when:
- old_rabbitmq_image_id.stdout != ''
- old_rabbitmq_image_id.stdout != new_rabbitmq_image_id.stdout
upgrade_tasks: upgrade_tasks:
- name: Prepare switch of rabbitmq image name - name: Prepare switch of rabbitmq image name