Bug 1150234
| Summary: | "This instance does not yet exist as a row in the database" Exception | ||||||||
|---|---|---|---|---|---|---|---|---|---|
| Product: | [Community] Candlepin (Migrated to Jira) | Reporter: | Dennis Crissman <dcrissman> | ||||||
| Component: | candlepin | Assignee: | candlepin-bugs | ||||||
| Status: | CLOSED CURRENTRELEASE | QA Contact: | Katello QA List <katello-qa-list> | ||||||
| Severity: | high | Docs Contact: | |||||||
| Priority: | urgent | ||||||||
| Version: | 0.9 | CC: | aedwards, chrobert, dcrissman, dgoodwin, ggillies, londrack, timoran, tony | ||||||
| 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: | 2014-11-04 19:11:35 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: |
|
||||||||
I don't believe the problem is actually with RH00028, I believe at this time the refresh process is blowing up before it gets to that subscription. Rather it seems to be failing when attempting to delete pool 8a85f981478d1fa60147aa79bfad4ba4 which is for productid MCT0370. 27 of the above owners have this product in common. Created attachment 945776 [details]
Exception for owner 5544985
Raising priority as we have another customer issue. Will wrote a test that exposed the problem and a fix regarding how we handle cleanup of pools. An bug in the relatively rare situation that virt_limit is taken off a subscription caused problems with Hibernate. Fix is merged to master, but we are still blocked from building for RHEL 6 by bug #1149605. PR: https://github.com/candlepin/candlepin/pull/746 Master commit: 972108f643f50030037ff940d5eb4cc176884151 have another customer running into this issue, do we have an eta on a fix, i see the bug is urgent already. Will's fix is now build in brew as candlepin-0.9.26.3-1.el6 I see two bugs here.
In this scenario, virt_limit has not been removed.
However quantity has changed from 1 to "unlimited", or -1.
In pool.java we have:
public boolean isOverflowing() {
return getConsumed() > this.quantity;
}
Which is wrong as quantity is -1 in this case, which is supposed to mean unlimited, so it's incorrectly trying to revoke entitlements for a pool that's going to unlimited quantity.
The second issue appears to be the same as the first, Will's fix avoids it for pools being deleted, but if attributes change, and quantity is reduces, and entitlements are overconsumed, it will surface again.
A more correct fix has been done in master, commit c0070627cddde0dce79bb0d461f46ed5a02f952f fixes this issue, and 69ccd4f7b3676c68c1fd6c0faa19ec22df6debbb fixes the bug where it looks like we'll try to revoke every entitlement in an unlimited pool if anything changes on it during refresh. Doing a 0.9.26.4-1 hotfix build now. This change has been pushed into production. I have refreshed the owners that I could find, but in case any were missed. All owners that were having this issue will need a pool refresh. |
Created attachment 944706 [details] Exception log I am getting the attached exception in both stage and production environments. Would someone take a look? Thanks, Dennis