Bug 1006397

Summary: Candlepin Pool locking code does not work with MySQL
Product: [Community] Candlepin Reporter: Andrew Edwards <aedwards>
Component: candlepinAssignee: candlepin-bugs
Status: CLOSED DUPLICATE QA Contact: Katello QA List <katello-qa-list>
Severity: high Docs Contact:
Priority: high    
Version: 0.9CC: acathrow, dgoodwin, tpfromme, xdmoon
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2013-09-23 13:20:13 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:
Attachments:
Description Flags
hibernate exception while trying to create multiple entitlements from 1 pool. Candlepin 0.8.15.2 with mysql none

Description Andrew Edwards 2013-09-10 14:37:26 UTC
Description of problem:
Hibernate exceptions raised when binding to a pool multiple times in parallel.

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

How reproducible:


Steps to Reproduce:
1. Create an owner with 1 entitlement
2. Create multiple consumers
3. Attempt to bind all the consumers to the same entitlement simultaneously

Actual results:
Hibernate exceptions raised. 
Sep 09 03:22:09 [http-8080-6] ERROR org.candlepin.exceptions.mappers.CandlepinExceptionMapper - Runtime Error Row was updated or deleted by another transaction (or unsaved-value mapping was incorrect): [org.candlepin.model.Pool#8a85f9823e3d5e43013e3e0af77e0f36] at org.hibernate.persister.entity.AbstractEntityPersister.check:1,782

Expected results:
All attempts to bind to the pool are completed successfully up to the quantity of the pool

Additional info:
example script
for i in $(seq 1 16); do ( ssh <host.ip.address$i> "/usr/sbin/subscription-manager attach --pool=<pool_id>"&  ); done;

Comment 1 Andrew Edwards 2013-09-10 14:39:30 UTC
Created attachment 796037 [details]
hibernate exception while trying to create multiple entitlements from 1 pool. Candlepin 0.8.15.2 with mysql

Comment 2 Andrew Cathrow 2013-09-23 12:12:31 UTC
This is causing issues with RHEL-OSP customers.
Please can we prioritize this.

Comment 3 Devan Goodwin 2013-09-23 13:20:13 UTC
Closing as duplicate, other bug has more info and aligned to correct component/team.

*** This bug has been marked as a duplicate of bug 1006010 ***