RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 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 "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". 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 "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-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 2100559 - network role should support running tests with ANSIBLE_GATHERING=explicit
Summary: network role should support running tests with ANSIBLE_GATHERING=explicit
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 9
Classification: Red Hat
Component: rhel-system-roles
Version: 9.0
Hardware: Unspecified
OS: Unspecified
low
medium
Target Milestone: rc
: 9.1
Assignee: Rich Megginson
QA Contact: Jon Trossbach
URL:
Whiteboard: role:network
Depends On: 2078989 2078999 2079008 2100558
Blocks: 2079009 2162788
TreeView+ depends on / blocked
 
Reported: 2022-06-23 17:19 UTC by Rich Megginson
Modified: 2023-05-09 08:40 UTC (History)
5 users (show)

Fixed In Version: rhel-system-roles-1.21.0-0.15.el9
Doc Type: No Doc Update
Doc Text:
Clone Of: 2100558
: 2162788 (view as bug list)
Environment:
Last Closed: 2023-05-09 07:37:53 UTC
Type: Bug
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Github linux-system-roles network pull 549 0 None open Support running the tests with ANSIBLE_GATHERING=explicit 2023-01-10 18:51:30 UTC
Red Hat Issue Tracker NMT-194 0 None None None 2023-01-26 20:37:11 UTC
Red Hat Issue Tracker RHELPLAN-126136 0 None None None 2022-06-23 17:24:28 UTC
Red Hat Product Errata RHEA-2023:2246 0 None None None 2023-05-09 07:38:20 UTC

Description Rich Megginson 2022-06-23 17:19:51 UTC
+++ This bug was initially created as a clone of Bug #2100558 +++

+++ 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


Even though the network role should support being run with "gather_facts: false" in the playbook, almost all of the tests fail when using ANSIBLE_GATHERING=explicit, so it is difficult to verify that the role is indeed working with fact gathering disabled.

If we change all of the tests that fail to use "gather_facts: true", then the tests pass, but we have then masked the problem, and we are not actually verifying that the role will work when customers use "gather_facts: false" in their playbooks.

I guess the best we can do is ensure that there are at least some non-trivial network role tests that can be run with ANSIBLE_GATHERING=explicit that do not just use "gather_facts: true" inside the test.

Comment 9 Jon Trossbach 2023-02-12 17:40:05 UTC
I ran this against what is likely a non-trivial enough use case for "gather_facts: false", i.e. tests/network_tests_auto_gateway_initscripts.yml. It passed for both 2.9 and the latest Ansible.

However, I think this speaks to a broader thing I will speak to David Jez about. Namely, we need his pipeline to get this case coverered for the relevant tests.

Comment 12 errata-xmlrpc 2023-05-09 07:37:53 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 (rhel-system-roles bug fix and enhancement update), 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/RHEA-2023:2246


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