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 1713194 - [RFE] New check - warning when there are many fact names
Summary: [RFE] New check - warning when there are many fact names
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Satellite
Classification: Red Hat
Component: Satellite Maintain
Version: 6.6.0
Hardware: Unspecified
OS: Unspecified
high
high
Target Milestone: 6.8.0
Assignee: Lukas Zapletal
QA Contact: Jameer Pathan
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2019-05-23 06:26 UTC by Lukas Zapletal
Modified: 2020-10-27 12:38 UTC (History)
9 users (show)

Fixed In Version: rubygem-foreman_maintain-0.6.3
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2020-10-27 12:38:20 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Foreman Issue Tracker 27075 0 Normal Closed Fact names amount check 2020-11-18 06:28:20 UTC
Red Hat Knowledge Base (Solution) 4163891 0 Performance tune None Generic slowness of Satellite6 caused by storing many facts 2019-05-27 06:07:25 UTC
Red Hat Product Errata RHBA-2020:4365 0 None None None 2020-10-27 12:38:41 UTC

Description Lukas Zapletal 2019-05-23 06:26:53 UTC
Customers often suffer from many fact names which can slower performance of whole instance. Please add new check:

hosts_count = select count(*) from host;
facts_count = select count(*) from fact_name;

if facts_count > 10_000 + hosts_count * 2

  print warning "There are more fact names than estimated #{facts_count}, consider adding fact exclude filter."

end

This should give a reasonable warning threshold:

1k hosts = 12k fact names
10k hosts = 30k fact names
50k hosts = 110k fact names

Comment 6 Lukas Zapletal 2019-06-18 11:40:29 UTC
I want to deliver a foreman-maintain check and a blog article about this. Give me more time.

Comment 8 Lukas Zapletal 2019-06-18 14:46:36 UTC
I am implementing more straightforward way of checking for hosts with many fact names.

Comment 9 Bryan Kearney 2019-06-18 16:04:33 UTC
Upstream bug assigned to lzap

Comment 10 Bryan Kearney 2019-06-18 16:04:34 UTC
Upstream bug assigned to lzap

Comment 11 Bryan Kearney 2019-11-21 17:05:55 UTC
Moving this bug to POST for triage into Satellite 6 since the upstream issue https://projects.theforeman.org/issues/27075 has been resolved.

Comment 12 Jameer Pathan 2020-07-01 08:38:51 UTC
Verified

Verified with:
- Satellite 6.8.0 snap 6
- rubygem-foreman_maintain-0.6.5-1.el7sat.noarch

Test steps:
- Run "foreman-maintain health check --label foreman-fact-names"
- Modified max fact value for testing purpose.
- Run "foreman-maintain health check --label foreman-fact-names"

Observation:
- Check detects whether hosts has fact values more than a certain number.(Currently 10000)
- It gives link to KCS article https://access.redhat.com/solutions/4163891

# foreman-maintain health check --label foreman-fact-names
Running ForemanMaintain::Scenario::FilteredScenario
================================================================================
Check number of fact names in database:                               [OK]
--------------------------------------------------------------------------------

# foreman-maintain health check --label foreman-fact-names
Running ForemanMaintain::Scenario::FilteredScenario
================================================================================
Check number of fact names in database:                               [WARNING]
Host (ID 1) has 405 fact values which is more than 100.
This can cause slow fact processing.
--------------------------------------------------------------------------------
Continue with step [Show knowledge base article for troubleshooting]?, [y(yes), n(no), q(quit)] y
Show knowledge base article for troubleshooting:                                
Go to https://access.redhat.com/solutions/4163891
please follow steps from above article to resolve this issue
press ENTER once done.

                                                                      [OK]
--------------------------------------------------------------------------------
Rerunning the check after fix procedure
Check number of fact names in database:                               [WARNING]
Host (ID 1) has 405 fact values which is more than 100.
This can cause slow fact processing.
--------------------------------------------------------------------------------
Continue with step [Show knowledge base article for troubleshooting]?, [y(yes), n(no), q(quit)] n
Scenario [ForemanMaintain::Scenario::FilteredScenario] failed.                  

The following steps ended up in warning state:

  [foreman-fact-names]

The steps in warning state itself might not mean there is an error,
but it should be reviewed to ensure the behavior is expected

Comment 15 errata-xmlrpc 2020-10-27 12:38:20 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 (Satellite 6.8 Satellite Maintenance 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/RHBA-2020:4365


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