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 2212741 - network system role deletes gateway information
Summary: network system role deletes gateway information
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 9
Classification: Red Hat
Component: nmstate
Version: 9.2
Hardware: Unspecified
OS: Unspecified
unspecified
high
Target Milestone: rc
: 9.3
Assignee: Gris Ge
QA Contact: Mingyu Shi
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2023-06-06 08:15 UTC by Marko Myllynen
Modified: 2023-11-07 09:02 UTC (History)
11 users (show)

Fixed In Version: nmstate-2.2.14-1.el9
Doc Type: No Doc Update
Doc Text:
Clone Of:
Environment:
Last Closed: 2023-11-07 08:24:03 UTC
Type: Bug
Target Upstream Version:
Embargoed:
pm-rhel: mirror+


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Github nmstate nmstate pull 2387 0 None open nm: Preserve gateway when not desired 2023-07-17 06:52:05 UTC
Red Hat Issue Tracker NMT-599 0 None None None 2023-06-06 18:55:08 UTC
Red Hat Issue Tracker RHELPLAN-159070 0 None None None 2023-06-06 13:55:13 UTC
Red Hat Product Errata RHBA-2023:6323 0 None None None 2023-11-07 08:24:18 UTC

Description Marko Myllynen 2023-06-06 08:15:39 UTC
Description of problem:
I have two freshly installed test VMs, all defaults Server Minimal install of RHEL 8.8 and RHEL 9.2, then all updates applied and VMs rebooted.

This is their network configuration:

# grep -v ^# /etc/NetworkManager/NetworkManager.conf | grep -v ^$
[main]
plugins=keyfile
[logging]
# cat /etc/NetworkManager/system-connections/enp1s0.nmconnection
[connection]
id=enp1s0
uuid=ea4d1672-de2e-3b87-a234-5f861e452d77
type=ethernet
interface-name=enp1s0

[ethernet]

[ipv4]
address1=192.168.122.221/24,192.168.122.1
dns=192.168.1.1;
dns-options=edns0;no-aaaa;trust-ad;
dns-search=example.com;
method=manual

[ipv6]
method=disabled

[proxy]

Running a playbook on a RHEL 9 control host with:

  vars:
    network_state:
      dns-resolver:
        config:
          server:
            - 192.168.1.1
            - 127.0.0.1
          search:
            - example.com
            - domain.name
  roles:
    - redhat.rhel_system_roles.network

I see that configuration was changed for both managed VMs and on RHEL 8 the result looks like this:

[ipv4]
address1=192.168.122.170/24
dhcp-client-id=mac
dns=192.168.1.1;127.0.0.1;
dns-options=edns0;no-aaaa;trust-ad;
dns-priority=40
dns-search=example.com;domain.name;
method=manual
route1=0.0.0.0/0,192.168.122.1,100
route1_options=table=254

However on RHEL 9 the result is:

[ipv4]
address1=192.168.122.221/24
dns=192.168.1.1;127.0.0.1;
dns-options=edns0;no-aaaa;trust-ad;
dns-priority=40
dns-search=example.com;domain.name;
method=manual

Version-Release number of selected component (if applicable):
ansible-core-2.14.2-4.el9.x86_64
rhel-system-roles-1.21.1-1.el9_2.noarch

Comment 1 Wen Liang 2023-06-06 18:50:10 UTC
Thanks for reporting this, this is a valid report, I already reproduced it in RHEL 9.2 (lost the gateway information), since the `network_state` was using the nmstate as the backend, I'd like to change the component into nmstate.

Comment 4 Gris Ge 2023-07-11 13:28:34 UTC
The root cause is previous state is not generated by nmstate and using old setting method on gateway:

```
address1=192.168.122.221/24,192.168.122.1
```

we are expecting gateway been set as

```
route1=0.0.0.0/0,192.168.122.1,100
```

Anyway, you will get a fix soon.

Comment 5 Gris Ge 2023-07-17 06:52:05 UTC
Patch sent to upstream: https://github.com/nmstate/nmstate/pull/2387

If you need fix been backported to RHEL 9.2, please let me know.

Comment 10 Mingyu Shi 2023-08-23 10:41:50 UTC
Verified with:
nmstate-2.2.14-1.el9.x86_64
nispor-1.2.12-1.el9.x86_64
NetworkManager-1.44.0-1.el9.x86_64

Comment 12 errata-xmlrpc 2023-11-07 08:24:03 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 (nmstate 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-2023:6323


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