Bug 1693964
| Summary: | [marketplace]OPSRC's "registryNamespace" can be empty string "" | ||
|---|---|---|---|
| Product: | OpenShift Container Platform | Reporter: | Fan Jia <jfan> |
| Component: | OLM | Assignee: | Abu Kashem <akashem> |
| OLM sub component: | OperatorHub | QA Contact: | Fan Jia <jfan> |
| Status: | CLOSED ERRATA | Docs Contact: | |
| Severity: | low | ||
| Priority: | medium | CC: | aravindh, chezhang, dyan, jiazha, zitang |
| Version: | 4.1.0 | ||
| 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:46:34 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-03-29 07:49:11 UTC
Investigation:
I checked the api audit log and saw the following error
```
ip-10-0-153-11.ec2.internal {"kind":"Event","apiVersion":"audit.k8s.io/v1beta1","metadata":
{"creationTimestamp":"2019-03-28T19:25:30Z"}
,"level":"Metadata","timestamp":"2019-03-28T19:25:30Z","auditID":"d3995eb8-4448-4cbd-a6cd-202f0a414fad","stage":"ResponseComplete","requestURI":"/apis/operators.coreos.com/v1/namespaces/openshift-marketplace/operatorsources/test","verb":"update","user":{"username":"kube:admin","groups":["system:cluster-admins","system:authenticated"],"extra":{"scopes.authorization.openshift.io":["user:full"]}},"sourceIPs":["10.0.72.114"],"userAgent":"main/v0.0.0 (linux/amd64) kubernetes/$Format","objectRef":{"resource":"operatorsources","namespace":"openshift-marketplace","name":"test","uid":"c83f183f-518a-11e9-90fd-0a5197e23be2","apiGroup":"operators.coreos.com","apiVersion":"v1","resourceVersion":"157495"},"responseStatus":{"metadata":{},"status":"Failure","reason":"Invalid","code":422},"requestReceivedTimestamp":"2019-03-28T19:25:30.451800Z","stageTimestamp":"2019-03-28T19:25:30.453106Z","annotations":{"authorization.k8s.io/decision":"allow","authorization.k8s.io/reason":"RBAC: allowed by ClusterRoleBinding \"cluster-admins\" of ClusterRole \"cluster-admin\" to Group \"system:cluster-admins\""}}
```
This indicates that update to the object continues to fail and this is the reason why we see no change to its status. Thus it gets stuck in the loop and keeps retrying. After step 2, the client in marketplace operator fails to update the object thereon since `RegistryNamespace` is a required field.
We also do not log the update error originating from reconciliation logic. We should log the error here - https://github.com/operator-framework/operator-marketplace/blob/master/pkg/operatorsource/handler.go#L110
Workaround:
oc edit and set registryNamespace to a valid value.
Corresponding Jira ticket - https://jira.coreos.com/browse/MKTPLC-329
PR to fix the logging issue - https://github.com/operator-framework/operator-marketplace/pull/180 The latest nightly build (4.1.0-0.nightly-2019-05-08-220123) doesn't include the fix PR, will verified this bug when the build include it. The latest nightly build (4.1.0-0.nightly-2019-05-09-041615) doesn't include the fix PR, will verified this bug when the build include it. 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 |