Bug 1848988 - OSP UPI down-containers.yaml is not idempotent
Summary: OSP UPI down-containers.yaml is not idempotent
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: OpenShift Container Platform
Classification: Red Hat
Component: Installer
Version: 4.6
Hardware: Unspecified
OS: Unspecified
low
low
Target Milestone: ---
: 4.6.0
Assignee: Pierre Prinetti
QA Contact: weiwei jiang
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2020-06-19 12:44 UTC by Pierre Prinetti
Modified: 2020-10-27 16:08 UTC (History)
2 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Cause: The documented command for removing containers is always executed, no matter if a container is actually present Consequence: When no container is present, the playbook errors Fix: Change the playbook so that the Ansible step is executed `when` a container is found Result: Running the container when the cluster has been already cleared does not error anymore.
Clone Of:
Environment:
Last Closed: 2020-10-27 16:08:12 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Github openshift installer pull 3776 0 None closed Bug 1848988: os UPI: Make down-containers idempotent 2020-09-14 05:46:33 UTC
Red Hat Product Errata RHBA-2020:4196 0 None None None 2020-10-27 16:08:39 UTC

Description Pierre Prinetti 2020-06-19 12:44:39 UTC
Description of problem:



How reproducible:

Steps to Reproduce:
1. Run `ansible-playbook -i inventory.yaml down-containers.yaml`
2. Run `ansible-playbook -i inventory.yaml down-containers.yaml` again

Actual results:
Ansible errors:
```
TASK [Delete the containers associated with the cluster] *****************************************************************************************
fatal: [localhost]: FAILED! => {"changed": true, "cmd": ["openstack", "container", "delete", "-r"], "delta": "0:00:01.445139", "end": "2020-06-19 14:28:06.775255", "msg": "non-zero return code", "rc": 2, "start": "2020-06-19 14:28:05.330116", "stderr": "usage: openstack container delete [-h] [--recursive]\n                                  <container> [<container> ...]\nopenstack container delete: error: the following arguments are required: <container>", "stderr_lines": ["usage: openstack container delete [-h] [--recursive]", "                                  <container> [<container> ...]", "openstack container delete: error: the following arguments are required: <container>"], "stdout": "", "stdout_lines": []}
```

Expected results:
Ansible skips the task if no container is found

Comment 5 errata-xmlrpc 2020-10-27 16:08:12 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory (OpenShift Container Platform 4.6 GA Images), and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHBA-2020:4196


Note You need to log in before you can comment on or make changes to this bug.