Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.
Red Hat Satellite engineering is moving the tracking of its product development work on Satellite to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "Satellite project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs will be migrated starting at the end of May. If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "Satellite project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/SAT-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.

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