| Summary: | Pools with Duplicate ProductPoolAttributes cannot be deleted | ||||||
|---|---|---|---|---|---|---|---|
| Product: | [Community] Candlepin | Reporter: | Andrew Edwards <aedwards> | ||||
| Component: | candlepin | Assignee: | William Poteat <wpoteat> | ||||
| Status: | CLOSED CURRENTRELEASE | QA Contact: | Eric Sammons <esammons> | ||||
| Severity: | unspecified | Docs Contact: | |||||
| Priority: | unspecified | ||||||
| Version: | 0.5 | CC: | tpfromme, wpoteat | ||||
| Target Milestone: | --- | ||||||
| Target Release: | --- | ||||||
| Hardware: | Unspecified | ||||||
| OS: | Unspecified | ||||||
| Whiteboard: | |||||||
| Fixed In Version: | Doc Type: | Bug Fix | |||||
| Doc Text: | Story Points: | --- | |||||
| Clone Of: | |||||||
| : | 809078 (view as bug list) | Environment: | |||||
| Last Closed: | 2012-07-17 13:04:01 UTC | Type: | --- | ||||
| Regression: | --- | Mount Type: | --- | ||||
| Documentation: | --- | CRM: | |||||
| Verified Versions: | Category: | --- | |||||
| oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |||||
| Cloudforms Team: | --- | Target Upstream Version: | |||||
| Bug Depends On: | |||||||
| Bug Blocks: | 809078 | ||||||
| Attachments: |
|
||||||
To be clear, this is a problem we can see in QA,STAGE, PROD environments. We have not determined how the ProductPoolAttributes were duplicated but many of our pools have this issue. commit bbc8359d0d1fb9fba8837f838e8c00eb3c62e152 on master. This fix will allow the pool to be deleted even if duplicate attributes have been created. A separate bug will be set up to cover the problem of the attributes creation. Marking all community bugs modified or beyong as closed. |
Created attachment 565095 [details] stack trace of hibernate exception for constraint violation Description of problem: If a pool has duplicate ProductPoolAttributes it can not be deleted via the DELETE pool api method or via refresh pools. Version-Release number of selected component (if applicable): 0.5.5.2 How reproducible: 100% Steps to Reproduce: 1. Create a new pool 2. Create a ProductPoolAttribute and set pool_id to the previously created pool 3. Duplicate the created ProductPoolAttribute and change the id 4. call DELETE /pools/{pool_id} Actual results: hibernate raises constraint violation (see attached) Expected results: pool is deleted. Additional info: if you were to call GET /pools/{pool_id} you will only see one of the attributes created. I think this may be the root of the problem since hibernate may only be trying to delete one of the attributes. When it attempts to save this state back to the database the existing ProductPoolAttribute complains.