Bug 1840784

Summary: [6.7] Unable to re-import subscriptions in large environment (60k+ content hosts)
Product: Red Hat Satellite Reporter: Mike McCune <mmccune>
Component: Subscription ManagementAssignee: Jonathon Turel <jturel>
Status: CLOSED ERRATA QA Contact: Cole Higgins <chiggins>
Severity: high Docs Contact:
Priority: unspecified    
Version: 6.7.0CC: egolov, jjeffers, jturel, pcreech
Target Milestone: 6.7.4Keywords: PrioBumpField, Triaged
Target Release: Unused   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: tfm-rubygem-katello-3.14.0.29-1,tfm-rubygem-katello-3.14.0.31-1 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of:
: 1874172 (view as bug list) Environment:
Last Closed: 2020-10-06 15:14:07 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:

Description Mike McCune 2020-05-27 15:49:57 UTC
A scenario occurred where we had to re-import subscriptions from Candlepin to Katello in a large customer environment but hit a scaling error:


> User.current = User.anonymous_admin
> m = Katello::Subscription
> m.import_all
> m = Katello::Pool
> m.import_all
Traceback (most recent call last):
        7: from lib/tasks/console.rake:5:in `block in <top (required)>'
        6: from (irb):6
        5: from katello (3.14.0.20) app/models/katello/glue/candlepin/candlepin_object.rb:40:in `import_all'
        4: from katello (3.14.0.20) app/models/katello/glue/candlepin/candlepin_object.rb:44:in `block in import_all'
        3: from katello (3.14.0.20) app/models/katello/glue/candlepin/candlepin_object.rb:47:in `block (2 levels) in import_all'
        2: from katello (3.14.0.20) app/models/katello/glue/candlepin/pool.rb:192:in `import_managed_associations'
        1: from katello (3.14.0.20) app/models/katello/glue/candlepin/pool.rb:169:in `import_hosts'
ActiveRecord::StatementInvalid (PG::ProtocolViolation: ERROR:  invalid message format)
: SELECT id, host_id FROM "katello_subscription_facets" WHERE "katello_subscription_facets"."uuid" IN ($1, $2, $3, $4, $5, $6, $7, $8, $9, $10, $11, $12, $13, $14, $15, $16, $17, $18, $19, $20, $21, $22, $23, $24, $25, $26, $27, $28, $29, $30, $31, $32, $33, $34, $35, $36, $37, $38, $39, $40, $41, $42, $43, $44, $45, $46, $47, $48, $49, $50, $51, $52, $53, $54, $55, $56, $57, $58, $59, $60, $61, $62, $63, $64, $65, $66, $67, $68, $69, $70, $71, $72, $73, $74, $75, $76, $77, $78, $79, $80, $81, $82, $83, $84, $85, $86, $87, $88, $89, $90, $91, $92, $93, $94, $95, $96, $97,

Comment 1 Jonathon Turel 2020-05-27 22:00:54 UTC
Created redmine issue https://projects.theforeman.org/issues/29948 from this bug

Comment 2 Bryan Kearney 2020-05-29 00:02:52 UTC
Moving this bug to POST for triage into Satellite 6 since the upstream issue https://projects.theforeman.org/issues/29948 has been resolved.