Bug 1795297 - opm index export produces systematic error
Summary: opm index export produces systematic error
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: OpenShift Container Platform
Classification: Red Hat
Component: OLM
Version: 4.4
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
: 4.4.0
Assignee: lgallett
QA Contact: Bruno Andrade
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2020-01-27 16:19 UTC by lgallett
Modified: 2020-05-04 11:27 UTC (History)
1 user (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2020-05-04 11:27:22 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Github operator-framework operator-registry pull 163 0 None closed Bug 1795297: Fixing wrong database loaded in memory for export cmd 2020-11-26 09:31:41 UTC
Red Hat Product Errata RHBA-2020:0581 0 None None None 2020-05-04 11:27:38 UTC

Description lgallett 2020-01-27 16:19:07 UTC
Description of problem:

Running `opm index export` always produces the go error "Error: no such table: operatorbundle" after extracting the index database from the index image.

Version-Release number of selected component (if applicable):

How reproducible:

always

Steps to Reproduce:
1. compile latest opm
2. run opm index export on a valid index image

Actual results:

Go Error message

Expected results:

Exports the content of the database as expected.

Additional info:

Comment 2 Bruno Andrade 2020-01-29 17:20:43 UTC
OPM Index command worked as expected, marking as VERIFIED.

Steps used to verify:

git clone git:operator-framework/operator-registry.git
Cloning into 'operator-registry'...
remote: Enumerating objects: 71, done.
remote: Counting objects: 100% (71/71), done.
remote: Compressing objects: 100% (61/61), done.
remote: Total 9496 (delta 19), reused 37 (delta 10), pack-reused 9425
Receiving objects: 100% (9496/9496), 26.73 MiB | 10.62 MiB/s, done.
Resolving deltas: 100% (4805/4805), done.


make build                            
go build -mod=vendor  -o bin/linux-amd64-appregistry-server ./cmd/appregistry-server
go build -mod=vendor  -o bin/linux-amd64-configmap-server ./cmd/configmap-server
go build -mod=vendor  -o bin/linux-amd64-initializer ./cmd/initializer
go build -mod=vendor  -o bin/linux-amd64-opm ./cmd/opm
go build -mod=vendor  -o bin/linux-amd64-registry-server ./cmd/registry-serve

$ ls -l ./bin/
  rwxrwxr-x  bandrade  bandrade    44 MiB  Wed Jan 29 13:24:46 2020    linux-amd64-appregistry-server 
  rwxrwxr-x  bandrade  bandrade    43 MiB  Wed Jan 29 13:24:54 2020    linux-amd64-configmap-server 
  rwxrwxr-x  bandrade  bandrade    28 MiB  Wed Jan 29 13:25:00 2020    linux-amd64-initializer 
  rwxrwxr-x  bandrade  bandrade    49 MiB  Wed Jan 29 13:25:22 2020    linux-amd64-opm 
  rwxrwxr-x  bandrade  bandrade    28 MiB  Wed Jan 29 13:25:26 2020    linux-amd64-registry-server 


 ./linux-amd64-opm index export --index="quay.io/galletti94/my-index:0.0.2" -o="prometheus"                                                                       
INFO[0000] export from the index                         index="quay.io/galletti94/my-index:0.0.2" package=prometheus
INFO[0000] Pulling previous image quay.io/galletti94/my-index:0.0.2 to get metadata  index="quay.io/galletti94/my-index:0.0.2" package=prometheus
INFO[0000] running podman pull                           index="quay.io/galletti94/my-index:0.0.2" package=prometheus
INFO[0006] Getting label data from previous image        index="quay.io/galletti94/my-index:0.0.2" package=prometheus
INFO[0006] running podman inspect                        index="quay.io/galletti94/my-index:0.0.2" package=prometheus
INFO[0006] Previous db location ./index.db               index="quay.io/galletti94/my-index:0.0.2" package=prometheus
INFO[0006] running podman pull                           index="quay.io/galletti94/my-index:0.0.2" package=prometheus
INFO[0010] running podman save                           index="quay.io/galletti94/my-index:0.0.2" package=prometheus
INFO[0011] Preparing to pull bundles ["quay.io/galletti94/prometheus-test:0.14.0" "quay.io/galletti94/prometheus-test:0.15.0" "quay.io/galletti94/prometheus-test:0.22.2"]  index="quay.io/galletti94/my-index:0.0.2" package=prometheus
INFO[0011] running podman pull                           img="quay.io/galletti94/prometheus-test:0.14.0"
INFO[0016] running podman save                           img="quay.io/galletti94/prometheus-test:0.14.0"
INFO[0017] running podman pull                           img="quay.io/galletti94/prometheus-test:0.15.0"
INFO[0022] running podman save                           img="quay.io/galletti94/prometheus-test:0.15.0"
INFO[0023] running podman pull                           img="quay.io/galletti94/prometheus-test:0.22.2"
INFO[0028] running podman save                           img="quay.io/galletti94/prometheus-test:0.22.2"

Comment 4 errata-xmlrpc 2020-05-04 11:27:22 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-2020:0581


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