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 1934115 - Foreman facts callback does not work well when more facts are added from roles
Summary: Foreman facts callback does not work well when more facts are added from roles
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Satellite
Classification: Red Hat
Component: Ansible Collection
Version: 6.9.0
Hardware: Unspecified
OS: Unspecified
medium
medium
Target Milestone: 6.10.0
Assignee: satellite6-bugs
QA Contact: Vladimír Sedmík
URL:
Whiteboard:
: 1989034 (view as bug list)
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2021-03-02 14:29 UTC by Adam Ruzicka
Modified: 2024-12-20 19:42 UTC (History)
8 users (show)

Fixed In Version: ansible-collection-redhat-satellite-2.1.0
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2021-11-16 14:10:12 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Github theforeman foreman-ansible-modules pull 1155 0 None closed Foreman facts uploading correctly merges facts 2021-07-22 19:08:55 UTC
Red Hat Product Errata RHSA-2021:4702 0 None None None 2021-11-16 14:10:21 UTC

Internal Links: 1989034

Description Adam Ruzicka 2021-03-02 14:29:08 UTC
Description of problem:
The current ansible callback is inefficient 

Version-Release number of selected component (if applicable):
Foreman facts callback does not work well when more facts are added from roles

How reproducible:
Always


Steps to Reproduce:
1. Have a role which uses set_fact under the hood a bunch of times
2. Assign it to a host
3. Apply roles to the host

Actual results:
It is slow, facts are created and then destroyed again several times.


Expected results:
It is fast-ish facts are changed only once at the end of the run.


Additional info:
We upload facts for any "ok" event, given Foreman behavior, that removes all existing facts in Foreman of Ansible source. While setup phase upload all ansible_* modules, if next play introduces new fact, it deletes all facts from step one and adds just newly added facts. Also sending update for each play is not performance heavy, it's better to build the final set in memory and then send at once.

Comment 2 Brad Buckingham 2021-08-12 18:58:43 UTC
*** Bug 1989034 has been marked as a duplicate of this bug. ***

Comment 3 Vladimír Sedmík 2021-10-07 15:55:45 UTC
Verified on 6.10.0 snap 21 (ansible-collection-redhat-satellite-2.2.0-1.el7sat.noarch):
1) execution time was 2.3 times faster compared to 6.9.7 snap 1
2) all facts were successfully created (not only the last added)

Comment 6 errata-xmlrpc 2021-11-16 14:10:12 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.