Bug 1679405

Summary: [marketplace] can edit catalogsourceconfig successfully with the non-exist package
Product: OpenShift Container Platform Reporter: Fan Jia <jfan>
Component: OLMAssignee: Kevin Rizza <krizza>
Status: CLOSED ERRATA QA Contact: Fan Jia <jfan>
Severity: low Docs Contact:
Priority: low    
Version: 4.1.0CC: aravindh, chezhang, dyan, jiazha, zitang
Target Milestone: ---   
Target Release: 4.1.0   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2019-06-04 10:44:14 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 Fan Jia 2019-02-21 05:59:42 UTC
Description of problem:
Can create the catalogsourceconfig successfully even with the non-exist package in the yaml file

Version-Release number of selected component (if applicable):
clusterversion:4.0.0-0.nightly-2019-02-19-024716

How reproducible:
always

Steps to Reproduce:
1. install the cluster
2. create one catalogsourceconfig named “test” with the non-exist package “kaka”
#oc create -f test.yaml
test.yaml
#################
apiVersion: v1items:
- apiVersion: marketplace.redhat.com/v1alpha1
  kind: CatalogSourceConfig
  metadata:
    name: kakatest
    namespace: openshift-marketplace
  spec:
    packages: kaka
    targetNamespace: openshift-operatorskind: Listmetadata:
  resourceVersion: ""
  selfLink: ""
#################

Actual results:
1. the catalogsourceconfig test is created successful without error
#oc get catalogsourceconfig
NAME                  TARGETNAMESPACE         PACKAGES STATUS      DISPLAYNAME           PUBLISHER   MESSAGE AGE
test              openshift-operators  kaka    Succeeded   Custom                Custom      The object has been successfully reconciled   178m

Expected results:
1. the catalogsourceconfig test can’t be created successfully with message “package [kaka] not found”

Additional info:

Comment 1 Fan Jia 2019-02-21 06:33:17 UTC
If create the catalogsourceconfig with the non-exist package will failed with error "datastore has no record of the specified package [kaka]", but edit one exist catalogsourceconfig with non-exist package will success.

(In reply to Fan Jia from comment #0)
> Description of problem:
> Can create the catalogsourceconfig successfully even with the non-exist package in the yaml file

can edit the catalogsourceconfig successfully even with the non-exist package

 
> Version-Release number of selected component (if applicable):
> clusterversion:4.0.0-0.nightly-2019-02-19-024716
> 
> How reproducible:
> always
> 
> Steps to Reproduce:
> 1. install the cluster
> 2. create one catalogsourceconfig named “test” with the exist package
> “mongodb”
> #oc create -f test.yaml
> test.yaml
> #################
> apiVersion: v1items:
> - apiVersion: marketplace.redhat.com/v1alpha1
>   kind: CatalogSourceConfig
>   metadata:
>     name: kakatest
>     namespace: openshift-marketplace
>   spec:
>     packages: kaka
      packages: mongodb
>     targetNamespace: openshift-operators
> kind: List
> metadata:
>   resourceVersion: ""
>   selfLink: ""
> #################

3. edit the catalogsourceconfig "test" add one non-exist package "kaka"

> 
> Actual results:
> 1. the catalogsourceconfig test is created successful without error
> #oc get catalogsourceconfig
> NAME                  TARGETNAMESPACE         PACKAGES STATUS      DISPLAYNAME           PUBLISHER   MESSAGE AGE
> test              openshift-operators  kaka    Succeeded   Custom                Custom      The object has been successfully reconciled   178m

1. the catalogsourceconfig test is created successfully
#oc get catalogsourceconfig
NAME                  TARGETNAMESPACE         PACKAGES STATUS      DISPLAYNAME           PUBLISHER   MESSAGE AGE
test              openshift-operators  mongodb    Succeeded   Custom      Custom      The object has been successfully reconciled   178m

2.after step 3, the catalogsourceconfig is updated successfully
#oc get cagalogsourceconfig
NAME                  TARGETNAMESPACE         PACKAGES STATUS      DISPLAYNAME           PUBLISHER   MESSAGE AGE
test              openshift-operators  mongodb,kaka    Succeeded   Custom                Custom      The object has been successfully reconciled   178m


> Expected results:
> 1. the catalogsourceconfig test can’t be created successfully with message
> “package [kaka] not found”
1.the catalogsourceconfig test is created successfully
#oc get catalogsourceconfig
NAME                  TARGETNAMESPACE         PACKAGES STATUS      DISPLAYNAME           PUBLISHER   MESSAGE AGE
test              openshift-operators  mongodb    Succeeded   Custom      Custom      The object has been successfully reconciled   178m

2. after step 3, the catalogsourceconfig test should be failed with error message "datastore has no record of the specified package [kaka]"

Comment 2 Fan Jia 2019-02-21 07:55:07 UTC
can create the catalogsourceconfig success only with one correct package
(create one CSC with multi packages, it will success if only one package exists and others don't exist )

Comment 3 Fan Jia 2019-02-22 10:08:15 UTC
no new build for this fix now, will test until the new build include the fix.

Comment 4 Fan Jia 2019-02-25 08:27:18 UTC
testenv:
4.0.0-0.nightly-2019-02-24-045124

the status is "Configuring" and the message is "Still resolving package(s) - etcd,kaka. Please make sure these are valid packages." if the csc include the non-exist package.

Comment 7 errata-xmlrpc 2019-06-04 10:44:14 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/RHBA-2019:0758