Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.
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 1915017

Summary: network: tests_bond_initscripts.yml leaves behind unusable resolv.conf in CI
Product: Red Hat Enterprise Linux 8 Reporter: Pavel Cahyna <pcahyna>
Component: rhel-system-rolesAssignee: Gris Ge <fge>
Status: CLOSED ERRATA QA Contact: Zhiqian Guan <zhguan>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 8.4CC: djez, nhosoi, pkettman, rmeggins, till, wenliang, zhguan
Target Milestone: rcKeywords: Triaged
Target Release: 8.4Flags: pm-rhel: mirror+
Hardware: Unspecified   
OS: Unspecified   
Whiteboard: role:network
Fixed In Version: rhel-system-roles-1.6.4-1.el8 Doc Type: No Doc Update
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2021-11-09 17:44:38 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:

Description Pavel Cahyna 2021-01-11 18:31:16 UTC
Description of problem:

After running tests_bond_initscripts, which uses dnsmasq as a dns/dhcp server on the bond interface, resolv.conf contains:

; generated by /usr/sbin/dhclient-script
nameserver 192.0.2.1

which is probably the IP address of dnsmasq, which is no longer running.

As a consequence, DNS is broken in the test VM and all other tests that need to download packages fail. Among them tests_unit.yml and all the storage role tests, also some selinux tests (need to install policycoreutils-python).

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

rhel-system-roles-1.0-22.el8

How reproducible:

well, in 1minutetip.

Steps to Reproduce:
1. 1minutetip -p ANSIBLE_VER=2 -p "SYSTEM_ROLES_ONLY_TESTS=network/tests_bond_initscripts.yml network/tests_unit.yml" rhel8

Actual results:

tests_unit.yml fails. Can not dowload Packages/python2-mock.

Expected results:

tests_unit.yml succeeds.

Additional info:

This is not a regression in the role, because the 8.3 package in 8.4 has the same problem and the 8.4 package in 8.3 does not have the problem. Something has changed in the meantime and I was not able to identify it: I tried downgrading NetworkManager, dhcp-client, network-scripts, dnsmasq, to their 8.3 versions, always with thesame result.

Comment 4 Till Maas 2021-02-24 15:25:32 UTC
Idea about a possible solution: Maybe the profiles used for the tests with dhcp can be adjusted to ignore DNS settings.

Comment 7 Gris Ge 2021-07-14 15:46:43 UTC
Patch send to upstream.

Comment 9 Zhiqian Guan 2021-07-30 10:43:24 UTC
:: [ 05:10:47 ] :: [   PASS   ] :: Test network/tests_bond_initscripts.yml (roles/rhel-system-roles.network/tests/tests_bond_initscripts.yml) with ANSIBLE-2.9 against RHEL_6_10_GA (Expected 0, got 0)
:: [ 05:11:26 ] :: [   PASS   ] :: Test network/tests_unit.yml (roles/rhel-system-roles.network/tests/tests_unit.yml) with ANSIBLE-2.9 against RHEL_6_10_GA (Expected 0, got 0)

:: [ 06:06:45 ] :: [   PASS   ] :: Test network/tests_bond_initscripts.yml (roles/rhel-system-roles.network/tests/tests_bond_initscripts.yml) with ANSIBLE-2.9 against RHEL_7_9_GA (Expected 0, got 0)
:: [ 06:08:00 ] :: [   PASS   ] :: Test network/tests_unit.yml (roles/rhel-system-roles.network/tests/tests_unit.yml) with ANSIBLE-2.9 against RHEL_7_9_GA (Expected 0, got 0)

:: [ 06:18:15 ] :: [   PASS   ] :: Test network/tests_bond_initscripts.yml (roles/rhel-system-roles.network/tests/tests_bond_initscripts.yml) with ANSIBLE-2.9 against RHEL_8_4_0_GA (Expected 0, got 0)
:: [ 06:19:42 ] :: [   PASS   ] :: Test network/tests_unit.yml (roles/rhel-system-roles.network/tests/tests_unit.yml) with ANSIBLE-2.9 against RHEL_8_4_0_GA (Expected 0, got 0)

:: [ 06:22:08 ] :: [   PASS   ] :: Test network/tests_bond_initscripts.yml (roles/rhel-system-roles.network/tests/tests_bond_initscripts.yml) with ANSIBLE-2.9 against RHEL_8_5_0_TESTING (Expected 0, got 0)
:: [ 06:22:54 ] :: [   PASS   ] :: Test network/tests_unit.yml (roles/rhel-system-roles.network/tests/tests_unit.yml) with ANSIBLE-2.9 against RHEL_8_5_0_TESTING (Expected 0, got 0)

:: [ 06:28:15 ] :: [   PASS   ] :: Test network/tests_bond_initscripts.yml (roles/rhel-system-roles.network/tests/tests_bond_initscripts.yml) with ANSIBLE-2.9 against RHEL_9_TESTING (Expected 0, got 0)
:: [ 06:28:44 ] :: [   PASS   ] :: Test network/tests_unit.yml (roles/rhel-system-roles.network/tests/tests_unit.yml) with ANSIBLE-2.9 against RHEL_9_TESTING (Expected 0, got 0)

[root@netqe3 Upstream-testsuite]# rpm -q rhel-system-roles
rhel-system-roles-1.7.1-1.el8.noarch
[root@netqe3 Upstream-testsuite]#

Comment 13 Zhiqian Guan 2021-08-09 03:58:20 UTC
[root@netqe2 tmp]# rpm -q rhel-system-roles
rhel-system-roles-1.6.6-1.el8.noarch
[root@netqe2 tmp]#
:: [ 23:02:02 ] :: [   PASS   ] :: Test network/tests_bond_initscripts.yml (roles/rhel-system-roles.network/tests/tests_bond_initscripts.yml) with ANSIBLE-2.9 against RHEL_6_10_GA (Expected 0, got 0)
:: [ 23:02:35 ] :: [   PASS   ] :: Test network/tests_unit.yml (roles/rhel-system-roles.network/tests/tests_unit.yml) with ANSIBLE-2.9 against RHEL_6_10_GA (Expected 0, got 0)
:: [ 23:39:08 ] :: [   PASS   ] :: Test network/tests_bond_initscripts.yml (roles/rhel-system-roles.network/tests/tests_bond_initscripts.yml) with ANSIBLE-2.9 against RHEL_7_9_GA (Expected 0, got 0)
:: [ 23:40:17 ] :: [   PASS   ] :: Test network/tests_unit.yml (roles/rhel-system-roles.network/tests/tests_unit.yml) with ANSIBLE-2.9 against RHEL_7_9_GA (Expected 0, got 0)
:: [ 23:45:37 ] :: [   PASS   ] :: Test network/tests_bond_initscripts.yml (roles/rhel-system-roles.network/tests/tests_bond_initscripts.yml) with ANSIBLE-2.9 against RHEL_8_4_0_GA (Expected 0, got 0)
:: [ 23:47:03 ] :: [   PASS   ] :: Test network/tests_unit.yml (roles/rhel-system-roles.network/tests/tests_unit.yml) with ANSIBLE-2.9 against RHEL_8_4_0_GA (Expected 0, got 0)
:: [ 23:49:06 ] :: [   PASS   ] :: Test network/tests_bond_initscripts.yml (roles/rhel-system-roles.network/tests/tests_bond_initscripts.yml) with ANSIBLE-2.9 against RHEL_8_5_0_TESTING (Expected 0, got 0)
:: [ 23:49:54 ] :: [   PASS   ] :: Test network/tests_unit.yml (roles/rhel-system-roles.network/tests/tests_unit.yml) with ANSIBLE-2.9 against RHEL_8_5_0_TESTING (Expected 0, got 0)
:: [ 23:51:09 ] :: [   PASS   ] :: Test network/tests_bond_initscripts.yml (roles/rhel-system-roles.network/tests/tests_bond_initscripts.yml) with ANSIBLE-2.9 against RHEL_9_TESTING (Expected 0, got 0)
:: [ 23:51:38 ] :: [   PASS   ] :: Test network/tests_unit.yml (roles/rhel-system-roles.network/tests/tests_unit.yml) with ANSIBLE-2.9 against RHEL_9_TESTING (Expected 0, got 0)

Comment 15 Zhiqian Guan 2021-08-09 04:00:37 UTC
Based on comment13 and comment14, set this to VERIFIED

Comment 17 errata-xmlrpc 2021-11-09 17:44:38 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/RHBA-2021:4159