Search for containers within stopped containers.
During minor update pcs cluster is stopped during step 1. Then we search for pcs managed containers at step 2. But since pcs cluster is stopped, 'docker ps' won't report stopped containers. This change adds '--all' option to show all the containers. Change-Id: If38a4f7e25d4d1f4679d9684ad2c0db8475d679b Closes-Bug: #1737548
This commit is contained in:
parent
3b626beca3
commit
09dcd7e26c
|
@ -244,7 +244,7 @@ outputs:
|
||||||
register: cinder_backup_image_id
|
register: cinder_backup_image_id
|
||||||
- block:
|
- block:
|
||||||
- name: Get a list of container using Cinder-Backup image
|
- name: Get a list of container using Cinder-Backup image
|
||||||
shell: "docker ps -q -f 'ancestor={{cinder_backup_image_id.stdout}}'"
|
shell: "docker ps -a -q -f 'ancestor={{cinder_backup_image_id.stdout}}'"
|
||||||
register: cinder_backup_containers_to_destroy
|
register: cinder_backup_containers_to_destroy
|
||||||
# It will be recreated with the delpoy step.
|
# It will be recreated with the delpoy step.
|
||||||
- name: Remove any container using the same Cinder-Backup image
|
- name: Remove any container using the same Cinder-Backup image
|
||||||
|
|
|
@ -265,7 +265,7 @@ outputs:
|
||||||
register: cinder_volume_image_id
|
register: cinder_volume_image_id
|
||||||
- block:
|
- block:
|
||||||
- name: Get a list of container using Cinder-Volume image
|
- name: Get a list of container using Cinder-Volume image
|
||||||
shell: "docker ps -q -f 'ancestor={{cinder_volume_image_id.stdout}}'"
|
shell: "docker ps -a -q -f 'ancestor={{cinder_volume_image_id.stdout}}'"
|
||||||
register: cinder_volume_containers_to_destroy
|
register: cinder_volume_containers_to_destroy
|
||||||
# It will be recreated with the delpoy step.
|
# It will be recreated with the delpoy step.
|
||||||
- name: Remove any container using the same Cinder-Volume image
|
- name: Remove any container using the same Cinder-Volume image
|
||||||
|
|
|
@ -323,7 +323,7 @@ outputs:
|
||||||
register: mariadb_image_id
|
register: mariadb_image_id
|
||||||
- block:
|
- block:
|
||||||
- name: Get a list of container using Mariadb image
|
- name: Get a list of container using Mariadb image
|
||||||
shell: "docker ps -q -f 'ancestor={{mariadb_image_id.stdout}}'"
|
shell: "docker ps -a -q -f 'ancestor={{mariadb_image_id.stdout}}'"
|
||||||
register: mariadb_containers_to_destroy
|
register: mariadb_containers_to_destroy
|
||||||
# It will be recreated with the delpoy step.
|
# It will be recreated with the delpoy step.
|
||||||
- name: Remove any container using the same Mariadb image
|
- name: Remove any container using the same Mariadb image
|
||||||
|
|
|
@ -224,7 +224,7 @@ outputs:
|
||||||
register: redis_image_id
|
register: redis_image_id
|
||||||
- block:
|
- block:
|
||||||
- name: Get a list of container using Redis image
|
- name: Get a list of container using Redis image
|
||||||
shell: "docker ps -q -f 'ancestor={{redis_image_id.stdout}}'"
|
shell: "docker ps -a -q -f 'ancestor={{redis_image_id.stdout}}'"
|
||||||
register: redis_containers_to_destroy
|
register: redis_containers_to_destroy
|
||||||
# It will be recreated with the delpoy step.
|
# It will be recreated with the delpoy step.
|
||||||
- name: Remove any container using the same Redis image
|
- name: Remove any container using the same Redis image
|
||||||
|
|
|
@ -263,7 +263,7 @@ outputs:
|
||||||
register: haproxy_image_id
|
register: haproxy_image_id
|
||||||
- block:
|
- block:
|
||||||
- name: Get a list of container using Haproxy image
|
- name: Get a list of container using Haproxy image
|
||||||
shell: "docker ps -q -f 'ancestor={{haproxy_image_id.stdout}}'"
|
shell: "docker ps -a -q -f 'ancestor={{haproxy_image_id.stdout}}'"
|
||||||
register: haproxy_containers_to_destroy
|
register: haproxy_containers_to_destroy
|
||||||
# It will be recreated with the delpoy step.
|
# It will be recreated with the delpoy step.
|
||||||
- name: Remove any container using the same Haproxy image
|
- name: Remove any container using the same Haproxy image
|
||||||
|
|
|
@ -183,7 +183,7 @@ outputs:
|
||||||
register: manila_share_image_id
|
register: manila_share_image_id
|
||||||
- block:
|
- block:
|
||||||
- name: Get a list of container using Manila-Share image
|
- name: Get a list of container using Manila-Share image
|
||||||
shell: "docker ps -q -f 'ancestor={{manila_share_image_id.stdout}}'"
|
shell: "docker ps -a -q -f 'ancestor={{manila_share_image_id.stdout}}'"
|
||||||
register: manila-share_containers_to_destroy
|
register: manila-share_containers_to_destroy
|
||||||
# It will be recreated with the delpoy step.
|
# It will be recreated with the delpoy step.
|
||||||
- name: Remove any container using the same Manila-Share image
|
- name: Remove any container using the same Manila-Share image
|
||||||
|
|
|
@ -261,7 +261,7 @@ outputs:
|
||||||
register: rabbitmq_image_id
|
register: rabbitmq_image_id
|
||||||
- block:
|
- block:
|
||||||
- name: Get a list of container using Rabbitmq image
|
- name: Get a list of container using Rabbitmq image
|
||||||
shell: "docker ps -q -f 'ancestor={{rabbitmq_image_id.stdout}}'"
|
shell: "docker ps -a -q -f 'ancestor={{rabbitmq_image_id.stdout}}'"
|
||||||
register: rabbitmq_containers_to_destroy
|
register: rabbitmq_containers_to_destroy
|
||||||
# It will be recreated with the delpoy step.
|
# It will be recreated with the delpoy step.
|
||||||
- name: Remove any container using the same Rabbitmq image
|
- name: Remove any container using the same Rabbitmq image
|
||||||
|
|
Loading…
Reference in New Issue