Bug 1693375
| Summary: | [marketplace] Operator is creating invalid appregistry-server command | ||
|---|---|---|---|
| Product: | OpenShift Container Platform | Reporter: | Alexander Greene <agreene> |
| Component: | OLM | Assignee: | Aravindh Puthiyaparambil <aravindh> |
| OLM sub component: | OperatorHub | QA Contact: | Fan Jia <jfan> |
| Status: | CLOSED ERRATA | Docs Contact: | |
| Severity: | low | ||
| Priority: | low | ||
| Version: | 4.1.0 | ||
| Target Milestone: | --- | ||
| Target Release: | 4.1.0 | ||
| Hardware: | Unspecified | ||
| OS: | Unspecified | ||
| Whiteboard: | |||
| Fixed In Version: | Doc Type: | Bug Fix | |
| Doc Text: |
Cause: In the case where a CatalogSourceConfig had packages from two different
app registries, the generated command was getting mangled by the time
it to got to the registry pod.
Consequence: Crashing registry pod
Fix: This was fixed creating a list of -r
options that was then passed to the registry pod.
Result: registry pods don't crash
|
Story Points: | --- |
| Clone Of: | Environment: | ||
| Last Closed: | 2019-06-04 10:46:29 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: | |||
test env: cv: 4.0.0-0.nightly-2019-03-26-215932 marketplace commit:e274d6b40505e977e12061becf27218f5eb717fb create registory-server fail if download packages from multiple opsrc server after the pr https://github.com/operator-framework/operator-marketplace/pull/139/files#diff-ed7d7c72ad9b4816a7ab9a3482c126a2R257. test env:
cv:4.1.0-0.nightly-2019-04-20-080532
marketplace commit:dda43009df60b028e52a1f7debc468de3266de8e
registory commit:a27f5befb52713c0bd52243b33c84330a87573d3
test result:
create registory-server success if download packages from multiple opsrc server.
create a csc with the package from multi opsrc: and the pod command of registory like:
`
Command:
appregistry-server
-r
https://quay.io/cnr|community-operators
-r
https://quay.io/cnr|redhat-operators
-r
https://quay.io/cnr|jfan
-o
etcd,amq-streams,descheduler-test
`
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 |
A bug was introduced[1] that creates an invalid appregistry-server command. The lack of double quotes around the string assigned to `--registry` causes bash to interpret the `|` as a pipe rather than part of the registry string. Background Information: A deployment created as a result of a reconciled catalogsourceconfig defines the command that is ran in the pod below: spec: ``` ... ... containers: - command: - appregistry-server - --registry=https://quay.io/cnr|marketplace_e2e --registry=https://quay.io/cnr|community-operators - -o - dynatrace,metering,svcat,mongodb,prometheus,amq-streams,clusterlogging,couchbase,descheduler,etcd,federationv2 ... ... ``` The pod created by this deployment fails when running the command: ``` $ oc logs test-operators-68899b45db-npsnt time="2019-03-27T00:57:20Z" level=info msg="Using in-cluster kube client config" port=50051 type=appregistry time="2019-03-27T00:57:20Z" level=info msg="operator source(s) specified are - [https://quay.io/cnr%7Cmarketplace_e2e --registry=https://quay.io/cnr%7Credhat-operators]" port=50051 type=appregistry time="2019-03-27T00:57:20Z" level=info msg="package(s) specified are - federationv2,mongodb,svcat,couchbase,dynatrace,descheduler,etcd,metering,prometheus,amq-streams,clusterlogging" port=50051 type=appregistry time="2019-03-27T00:57:20Z" level=error msg="the following error(s) occurred while parsing input - invalid source, secret specified is malformed - redhat-operators" port=50051 type=appregistry time="2019-03-27T00:57:20Z" level=info msg="can't proceed, bailing out" port=50051 type=appregistry time="2019-03-27T00:57:20Z" level=fatal msg="error loading manifest from remote registry - invalid source, secret specified is malformed - redhat-operators" port=50051 type=appregistry ``` Updating this command to include double quotes around the string assigned to `--registry` resolves this issue: ``` $ appregistry-server --registry="https://quay.io/cnr|redhat-operators" --registry="https://quay.io/cnr|marketplace_e2e" -o amq-streams,dynatrace,federationv2,metering,mongodb,prometheus,clusterlogging,couchbase,descheduler,etcd,svcat time="2019-03-27T16:40:59Z" level=info msg="Using in-cluster kube client config" port=50051 type=appregistry time="2019-03-27T16:40:59Z" level=info msg="operator source(s) specified are - [https://quay.io/cnr|redhat-operators https://quay.io/cnr|marketplace_e2e]" port=50051 type=appregistry time="2019-03-27T16:40:59Z" level=info msg="package(s) specified are - amq-streams,dynatrace,federationv2,metering,mongodb,prometheus,clusterlogging,couchbase,descheduler,etcd,svcat" port=50051 type=appregistry time="2019-03-27T16:40:59Z" level=info msg="input has been sanitized" port=50051 type=appregistry time="2019-03-27T16:40:59Z" level=info msg="sources: [https://quay.io/cnr/redhat-operators https://quay.io/cnr/marketplace_e2e]" port=50051 type=appregistry time="2019-03-27T16:40:59Z" level=info msg="packages: [amq-streams dynatrace federationv2 metering mongodb prometheus clusterlogging couchbase descheduler etcd svcat]" port=50051 type=appregistry time="2019-03-27T16:41:00Z" level=info msg="resolved the following packages: [marketplace_e2e/dynatrace:0.2.0 marketplace_e2e/metering:0.12.0 marketplace_e2e/svcat:0.1.34 redhat-operators/amq-streams:1.0.2 marketplace_e2e/couchbase:1.0.0 marketplace_e2e/descheduler:0.0.1 marketplace_e2e/etcd:0.9.2 marketplace_e2e/federationv2:0.0.2 marketplace_e2e/mongodb:0.3.2 marketplace_e2e/prometheus:0.22.2 marketplace_e2e/clusterlogging:0.0.1]" port=50051 type=appregistry time="2019-03-27T16:41:00Z" level=info msg="downloading repository: marketplace_e2e/dynatrace:0.2.0 from https://quay.io/cnr" port=50051 type=appregistry ``` [1] https://github.com/operator-framework/operator-marketplace/pull/139/files#diff-ed7d7c72ad9b4816a7ab9a3482c126a2R257