Skip to content

Commit 7ec4cdf

Browse files
committed
Make swift containers removal not fatal for UPI.
When there is OpenStack deployment, which doesn't have swift services, or there are no containers used at all, listing them will fail the playbook and leave exit code other than 0, which may interrupt CI. With this commit, errors from listing containers will be ignored, which will cover both cases.
1 parent 9d85a87 commit 7ec4cdf

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

upi/openstack/down-containers.yaml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,9 @@
1414
ansible.builtin.command:
1515
cmd: "openstack container list --prefix {{ os_infra_id }} -f value -c Name"
1616
register: container_list
17+
ignore_errors: true
1718

1819
- name: 'Delete the containers associated with the cluster'
1920
ansible.builtin.command:
2021
cmd: "openstack container delete -r {{ container_list.stdout }}"
21-
when: container_list.stdout|length > 0
22+
when: container_list.rc == 0 and container_list.stdout|length > 0

0 commit comments

Comments
 (0)