Bug 1766630

Summary: CNV2.2 cleanup script - secret delete issue
Product: Container Native Virtualization (CNV) Reporter: Asher Shoshan <ashoshan>
Component: InstallationAssignee: Ryan Hallisey <rhallise>
Status: CLOSED ERRATA QA Contact: Irina Gulina <igulina>
Severity: high Docs Contact:
Priority: high    
Version: 2.2.0CC: cnv-qe-bugs, fdeutsch, mgoldboi, ncredi, rhallise, talayan
Target Milestone: ---   
Target Release: 2.2.0   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: hco-bundle-registry:v2.2.0-8 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2020-01-30 16:27:15 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:

Description Asher Shoshan 2019-10-29 14:25:11 UTC
Description of problem:

The below script has secret delete issue

https://pkgs.devel.redhat.com/cgit/containers/hco-bundle-registry/plain/cleanup-ds.sh?h=cnv-2.2-rhel-8


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

2.2
How reproducible:


Steps to Reproduce:
1. run the above script
2.
3.

Actual results:
secrets are deleted

Expected results:


Additional info:

Change $2 with $1 in line:
oc delete secret $(oc get secret -n $MARKETPLACE | grep quay-registry | awk '{print $2}') -n $MARKETPLACE

Comment 6 Nelly Credi 2019-11-11 12:30:31 UTC
please add fixed in version

Comment 9 Irina Gulina 2019-11-26 14:38:53 UTC

+ MARKETPLACE=openshift-marketplace
+ TARGET=openshift-cnv
+ APP_REGISTRY=rh-verified-operators
+ CNV_VERSION=2.2.0
+ oc delete csc hco-catalogsource-config -n openshift-marketplace
catalogsourceconfig.operators.coreos.com "hco-catalogsource-config" deleted
+ oc delete catalogsource rh-verified-operators -n openshift-marketplace
catalogsource.operators.coreos.com "rh-verified-operators" deleted
+ oc delete operatorsource rh-verified-operators -n openshift-marketplace
operatorsource.operators.coreos.com "rh-verified-operators" deleted
+ oc delete hco hyperconverged-cluster -n openshift-cnv
hyperconverged.hco.kubevirt.io "hyperconverged-cluster" deleted
+ sleep 10
+ oc delete sub hco-operatorhub -n openshift-cnv
subscription.operators.coreos.com "hco-operatorhub" deleted
+ oc delete csv kubevirt-hyperconverged-operator.v2.2.0 -n openshift-cnv
clusterserviceversion.operators.coreos.com "kubevirt-hyperconverged-operator.v2.2.0" deleted
+ oc delete operatorgroup openshift-cnv-group -n openshift-cnv
operatorgroup.operators.coreos.com "openshift-cnv-group" deleted
++ grep quay-registry
++ awk '{print $1}'
++ oc get secret -n openshift-marketplace
+ oc delete secret quay-registry-rh-verified-operators -n openshift-marketplace
secret "quay-registry-rh-verified-operators" deleted

Comment 11 errata-xmlrpc 2020-01-30 16:27:15 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, 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/RHEA-2020:0307