Bug 1848988
| Summary: | OSP UPI down-containers.yaml is not idempotent | ||
|---|---|---|---|
| Product: | OpenShift Container Platform | Reporter: | Pierre Prinetti <pprinett> |
| Component: | Installer | Assignee: | Pierre Prinetti <pprinett> |
| Installer sub component: | OpenShift on OpenStack | QA Contact: | weiwei jiang <wjiang> |
| Status: | CLOSED ERRATA | Docs Contact: | |
| Severity: | low | ||
| Priority: | low | CC: | bleanhar, mbridges |
| Version: | 4.6 | ||
| Target Milestone: | --- | ||
| Target Release: | 4.6.0 | ||
| Hardware: | Unspecified | ||
| OS: | Unspecified | ||
| Whiteboard: | |||
| 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.
|
Story Points: | --- |
| Clone Of: | Environment: | ||
| Last Closed: | 2020-10-27 16:08:12 UTC | Type: | Bug |
| Regression: | --- | Mount Type: | --- |
| Documentation: | --- | CRM: | |
| Verified Versions: | Category: | --- | |
| oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |
| Cloudforms Team: | --- | Target Upstream Version: | |
| Embargoed: | |||
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 |
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