Bug 1600201
| Summary: | [candlepin] processing virt-who report blocks RHSM certs checks what can lead to 503 errors | |||
|---|---|---|---|---|
| Product: | Red Hat Satellite | Reporter: | Mike McCune <mmccune> | |
| Component: | Candlepin | Assignee: | satellite6-bugs <satellite6-bugs> | |
| Status: | CLOSED WONTFIX | QA Contact: | jcallaha | |
| Severity: | high | Docs Contact: | ||
| Priority: | high | |||
| Version: | 6.3.2 | CC: | ajoseph, andrew.schofield, baitken, bcourt, bkearney, cmarinea, fwissing, hyu, jsherril, khowell, satellite6-bugs, stanislav.moravec | |
| Target Milestone: | Unspecified | Keywords: | Triaged | |
| Target Release: | Unused | Flags: | baitken:
needinfo?
(satellite6-bugs) |
|
| Hardware: | Unspecified | |||
| OS: | Unspecified | |||
| Whiteboard: | ||||
| Fixed In Version: | Doc Type: | If docs needed, set a value | ||
| Doc Text: | Story Points: | --- | ||
| Clone Of: | ||||
| : | 1600592 1600593 1600594 (view as bug list) | Environment: | ||
| Last Closed: | 2019-10-29 13:27:22 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: | ||||
| Bug Depends On: | 1600594 | |||
| Bug Blocks: | ||||
|
Description
Mike McCune
2018-07-11 16:38:36 UTC
As noted here: https://bugzilla.redhat.com/show_bug.cgi?id=1586210#c22 we are requesting an index be added to the cp_consumer_facts table (with a proper name) to speed up virt-who processing. We saw 30-40minute virt-who transactions reduced to ~5-6 minutes with the addition of this index. """ Ran the virt-who import and noticed that it is making a lot of relatively slow queries: select cp_consumer.id from cp_consumer inner join cp_consumer_facts on cp_consumer.id = cp_consumer_facts.cp_consumer_id where cp_consumer_facts.mapkey = 'virt.uuid' and lower(cp_consumer_facts.element) in ( '?', '?') and cp_consumer.owner_id = '?' order by cp_consumer.updated desc these were landing in the 200-300ms range. I added an index: echo "CREATE INDEX lower_case_test ON cp_consumer_facts ((lower(element)));" | sudo -u postgres psql -d candlepin this dropped the above queries down into the 0.300ms range. What this did was speed up the virt-who import from 30-45 minutes down to 6 minutes. This helps overall performance, but we were still getting 503 errors during the 6 minute window of the virt-who import. I'd recommend creating this index in the short term to assist while we continue to investigate why the Satellite is unable to keep up with the load while virt-who import is running.""" Note, we'll need to evaluate in the context of recent changes made to handling of hypervisor checkins in https://github.com/candlepin/candlepin/pull/2035 . We may end up handling differently in candlepin-2.1, candlepin-2.4, and master as a result... This may be resolved by use of async hypervisor check-ins. Note that these are used automatically by default if both virt-who and the version of Satellite in use support them. Assuming I'm reading git histories correctly, looks like: virt-who-0.15-1 katello-3.5.0 or greater will use async by default. jsherril, can you confirm my statement about katello versions ^ ? Kevin, yes that is correct, however the problem seemed to be that a long hypervisor checkin was holding locks on the database. This was a problem in katello, but was resolved as part of https://bugzilla.redhat.com/show_bug.cgi?id=1586210. In addition it seemed like the lack of an index that mike pointed out was making the problem worse (by increasing the time of the checkin). Its possible that these two fixes together will improve the situation enough, but possibly not. More investigation may be needed after the index gets in place. *** Bug 1756955 has been marked as a duplicate of this bug. *** |