Bug 1766639

Summary: CNV 2.2 cleanup script - appregistry is hardcoded
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, 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:45:42 UTC
Description of problem:
cleanup script: https://pkgs.devel.redhat.com/cgit/containers/hco-bundle-registry/plain/cleanup-ds.sh?h=cnv-2.2-rhel-8

deletes operatorsource/catalogsource rh-osbs-operators (hardcoded)

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


How reproducible:


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

Actual results:


Expected results:


Additional info:

Just copy the content of 2.1 script..
https://pkgs.devel.redhat.com/cgit/containers/hco-bundle-registry/plain/cleanup-ds.sh?h=cnv-2.1-rhel-8

Comment 2 Ryan Hallisey 2019-11-06 13:52:26 UTC
Lukas fixed this upstream and it has been pulled downstream

Comment 3 Nelly Credi 2019-11-11 12:30:42 UTC
please add fixed in version

Comment 4 Irina Gulina 2019-11-26 14:32:23 UTC
Looking at 2.2 cleanup script, there is 
APP_REGISTRY="${APP_REGISTRY:-rh-verified-operators}"

d/s cleanup: 


+ 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 6 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