Bug 2079009

Summary: metrics role should support running with gather_facts: false
Product: Red Hat Enterprise Linux 8 Reporter: Rich Megginson <rmeggins>
Component: rhel-system-rolesAssignee: Rich Megginson <rmeggins>
Status: CLOSED MIGRATED QA Contact: CS System Management SST QE <rhel-cs-system-management-subsystem-qe>
Severity: unspecified Docs Contact: Jacob Taylor Valdez <jvaldez>
Priority: unspecified    
Version: 8.7CC: rhel-cs-system-management-subsystem-qe, spetrosi
Target Milestone: rcKeywords: MigratedToJIRA, Triaged
Target Release: 8.7   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard: role:metrics
Fixed In Version: Doc Type: Enhancement
Doc Text:
.The `metrics` System Role does not work with disabled fact gathering Ansible fact gathering might be disabled in your environment for performance or other reasons. In such configurations, it is not currently possible to use the `metrics` System Role. To work around this problem, enable fact caching, or do not use the `metrics` System Role if it is not possible to use fact gathering.
Story Points: ---
Clone Of: 2078999 Environment:
Last Closed: 2023-09-12 10:03:02 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:
Bug Depends On: 2078989, 2078999, 2079008, 2100558, 2100559, 2162788    
Bug Blocks:    

Description Rich Megginson 2022-04-26 17:14:36 UTC
+++ This bug was initially created as a clone of Bug #2078999 +++

+++ This bug was initially created as a clone of Bug #2078989 +++

Description of problem:
Some users use `gather_facts: false` in their playbooks, due to performance issues with fact gathering, or other reasons.  However, this breaks the metrics role because it requires some sort of facts like `os_family`, `distribution`, etc. to be defined.  The role should work if fact gathering is disabled in the playbook.

NOTE: This may require the user to enable fact caching, or simply not use the metrics role if it is not possible to use fact gathering at all.


Version-Release number of selected component (if applicable):


How reproducible:


Steps to Reproduce:
1.
2.
3.

Actual results:


Expected results:


Additional info:

--- Additional comment from Rich Megginson on 2022-04-26 16:41:29 UTC ---

Ansible by default will always gather facts in playbooks.  In order to test, you can use https://docs.ansible.com/ansible/latest/reference_appendices/config.html#default-gathering to disable fact gathering by default.

e.g. 

ANSIBLE_GATHERING=explicit ansible-playbook .... tests/tests_name.yml

Comment 4 RHEL Program Management 2023-09-12 09:58:00 UTC
Issue migration from Bugzilla to Jira is in process at this time. This will be the last message in Jira copied from the Bugzilla bug.

Comment 5 RHEL Program Management 2023-09-12 10:03:02 UTC
This BZ has been automatically migrated to the issues.redhat.com Red Hat Issue Tracker. All future work related to this report will be managed there.

Due to differences in account names between systems, some fields were not replicated.  Be sure to add yourself to Jira issue's "Watchers" field to continue receiving updates and add others to the "Need Info From" field to continue requesting information.

To find the migrated issue, look in the "Links" section for a direct link to the new issue location. The issue key will have an icon of 2 footprints next to it, and begin with "RHEL-" followed by an integer.  You can also find this issue by visiting https://issues.redhat.com/issues/?jql= and searching the "Bugzilla Bug" field for this BZ's number, e.g. a search like:

"Bugzilla Bug" = 1234567

In the event you have trouble locating or viewing this issue, you can file an issue by sending mail to rh-issues. You can also visit https://access.redhat.com/articles/7032570 for general account information.