Bug 1968558

Summary: [sig-cli] oc adm storage-admin [Suite:openshift/conformance/parallel] doesn't clean up properly
Product: OpenShift Container Platform Reporter: Bryan Jones <jonesbr>
Component: ocAssignee: Maciej Szulik <maszulik>
Status: CLOSED ERRATA QA Contact: zhou ying <yinzhou>
Severity: medium Docs Contact:
Priority: medium    
Version: 4.7CC: aos-bugs, dcbw, jokerman, mfojtik
Target Milestone: ---   
Target Release: 4.8.0   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard: tag-ci
Fixed In Version: Doc Type: No Doc Update
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2021-07-27 23:11:53 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:
Bug Depends On:    
Bug Blocks: 1970411    

Description Bryan Jones 2021-06-07 14:38:05 UTC
Description of problem: This conformance test doesn't properly remove the `policy-can-i` after execution. When the test is run consecutive times, the second and further attempts will fail because the policy already exists.

If I delete the `policy-can-i` project, and rerun the test, it is successful. The test should handle this.


Version-Release number of selected component (if applicable): 4.7.X


How reproducible: Always happens


Steps to Reproduce:
1. Run [sig-cli] oc adm storage-admin [Suite:openshift/conformance/parallel]
2. Run it again

Actual results: `Error from server (AlreadyExists): project.project.openshift.io "policy-can-i" already exists`


Expected results: Policy shouldn't exist 


Additional info: This [line](https://github.com/openshift/origin/blob/dd7015e846380d5050494b9bb744f43cf04a4268/test/extended/cli/admin.go#L312) appears to be the problem. That command is silently failing because no error checking is being done. It needs to be updated to delete the project.

Comment 2 zhou ying 2021-06-11 06:37:55 UTC
Non function issue , checked the code . will move to verified status.

Comment 3 Maciej Szulik 2021-06-11 10:08:45 UTC
*** Bug 1959536 has been marked as a duplicate of this bug. ***

Comment 6 errata-xmlrpc 2021-07-27 23:11:53 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 (Moderate: OpenShift Container Platform 4.8.2 bug fix and security update), 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/RHSA-2021:2438