Description of problem: In marketplace 4.2, migration code was written to ensure that clusters upgrading from 4.1 to 4.2 would remove their datastore catalog source configs and update any existing subscriptions to point to catalog sources created directly by operator sources. There is an issue with that migration code (which always runs on startup and checks to see if anything needs to be migrated) where if a subscription that does not have the spec.package field set and points to a catalog source that does not exist, the migration code will throw an unhandled error and the marketplace will panic. Version-Release number of selected component (if applicable): 4.2 How reproducible: Always Steps to Reproduce: 1. Create a subscription that does not point to a package: #oc create testsubscription.yaml ``` apiVersion: operators.coreos.com/v1alpha1 kind: Subscription metadata: labels: csc-owner-name: installed-test-openshift-marketplace csc-owner-namespace: openshift-marketplace name: test-operators-ui-created namespace: openshift-marketplace spec: channel: alpha name: "" source: installed-test-openshift-marketplace sourceNamespace: openshift-marketplace ``` 2. Restart the marketplace operator pod Actual results: Marketplace will fail to run the migration code and the pod will crash loop. Expected results: Marketplace will be unable to migrate this particular subscription since it is invalid, but it should just ignore it and move on.
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/RHBA-2019:2922