Bug 1867287

Summary: Error Row was updated or deleted by another transaction when deleting docker repository
Product: Red Hat Satellite Reporter: Ganesh Payelkar <gpayelka>
Component: RepositoriesAssignee: Ian Ballou <iballou>
Status: CLOSED ERRATA QA Contact: Stephen Wadeley <swadeley>
Severity: high Docs Contact:
Priority: high    
Version: 6.8.0CC: iballou, jsherril, jyejare, mawerner, myoder, pcreech
Target Milestone: 6.8.0Keywords: Triaged
Target Release: Unused   
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: tfm-rubygem-katello-3.16.0.4-1 Doc Type: Bug Fix
Doc Text:
Error row was updated or deleted by another transaction when deleting a Docker repository
Story Points: ---
Clone Of: Environment:
Last Closed: 2020-10-27 13:05:24 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:

Description Ganesh Payelkar 2020-08-08 04:42:50 UTC
Description of problem:

Trying to delete docker repos which were sync previously on satellite

 Runtime Error Row was updated or deleted by another transaction (or unsaved-value mapping was incorrect) : [org.candlepin.model.OwnerProduct#org.candlepin.model.OwnerProductKey@2c50e21a] at org.hibernate.dialect.lock.PessimisticWriteSelectLockingStrategy.lock:81 (Katello::Errors::CandlepinError)


Version-Release number of selected component (if applicable):
satellite-6.8.0-0.7.beta
pulp-server-2.21.2-1

How reproducible:
New installation of 6.8 Beta

Steps to Reproduce:
1. Create a product 
2. Sync docker images from external registry 
3. Tried to delete existing repos

Actual results: 

 Error:

Katello::Errors::CandlepinError

Runtime Error Row was updated or deleted by another transaction (or unsaved-value mapping was incorrect) : [org.candlepin.model.OwnerProduct#org.candlepin.model.OwnerProductKey@2c50e21a] at org.hibernate.dialect.lock.PessimisticWriteSelectLockingStrategy.lock:81 


Expected results:

We should able to delete unwanted product, whenever required. 

Additional info:

Comment 6 Justin Sherrill 2020-08-20 17:59:29 UTC
were you deleting multiple repositories at the same time? (or deleting an entire product?)

Comment 7 Ganesh Payelkar 2020-08-24 16:37:15 UTC
Tried to delete product

Comment 8 Ian Ballou 2020-09-01 22:02:22 UTC
Looks like it's a race condition. If I put a break before the `::Katello::Resources::Candlepin::Product.remove_content` call in Actions::Candlepin::Product::ContentRemove and run it manually, there is no error.

Not sure yet if this means it's a Candlepin issue or a Katello issue.

Comment 9 Ian Ballou 2020-09-02 14:55:16 UTC
Created redmine issue https://projects.theforeman.org/issues/30766 from this bug

Comment 10 Bryan Kearney 2020-09-04 16:01:53 UTC
Moving this bug to POST for triage into Satellite since the upstream issue https://projects.theforeman.org/issues/30766 has been resolved.

Comment 18 errata-xmlrpc 2020-10-27 13:05:24 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: Satellite 6.8 release), 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:4366

Comment 19 errata-xmlrpc 2020-10-27 13:08:13 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: Satellite 6.8 release), 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:4366