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
(cherry picked from commit 09dcd7e26c
)
This commit is contained in:
parent
3699fd4b88
commit
1891e364e2
|
@ -245,7 +245,7 @@ outputs:
|
|||
register: cinder_backup_image_id
|
||||
- block:
|
||||
- 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
|
||||
# It will be recreated with the delpoy step.
|
||||
- name: Remove any container using the same Cinder-Backup image
|
||||
|
|
|
@ -266,7 +266,7 @@ outputs:
|
|||
register: cinder_volume_image_id
|
||||
- block:
|
||||
- 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
|
||||
# It will be recreated with the delpoy step.
|
||||
- name: Remove any container using the same Cinder-Volume image
|
||||
|
|
|
@ -324,7 +324,7 @@ outputs:
|
|||
register: mariadb_image_id
|
||||
- block:
|
||||
- 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
|
||||
# It will be recreated with the delpoy step.
|
||||
- name: Remove any container using the same Mariadb image
|
||||
|
|
|
@ -225,7 +225,7 @@ outputs:
|
|||
register: redis_image_id
|
||||
- block:
|
||||
- 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
|
||||
# It will be recreated with the delpoy step.
|
||||
- name: Remove any container using the same Redis image
|
||||
|
|
|
@ -264,7 +264,7 @@ outputs:
|
|||
register: haproxy_image_id
|
||||
- block:
|
||||
- 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
|
||||
# It will be recreated with the delpoy step.
|
||||
- name: Remove any container using the same Haproxy image
|
||||
|
|
|
@ -184,7 +184,7 @@ outputs:
|
|||
register: manila_share_image_id
|
||||
- block:
|
||||
- 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
|
||||
# It will be recreated with the delpoy step.
|
||||
- name: Remove any container using the same Manila-Share image
|
||||
|
|
|
@ -259,7 +259,7 @@ outputs:
|
|||
register: rabbitmq_image_id
|
||||
- block:
|
||||
- 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
|
||||
# It will be recreated with the delpoy step.
|
||||
- name: Remove any container using the same Rabbitmq image
|
||||
|
|
Loading…
Reference in New Issue