Skip to content

Backup index.db to prevent opm bug consequence#635

Merged
MichalZelenak merged 1 commit intorelease-engineering:masterfrom
MichalZelenak:remove_retry
Mar 8, 2024
Merged

Backup index.db to prevent opm bug consequence#635
MichalZelenak merged 1 commit intorelease-engineering:masterfrom
MichalZelenak:remove_retry

Conversation

@MichalZelenak
Copy link
Copy Markdown
Contributor

@MichalZelenak MichalZelenak commented Mar 4, 2024

Related JIRA issue: CLOUDDST-20957
Related OPM bug: OCPBUGS-30214

Method opm_registry_add_fbc calls `_opm_registry_add.

The first time method opm_registry_add_fbc calls _opm_registry_add, _opm_registry_add fails. This failure is the correct expected behavior, however, the OPM command modifies the database file (should not be modified on an error).

As this _opm_registry_add method has the retry decorator, it is triggered again, now failing with a different error (the error is a consequence of the database modification in the previous run attempt). Only the second error (wrong one) is propagated to the parent opm_registry_add_fbc method. (As we have the retry decorator with the opm_registry_add_fbc method, this whole process is repeated).

As a result, the error, resulting from running the OPM command on the modified database file, is propagated into the state_reason.

In the solution, I propose a workaround, which creates a backup of the database file, then runs the OPM command and uses backup on command failure.

@MichalZelenak MichalZelenak force-pushed the remove_retry branch 2 times, most recently from 989f277 to bd2db1b Compare March 4, 2024 18:10
@MichalZelenak MichalZelenak force-pushed the remove_retry branch 6 times, most recently from bde40dc to dfc3d3c Compare March 6, 2024 10:47
@MichalZelenak MichalZelenak changed the title Remove opm_registry_add retry decorator Backup index.db to prevent opm bug consequence Mar 6, 2024
@MichalZelenak
Copy link
Copy Markdown
Contributor Author

MichalZelenak commented Mar 6, 2024

Logs from worker with implemented workaround (local run), used image is the copy of the image that was present in the failed build.

@MichalZelenak MichalZelenak merged commit 687b30a into release-engineering:master Mar 8, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants