Bug 1932001
Summary: | Only one of multiple subscriptions to the same package is honored | |||
---|---|---|---|---|
Product: | OpenShift Container Platform | Reporter: | Ben Luddy <bluddy> | |
Component: | OLM | Assignee: | Ben Luddy <bluddy> | |
OLM sub component: | OLM | QA Contact: | Jian Zhang <jiazha> | |
Status: | CLOSED ERRATA | Docs Contact: | ||
Severity: | medium | |||
Priority: | medium | CC: | bluddy | |
Version: | 4.6 | |||
Target Milestone: | --- | |||
Target Release: | 4.8.0 | |||
Hardware: | Unspecified | |||
OS: | Unspecified | |||
Whiteboard: | ||||
Fixed In Version: | Doc Type: | Bug Fix | ||
Doc Text: |
Cause: During dependency and upgrade resolution, Subscription uniqueness is currently based on the subscribed package name.
Consequence: If two Subscriptions in a namespace subscribe to the same package, they are treated as a single Subscription internally, resulting in some surprising behaviors.
Fix: Internally, Subscriptions are now uniquely identified within a namespace by .metadata.name instead of .spec.name.
Result: Upgrade and dependency resolution behavior is consistent for namespaces containing multiple Subscription objects with the same .spec.name.
|
Story Points: | --- | |
Clone Of: | ||||
: | 1932002 (view as bug list) | Environment: | ||
Last Closed: | 2021-07-27 22:47:39 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: | ||||
Bug Depends On: | ||||
Bug Blocks: | 1932002 |
Description
Ben Luddy
2021-02-23 18:19:52 UTC
A patch for this already merged into release-4.8 (https://github.com/operator-framework/operator-lifecycle-manager/pull/2005), but before this BZ was created. Cluster version is 4.8.0-0.nightly-2021-02-23-200827 [jzhang@dhcp-140-36 ~]$ oc -n openshift-operator-lifecycle-manager exec catalog-operator-6f645747d-nb2sb -- olm --version OLM version: 0.17.0 git commit: fd0ce87079d83588ad4c6e74f3175edf340e28a8 1, Subscribe an operator, for example, etcd-operator [jzhang@dhcp-140-36 ~]$ oc create -f og.yaml operatorgroup.operators.coreos.com/test-og created [jzhang@dhcp-140-36 ~]$ cat sub-etcd.yaml apiVersion: operators.coreos.com/v1alpha1 kind: Subscription metadata: name: sub-etcd1 namespace: default spec: sourceNamespace: openshift-marketplace channel: singlenamespace-alpha installPlanApproval: Automatic name: etcd source: community-operators startingCSV: etcdoperator.v0.9.4 [jzhang@dhcp-140-36 ~]$ oc create -f sub-etcd.yaml subscription.operators.coreos.com/sub-etcd1 created [jzhang@dhcp-140-36 ~]$ oc get sub -n default NAME PACKAGE SOURCE CHANNEL sub-etcd1 etcd community-operators singlenamespace-alpha [jzhang@dhcp-140-36 ~]$ oc get csv -n default NAME DISPLAY VERSION REPLACES PHASE etcdoperator.v0.9.4 etcd 0.9.4 etcdoperator.v0.9.2 Installing [jzhang@dhcp-140-36 ~]$ oc get csv -n default NAME DISPLAY VERSION REPLACES PHASE etcdoperator.v0.9.4 etcd 0.9.4 etcdoperator.v0.9.2 Succeeded 2, After it was deployed, rename the subscription, and subscribe to it. [jzhang@dhcp-140-36 ~]$ cat sub-etcd.yaml apiVersion: operators.coreos.com/v1alpha1 kind: Subscription metadata: name: sub-etcd2 namespace: default spec: sourceNamespace: openshift-marketplace channel: singlenamespace-alpha installPlanApproval: Automatic name: etcd source: community-operators startingCSV: etcdoperator.v0.9.4 [jzhang@dhcp-140-36 ~]$ oc create -f sub-etcd.yaml subscription.operators.coreos.com/sub-etcd2 created [jzhang@dhcp-140-36 ~]$ oc get sub -n default NAME PACKAGE SOURCE CHANNEL sub-etcd1 etcd community-operators singlenamespace-alpha sub-etcd2 etcd community-operators singlenamespace-alpha [jzhang@dhcp-140-36 ~]$ oc get ip -n default NAME CSV APPROVAL APPROVED install-9rpvb etcdoperator.v0.9.4 Automatic true 3, Check OLM logs. [jzhang@dhcp-140-36 ~]$ oc logs -n openshift-operator-lifecycle-manager deploy/catalog-operator | grep ResolutionFailed | tail -1 I0224 03:27:08.740276 1 event.go:282] Event(v1.ObjectReference{Kind:"Namespace", Namespace:"", Name:"default", UID:"54434924-b887-4a01-8e8f-f3c7c14fd5aa", APIVersion:"v1", ResourceVersion:"28715", FieldPath:""}): type: 'Warning' reason: 'ResolutionFailed' constraints not satisfiable: subscription sub-etcd2 requires community-operators/openshift-marketplace/singlenamespace-alpha/etcdoperator.v0.9.4, subscription sub-etcd2 exists, subscription sub-etcd1 requires @existing/default//etcdoperator.v0.9.4, subscription sub-etcd1 exists, @existing/default//etcdoperator.v0.9.4 and community-operators/openshift-marketplace/singlenamespace-alpha/etcdoperator.v0.9.4 originate from package etcd The logs pop-up a conflict waring, LGTM, verify 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 (Moderate: OpenShift Container Platform 4.8.2 bug fix and security update), 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/RHSA-2021:2438 |