Red Hat Satellite engineering is moving the tracking of its product development work on Satellite to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "Satellite project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs will be migrated starting at the end of May. If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "Satellite project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/SAT-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
Bug 1962694 - Stop auto uploads if the total amount of hosts passes 150k
Summary: Stop auto uploads if the total amount of hosts passes 150k
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Satellite
Classification: Red Hat
Component: RH Cloud - Inventory
Version: 6.9.0
Hardware: Unspecified
OS: Unspecified
unspecified
medium
Target Milestone: 6.10.0
Assignee: Shimon Shtein
QA Contact: Jameer Pathan
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2021-05-20 13:57 UTC by Shimon Shtein
Modified: 2021-11-16 14:11 UTC (History)
1 user (show)

Fixed In Version: tfm-rubygem-foreman_rh_cloud-3.0.21
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2021-11-16 14:11:01 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHSA-2021:4702 0 None None None 2021-11-16 14:11:08 UTC

Description Shimon Shtein 2021-05-20 13:57:01 UTC
Currently rh_cloud plugin will attempt to upload automatically hosts inventory for all organizations no matter how big they are. For large organizations of ~150K hosts, it can cause an issue on the processing side. To mitigate this, the system would not attempt to upload such large organizations automatically.

Reproduce steps:
Create an organization with 150K hosts and wait until it's uploaded automatically

Current state:
The report would be uploaded.

Expected:
The system will not attempt to upload such a large report.

Comment 1 Brad Buckingham 2021-05-20 14:07:33 UTC
Can you add a description and reproducer steps for QE?

Comment 2 Jameer Pathan 2021-08-18 10:12:45 UTC
Verified:

Verified with:
- Satellite 6.10.0 snap 13
- tfm-rubygem-foreman_rh_cloud-4.0.25.1-2.el7sat.noarch

Test steps:
- Register few content hosts with satellite
- changed value of max_org_size for testing purpose
- Start report generation and upload using ForemanInventoryUpload::Async::GenerateAllReportsJob.perform_now

Observation:
- If organization had more hosts than specified by max_org_size variable
then report won't be uploaded.


[root@dhcp-3-129 ~]# foreman-rake console
'ErbParser' is ignored.
'RubyParser' is ignored.
Loading production environment (Rails 6.0.3.7)
irb(main):001:0> ForemanInventoryUpload.max_org_size
=> 150000
irb(main):002:0> ForemanInventoryUpload.instance_variable_set(:@max_org_size, 2)
=> 2
irb(main):003:0> ForemanInventoryUpload.max_org_size
=> 2
irb(main):004:0> ForemanInventoryUpload::Async::GenerateAllReportsJob.perform_now
=> [true]
irb(main):005:0> ForemanInventoryUpload.instance_variable_set(:@max_org_size, 3)
=> 3
irb(main):006:0> ForemanInventoryUpload::Async::GenerateAllReportsJob.perform_now
=> [#<ForemanInventoryUpload::Async::GenerateReportJob:0x0000000012735160 @arguments=["/var/lib/foreman/red_hat_inventory/generated_reports/", 1], @job_id="bd9f0346-346b-4968-8322-bfd76e96d07c", @queue_name="default", @priority=nil, @executions=0, @exception_executions={}, @provider_job_id="bd9f0346-346b-4968-8322-bfd76e96d07c">]

Comment 5 errata-xmlrpc 2021-11-16 14:11:01 UTC
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 (Moderate: Satellite 6.10 Release), 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/RHSA-2021:4702


Note You need to log in before you can comment on or make changes to this bug.