Bug 1717194
| Summary: | [6.4 only] upgrades: improve Katello::Pool.import_all by querying candlepin activation keys once per each org only | |||
|---|---|---|---|---|
| Product: | Red Hat Satellite | Reporter: | Mike McCune <mmccune> | |
| Component: | Activation Keys | Assignee: | Partha Aji <paji> | |
| Status: | CLOSED ERRATA | QA Contact: | Perry Gagne <pgagne> | |
| Severity: | unspecified | Docs Contact: | ||
| Priority: | urgent | |||
| Version: | 6.4 | CC: | adprice, andrew.schofield, chrobert, egolov, sthirugn | |
| Target Milestone: | 6.5.0 | Keywords: | Patch, Triaged | |
| Target Release: | Unused | |||
| Hardware: | x86_64 | |||
| OS: | Linux | |||
| Whiteboard: | ||||
| Fixed In Version: | tfm-rubygem-katello-3.7.0.57-1 | Doc Type: | If docs needed, set a value | |
| Doc Text: | Story Points: | --- | ||
| Clone Of: | 1683687 | |||
| : | 1717703 (view as bug list) | Environment: | ||
| Last Closed: | 2019-07-15 15:10:26 UTC | Type: | --- | |
| Regression: | --- | Mount Type: | --- | |
| Documentation: | --- | CRM: | ||
| Verified Versions: | Category: | --- | ||
| oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | ||
| Cloudforms Team: | --- | Target Upstream Version: | ||
| Embargoed: | ||||
|
Description
Mike McCune
2019-06-04 20:59:20 UTC
This performance improvement has reduced this step during upgrades on large customers by large orders of magnitude: Upgrade Step: set_upstream_pool_id (this may take a while) ... BEFORE: 5-9 hour execution time AFTER: 5-10 minute execution time *** Bug 1717703 has been marked as a duplicate of this bug. *** Verified fix in 6.4.4 snap 3. With steps from bz 1683687 1. Created PoolTestOrg. 2. Created 3000 products with repos (all pointing to the same URL). 3. Created 5 activation keys 4. Ran 'time foreman-rake katello:import_subscriptions' and 'tail -f /var/log/candlepin/candlepin.log | grep "/activation_keys/?include=id&include=pools.pool.id"" The "import subscriptions" call took about 3m 20 seconds [root@sat ~]# time foreman-rake katello:import_subscriptions /usr/share/foreman/lib/foreman.rb:8: warning: already initialized constant Foreman::UUID_REGEXP /usr/share/foreman/lib/foreman.rb:8: warning: previous definition of UUID_REGEXP was here /usr/share/foreman/lib/core_extensions.rb:182: warning: already initialized constant ActiveSupport::MessageEncryptor::DEFAULT_CIPHER /opt/theforeman/tfm-ror51/root/usr/share/gems/gems/activesupport-5.1.6/lib/active_support/message_encryptor.rb:22: warning: previous definition of DEFAULT_CIPHER was here /opt/theforeman/tfm/root/usr/share/gems/gems/katello-3.7.0.58/app/models/katello/concerns/content_facet_host_extensions.rb:7: warning: already initialized constant Katello::Concerns::ContentFacetHostExtensions::ERRATA_STATUS_MAP /opt/theforeman/tfm/root/usr/share/gems/gems/katello-3.7.0.58/app/models/katello/concerns/content_facet_host_extensions.rb:7: warning: previous definition of ERRATA_STATUS_MAP was here /opt/theforeman/tfm/root/usr/share/gems/gems/katello-3.7.0.58/app/models/katello/concerns/content_facet_host_extensions.rb:14: warning: already initialized constant Katello::Concerns::ContentFacetHostExtensions::TRACE_STATUS_MAP /opt/theforeman/tfm/root/usr/share/gems/gems/katello-3.7.0.58/app/models/katello/concerns/content_facet_host_extensions.rb:14: warning: previous definition of TRACE_STATUS_MAP was here /opt/theforeman/tfm/root/usr/share/gems/gems/katello-3.7.0.58/app/models/katello/concerns/subscription_facet_host_extensions.rb:13: warning: already initialized constant Katello::Concerns::SubscriptionFacetHostExtensions::SUBSCRIPTION_STATUS_MAP /opt/theforeman/tfm/root/usr/share/gems/gems/katello-3.7.0.58/app/models/katello/concerns/subscription_facet_host_extensions.rb:13: warning: previous definition of SUBSCRIPTION_STATUS_MAP was here Importing Subscriptions real 3m20.399s user 1m54.030s sys 0m8.031s The API Request only occurred once: [root@ibm-x3250m4-02 ~]# tail -f /var/log/candlepin/candlepin.log | grep "/activation_keys/?include=id&include=pools.pool.id" 2019-07-02 09:59:43,023 [thread=http-bio-8443-exec-7] [req=5eda4188-602d-4f19-ac3c-c568956bcea0, org=, csid=] INFO org.candlepin.common.filter.LoggingFilter - Request: verb=GET, uri=/candlepin/owners/Default_Organization/activation_keys/?include=id&include=pools.pool.id 2019-07-02 09:59:49,392 [thread=http-bio-8443-exec-4] [req=c191728e-4fab-4308-888c-1acd63fc67c3, org=, csid=] INFO org.candlepin.common.filter.LoggingFilter - Request: verb=GET, uri=/candlepin/owners/PoolTestOrg/activation_keys/?include=id&include=pools.pool.id 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, 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/RHBA-2019:1780 |