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 2115884 - fix IPRouteUtils.get_route_tables_mapping() to accept any whitespace sequence
Summary: fix IPRouteUtils.get_route_tables_mapping() to accept any whitespace sequence
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 8
Classification: Red Hat
Component: rhel-system-roles
Version: 8.7
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: rc
: 8.7
Assignee: Rich Megginson
QA Contact: Zhiqian Guan
Mayur Patil
URL:
Whiteboard: role:network
Depends On:
Blocks: 2115886 2115887
TreeView+ depends on / blocked
 
Reported: 2022-08-05 15:28 UTC by Wen Liang
Modified: 2023-02-09 06:13 UTC (History)
7 users (show)

Fixed In Version: rhel-system-roles-1.20.0-1.el8
Doc Type: Bug Fix
Doc Text:
.The `IPRouteUtils.get_route_tables_mapping()` function now accepts any whitespace sequence Previously, a parser for the `iproute2` routing table database, such as `/etc/iproute2/rt_tables`, asserted that entries in the file were of the form `254 main` and only a single space character separated the numeric id and the name. Consequently, the parser failed to cache all the mappings between the route table name and table id.Therefore the user could not add a static route into the route table by defining the route table name. With this update, the parser accepts any whitespace sequence in between the table ID and table name. As a result, as the parser caches all the mapping between the route table name and table ID, users can add a static route into the route table by defining the route table name.
Clone Of:
: 2115886 2115887 (view as bug list)
Environment:
Last Closed: 2022-11-08 09:41:52 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 508 0 None Merged argument_validator: fix IPRouteUtils.get_route_tables_mapping() to accept any whitespace sequence 2022-08-05 15:30:37 UTC
Red Hat Issue Tracker RHELPLAN-130404 0 None None None 2023-02-09 06:13:00 UTC
Red Hat Product Errata RHEA-2022:7568 0 None None None 2022-11-08 09:42:09 UTC

Description Wen Liang 2022-08-05 15:28:33 UTC
Description of problem:
The parser for the iproute2 routing table database (/etc/iproute2/rt_tables etc.) in module_utils/network_lsr/argument_validator.py:IPRouteUtils is too strict. It asserts that entries/lines in the file are of the form `254 main` where the numeric id and the name must be separated by a single space character only. However, according to the what iproute2 does, any whitespace sequence in between the table id and table name should be considered as valid and should be accepted by the route table parser.

Comment 4 Jon Trossbach 2022-08-12 17:12:30 UTC
What playbooks need to be tested for this bug? And have they already been run in the CI system? If so where are the results?

Comment 5 Rich Megginson 2022-08-12 17:22:09 UTC
(In reply to Jon Trossbach from comment #4)
> What playbooks need to be tested for this bug? And have they already been
> run in the CI system? If so where are the results?

Good questions for Thomas from whom I requested the info in https://bugzilla.redhat.com/show_bug.cgi?id=2115886

Comment 7 Rich Megginson 2022-08-15 14:39:07 UTC
Test was added in PR - https://github.com/linux-system-roles/network/pull/508/files#diff-b06f1e1bf991f123e64cf9dde6dcf9574bb279a720609a570e8af27cc2d9a359
Test coverage is in tests_unit.yml

Comment 8 Zhiqian Guan 2022-08-16 08:21:50 UTC
[root@netqe2 Upstream-testsuite]# uname -r
4.18.0-416.el8.x86_64

ansible-2.9.27-1
:: [ 03:46:39 ] :: [  BEGIN   ] :: Test tests_unit.yml with ANSIBLE-2.9 against RHEL_6_10_GA
:: [ 03:47:14 ] :: [   PASS   ] :: Test tests_unit.yml (Assert: expected 0, got 0)
:: [ 03:50:21 ] :: [  BEGIN   ] :: Test tests_unit.yml with ANSIBLE-2.9 against RHEL_7_9_GA
:: [ 03:50:55 ] :: [   PASS   ] :: Test tests_unit.yml (Assert: expected 0, got 0)
:: [ 03:53:44 ] :: [  BEGIN   ] :: Test tests_unit.yml with ANSIBLE-2.9 against RHEL_8_6_0_GA
:: [ 03:54:33 ] :: [   PASS   ] :: Test tests_unit.yml (Assert: expected 0, got 0)
:: [ 03:56:44 ] :: [  BEGIN   ] :: Test tests_unit.yml with ANSIBLE-2.9 against RHEL_9_0_0_GA
:: [ 03:57:15 ] :: [   PASS   ] :: Test tests_unit.yml (Assert: expected 0, got 0)
:: [ 03:59:36 ] :: [  BEGIN   ] :: Test tests_unit.yml with ANSIBLE-2.9 against RHEL_8_7_TESTING
:: [ 04:00:30 ] :: [   PASS   ] :: Test tests_unit.yml (Assert: expected 0, got 0)
:: [ 04:02:26 ] :: [  BEGIN   ] :: Test tests_unit.yml with ANSIBLE-2.9 against RHEL_9_1_TESTING
:: [ 04:02:57 ] :: [   PASS   ] :: Test tests_unit.yml (Assert: expected 0, got 0)

ansible-core-2.13.2-1
:: [ 04:08:49 ] :: [  BEGIN   ] :: Test tests_unit.yml with ANSIBLE-2 against RHEL_7_9_GA
:: [ 04:09:24 ] :: [   PASS   ] :: Test tests_unit.yml (Assert: expected 0, got 0)
:: [ 04:11:19 ] :: [  BEGIN   ] :: Test tests_unit.yml with ANSIBLE-2 against RHEL_8_6_0_GA
:: [ 04:12:09 ] :: [   PASS   ] :: Test tests_unit.yml (Assert: expected 0, got 0)
:: [ 04:13:28 ] :: [  BEGIN   ] :: Test tests_unit.yml with ANSIBLE-2 against RHEL_9_0_0_GA
:: [ 04:13:59 ] :: [   PASS   ] :: Test tests_unit.yml (Assert: expected 0, got 0)
:: [ 04:16:09 ] :: [  BEGIN   ] :: Test tests_unit.yml with ANSIBLE-2 against RHEL_8_7_TESTING
:: [ 04:17:00 ] :: [   PASS   ] :: Test tests_unit.yml (Assert: expected 0, got 0)
:: [ 04:18:42 ] :: [  BEGIN   ] :: Test tests_unit.yml with ANSIBLE-2 against RHEL_9_1_TESTING
:: [ 04:19:14 ] :: [   PASS   ] :: Test tests_unit.yml (Assert: expected 0, got 0)

Comment 9 Zhiqian Guan 2022-08-16 08:23:46 UTC
Forget to mention, I was using rhel-system-roles-1.20.0-1.el8.noarch

Comment 14 errata-xmlrpc 2022-11-08 09:41:52 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-2022:7568


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