Bug 2100007 - Run bundle-upgrade failed from the traditional File-Based Catalog installed operator
Summary: Run bundle-upgrade failed from the traditional File-Based Catalog installed o...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: OpenShift Container Platform
Classification: Red Hat
Component: Operator SDK
Version: 4.11
Hardware: Unspecified
OS: Unspecified
medium
medium
Target Milestone: ---
: 4.12.0
Assignee: Rashmi Gottipati
QA Contact: Fan Jia
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2022-06-22 08:07 UTC by Fan Jia
Modified: 2022-12-19 15:19 UTC (History)
2 users (show)

Fixed In Version:
Doc Type: No Doc Update
Doc Text:
Clone Of:
Environment:
Last Closed: 2022-08-10 11:19:11 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHSA-2022:5069 0 None None None 2022-08-10 11:19:19 UTC

Description Fan Jia 2022-06-22 08:07:15 UTC
Description of problem:
Run bundle-upgrade failed if the operator is installed with a FBC index image through traditional OLM way.

Version-Release number of selected component (if applicable):
operator-sdk version: "v1.20.0-ocp", commit: "4db4731ae75f2cccae951dd7ed98484662179c55", kubernetes version: "v1.24.1", go version: "go1.18.3", GOOS: "linux", GOARCH: "amd64"

How reproducible:
always

Steps to Reproduce:
1. install operator through catalogsource
$oc create -f catalogsource.yaml
apiVersion: operators.coreos.com/v1alpha1
kind: CatalogSource
metadata:
  name: upgradefbc-index
  namespace: testkaka
spec:
  displayName: Test
  publisher: OLM-QE
  sourceType: grpc
  image: quay.io/olmqe/upgradefbc-index:v0.1
  updateStrategy:
    registryPoll:
      interval: 15m
$oc create -f og.yaml
kind: OperatorGroup
apiVersion: operators.coreos.com/v1
metadata:
  name: og-single
  namespace: testkaka
spec:
  targetNamespaces:
  - testkaka

$oc create -f sub.yaml
apiVersion: operators.coreos.com/v1alpha1
kind: Subscription
metadata:
  name: test
  namespace: testkaka
spec:
  channel: alpha
  installPlanApproval: Automatic
  name: upgradefbc
  source: upgradefbc-index
  sourceNamespace: testkaka
2. oc get pods
$ oc get pods
NAME                                                              READY   STATUS      RESTARTS   AGE
75d0b3dc04b4ab777d62672dbf403f153e93db06c90786c9a8779dbc4blrt4t   0/1     Completed   0          12m
upgradefbc-controller-manager-85d9df559f-ln7x7                    2/2     Running     0          12m
upgradefbc-index-xwl9c                                            1/1     Running     0          12m
3. upgrade operator through run bundle-upgrade
$operator-sdk run bundle-upgrade quay.io/olmqe/upgradefbc-bundle:v0.0.2

Actual results:
$ oc logs quay-io-olmqe-upgradefbc-bundle-v0-0-2
Error: could not build index model from declarative config: duplicate package "upgradefbc"
Usage:
  opm serve <source_path> [flags]

Flags:
      --debug                    enable debug logging
  -h, --help                     help for serve
  -p, --port string              port number to serve on (default "50051")
  -t, --termination-log string   path to a container termination log file (default "/dev/termination-log")

Global Flags:
      --skip-tls-verify   skip TLS certificate verification for container image registries while pulling bundles
      --use-http          use plain HTTP for container image registries while pulling bundles

Expected results:
upgrade success

Comment 1 Rashmi Gottipati 2022-06-23 21:39:06 UTC
Hi Jia, 

Just an update: PR https://github.com/operator-framework/operator-sdk/pull/5894 was created that fixes this issue. This fix will go into downstream during the next sync. 
Meanwhile, please do verify that the fix works and confirm the same. Thanks!

Thanks,
Rashmi

Comment 6 Fan Jia 2022-07-08 01:42:21 UTC
verified, will test after the pr merged to downstream.

Comment 7 errata-xmlrpc 2022-08-10 11:19:11 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 (Important: OpenShift Container Platform 4.11.0 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-2022:5069


Note You need to log in before you can comment on or make changes to this bug.