Bug 1894278 - "database is locked" error when adding bundle to index image
Summary: "database is locked" error when adding bundle to index image
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: OpenShift Container Platform
Classification: Red Hat
Component: OLM
Version: 4.7
Hardware: Unspecified
OS: Unspecified
unspecified
medium
Target Milestone: ---
: 4.7.0
Assignee: Evan Cordell
QA Contact: Jian Zhang
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2020-11-03 22:15 UTC by Luiz Carvalho
Modified: 2021-02-24 15:30 UTC (History)
2 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2021-02-24 15:30:50 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Github operator-framework operator-registry pull 506 0 None closed Bug 1894278: (fix) close connection to db 2020-11-25 10:19:37 UTC
Red Hat Product Errata RHSA-2020:5633 0 None None None 2021-02-24 15:30:52 UTC

Comment 2 Jian Zhang 2020-11-05 01:30:39 UTC
I can reproduce this issue by using the old opm:
[root@preserve-olm-env data]# opm version
Version: version.Version{OpmVersion:"v1.14.3-5-gf6e5d92", GitCommit:"f6e5d92", BuildDate:"2020-10-14T03:19:10Z", GoOs:"linux", GoArch:"amd64"}

[root@preserve-olm-env data]# opm index add --generate --bundles registry-proxy.engineering.redhat.com/rh-osbs/openshift4-windows-machine-config-operator-bundle@sha256:6f18bc811bd720900ae7e450763da778d7c7ef7607092787e80d0bb27a83f677 --binary-image registry-proxy.engineering.redhat.com/rh-osbs/openshift-ose-operator-registry@sha256:75df14ae994f4426943a39ac6e66b243412a18cf07688fa487380dc38cdb971c --from-index registry-proxy.engineering.redhat.com/rh-osbs/iib-pub-pending:v4.6 --overwrite-latest
...
ERRO[0016] permissive mode disabled                      bundles="[registry-proxy.engineering.redhat.com/rh-osbs/openshift4-windows-machine-config-operator-bundle@sha256:6f18bc811bd720900ae7e450763da778d7c7ef7607092787e80d0bb27a83f677]" error="database is locked"

When using the latest opm, it works well. LGTM, verify it.

[root@preserve-olm-env operator-registry]# opm version
Version: version.Version{OpmVersion:"v1.14.3-49-gbfe56a7", GitCommit:"bfe56a7", BuildDate:"2020-11-05T01:16:40Z", GoOs:"linux", GoArch:"amd64"}

[root@preserve-olm-env operator-registry]# opm index add --generate --bundles registry-proxy.engineering.redhat.com/rh-osbs/openshift4-windows-machine-config-operator-bundle@sha256:6f18bc811bd720900ae7e450763da778d7c7ef7607092787e80d0bb27a83f677 --binary-image registry-proxy.engineering.redhat.com/rh-osbs/openshift-ose-operator-registry@sha256:75df14ae994f4426943a39ac6e66b243412a18cf07688fa487380dc38cdb971c --from-index registry-proxy.engineering.redhat.com/rh-osbs/iib-pub-pending:v4.6 --overwrite-latest
INFO[0000] building the index                            bundles="[registry-proxy.engineering.redhat.com/rh-osbs/openshift4-windows-machine-config-operator-bundle@sha256:6f18bc811bd720900ae7e450763da778d7c7ef7607092787e80d0bb27a83f677]"

...
INFO[0013] Generating dockerfile                         bundles="[registry-proxy.engineering.redhat.com/rh-osbs/openshift4-windows-machine-config-operator-bundle@sha256:6f18bc811bd720900ae7e450763da778d7c7ef7607092787e80d0bb27a83f677]"
INFO[0013] writing dockerfile: index.Dockerfile          bundles="[registry-proxy.engineering.redhat.com/rh-osbs/openshift4-windows-machine-config-operator-bundle@sha256:6f18bc811bd720900ae7e450763da778d7c7ef7607092787e80d0bb27a83f677]"

Comment 5 errata-xmlrpc 2021-02-24 15:30:50 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 (Moderate: OpenShift Container Platform 4.7.0 security, bug fix, and enhancement 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-2020:5633


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