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 2091898

Summary: If veth peer is in netns, bringing it absent causes the connection of the gateway interface removed
Product: Red Hat Enterprise Linux 9 Reporter: Mingyu Shi <mshi>
Component: nisporAssignee: Fernando F. Mancera <ferferna>
Status: CLOSED ERRATA QA Contact: Mingyu Shi <mshi>
Severity: urgent Docs Contact:
Priority: urgent    
Version: 9.1CC: ferferna, fge, jiji, jishi, network-qe, sfaye, till
Target Milestone: rcKeywords: TestBlocker, Triaged
Target Release: ---Flags: pm-rhel: mirror+
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2022-11-15 10:31:11 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:    
Bug Blocks: 2091421    
Attachments:
Description Flags
NMtrace.log none

Description Mingyu Shi 2022-05-31 09:30:46 UTC
Created attachment 1885467 [details]
NMtrace.log

Description of problem:
If veth peer is in netns, bringing it absent causes the connection of the gateway interface removed.
This results in the networking disconnected.

Version-Release number of selected component (if applicable):
nmstate-2.1.1-0.alpha.20220519.437e4a9.el9.x86_64
NetworkManager-1.39.5-1.el9.x86_64

How reproducible:
100%

Steps to Reproduce:
ip netns add nm_bond
ip link add veth0_ns_p type veth peer name veth0_ns netns nm_bond
echo "
interfaces:
  - name: veth0_ns_p
    type: ethernet
    state: absent
" | nmstatectl apply


Actual results:
The NM connection of the default gateway is removed, the networking connection gets lost

Expected results:


Additional info:
In the attachment, the gateway interface is "ens3"

Comment 3 Fernando F. Mancera 2022-06-20 16:29:33 UTC
Bug found. We are setting the wrong peer when merging the information. I will check why is that happening on the code.

[2022-06-20T16:26:06Z DEBUG nmstate::ifaces::inter_ifaces] Merging interface Ethernet(EthernetInterface { base: BaseInterface { name: "veth0_ns_p", description: None, prop_list: ["name", "iface_type", "state"], iface_type: Ethernet, state: Ignore, mac_address: None, permanent_mac_address: None, mtu: None, ipv4: None, ipv6: None, controller: None, accept_all_mac_addresses: None, copy_mac_from: None, ovsdb: None, ieee8021x: None, lldp: None, ethtool: None, controller_type: None, up_priority: 0, routes: None, rules: None, _other: {} }, ethernet: None, veth: None }) into Ethernet(EthernetInterface { base: BaseInterface { name: "veth0_ns_p", description: None, prop_list: ["name", "state", "iface_type", "ipv4", "ipv6", "mac_address", "controller", "mtu", "accept_all_mac_addresses", "ethtool"], iface_type: Ethernet, state: Down, mac_address: Some("7A:B0:6E:E6:D2:66"), permanent_mac_address: None, mtu: Some(1500), ipv4: Some(InterfaceIpv4 { enabled: false, prop_list: ["enabled"], dhcp: None, dhcp_client_id: None, addresses: None, dns: None, auto_dns: None, auto_gateway: None, auto_routes: None, auto_table_id: None }), ipv6: Some(InterfaceIpv6 { enabled: false, prop_list: ["enabled"], dhcp: None, dhcp_duid: None, autoconf: None, addr_gen_mode: None, addresses: None, dns: None, auto_dns: None, auto_gateway: None, auto_routes: None, auto_table_id: None }), controller: None, accept_all_mac_addresses: Some(false), copy_mac_from: None, ovsdb: None, ieee8021x: None, lldp: None, ethtool: Some(EthtoolConfig { pause: None, feature: Some({"tx-gre-csum-segmentation": true, "tx-vlan-hw-insert": true, "highdma": true, "tx-tcp6-segmentation": true, "tx-checksum-sctp": true, "tx-gre-segmentation": true, "tx-ipxip4-segmentation": true, "tx-generic-segmentation": true, "tx-udp-segmentation": true, "tx-gso-list": true, "rx-udp-gro-forwarding": false, "tx-ipxip6-segmentation": true, "tx-checksum-ip-generic": true, "tx-tcp-mangleid-segmentation": true, "tx-nocache-copy": false, "rx-vlan-stag-hw-parse": true, "tx-sctp-segmentation": true, "rx-gro": false, "tx-tcp-segmentation": true, "rx-vlan-hw-parse": true, "tx-tcp-ecn-segmentation": true, "tx-udp_tnl-segmentation": true, "tx-udp_tnl-csum-segmentation": true, "tx-scatter-gather-fraglist": true, "rx-checksum": true, "tx-vlan-stag-hw-insert": true, "rx-gro-list": false}), coalesce: None, ring: None }), controller_type: None, up_priority: 0, routes: None, rules: None, _other: {} }, ethernet: None, veth: Some(VethConfig { peer: "eth0" }) })

Comment 4 Fernando F. Mancera 2022-06-21 08:55:30 UTC
The interface is wrongly reported by nispor. 

[root@e97919b1f297 nmstate-workspace]# npc veth0_ns_p
234: veth0_ns_p: <BROADCAST,MULTICAST> state down mtu 1500
    link veth peer eth0
    mac 9a:c2:b5:93:2b:31

This could affect RHEL 9.0 too.

Comment 8 Mingyu Shi 2022-07-13 05:49:38 UTC
Verified with versions:
nmstate-2.1.2-1.el9.x86_64
NetworkManager-1.39.8-1.el9.x86_64

Comment 10 errata-xmlrpc 2022-11-15 10:31:11 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 (nispor 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-2022:8170