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 1941450 - if veth peer is link up, fail to add/create a veth to vrf
Summary: if veth peer is link up, fail to add/create a veth to vrf
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 8
Classification: Red Hat
Component: nmstate
Version: 8.4
Hardware: Unspecified
OS: Unspecified
high
high
Target Milestone: rc
: ---
Assignee: Gris Ge
QA Contact: Mingyu Shi
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2021-03-22 07:09 UTC by Mingyu Shi
Modified: 2022-05-10 13:54 UTC (History)
5 users (show)

Fixed In Version:
Doc Type: No Doc Update
Doc Text:
Clone Of:
Environment:
Last Closed: 2022-05-10 13:34:46 UTC
Type: Bug
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Github nmstate nmstate pull 1776 0 None open rust: Add support of veth 2022-01-20 07:09:18 UTC
Red Hat Product Errata RHEA-2022:1772 0 None None None 2022-05-10 13:35:02 UTC

Description Mingyu Shi 2021-03-22 07:09:01 UTC
Description of problem:
For a newly created veth, if it is connected under 'nmcli dev', then will fail to add it to vrf.

Version-Release number of selected component (if applicable):
nmstate-1.0.2-5.el8.noarch
nispor-1.0.1-4.el8.x86_64
NetworkManager-1.30.0-2.el8.x86_64

How reproducible:
100%

Steps to Reproduce:
#notice that you need to remove and newly create veth0, otherwise it may not be reproducible
nmcli con del veth0
ip link del veth0
cat << EOF > vrf.yaml
---
interfaces:
- name: vrf0
  type: vrf
  state: up
  vrf:
    port:
    - veth0
    route-table-id: 1000
- name: veth0
  type: ethernet
  state: up
EOF
ip link add veth0 type veth peer name veth0_ep
ip link set veth0 up
ip link set veth0_ep up
nmcli device set veth0 managed yes
nmcli device set veth0_ep managed yes
echo "interfaces:
- name: veth0
  state: up
  type: ethernet" | nmstatectl set -
nmstatectl set vrf.yaml

Actual results:
Fail

Expected results:
No failure

Additional info:
# nmstatectl set vrf.yaml #fail
/usr/lib/python3.6/site-packages/nmstatectl/nmstatectl.py:325: UserWarning: Using 'set' is deprecated, use 'apply' instead.
  warnings.warn("Using 'set' is deprecated, use 'apply' instead.")
2021-03-22 14:59:39,322 root         DEBUG    Nmstate version: 1.0.2
2021-03-22 14:59:39,322 root         DEBUG    Applying desire state: {'interfaces': [{'name': 'vrf0', 'type': 'vrf', 'state': 'up', 'vrf': {'port': ['veth0'], 'route-table-id': 1000}}, {'name': 'veth0', 'type': 'ethernet', 'state': 'up'}]}
2021-03-22 14:59:39,390 root         DEBUG    NetworkManager version 1.30.0
2021-03-22 14:59:39,410 root         DEBUG    Async action: Retrieve applied config: ethernet eno5 started
2021-03-22 14:59:39,411 root         DEBUG    Async action: Retrieve applied config: ethernet veth0 started
2021-03-22 14:59:39,412 root         DEBUG    Async action: Retrieve applied config: ethernet eno5 finished
2021-03-22 14:59:39,413 root         DEBUG    Async action: Retrieve applied config: ethernet veth0 finished
2021-03-22 14:59:39,455 root         DEBUG    Interface lo is type unknown and will be ignored during the activation
2021-03-22 14:59:39,456 root         DEBUG    Async action: Create checkpoint started
2021-03-22 14:59:39,458 root         DEBUG    Checkpoint /org/freedesktop/NetworkManager/Checkpoint/87 created for all devices
2021-03-22 14:59:39,458 root         DEBUG    Async action: Create checkpoint finished
2021-03-22 14:59:39,460 root         DEBUG    Nispor: current network state {'ifaces': {'eno8': {'name': 'eno8', 'iface_type': 'ethernet', 'state': 'down', 'mtu': 1500, 'flags': ['broadcast', 'multicast', 'up'], 'mac_address': '48:df:37:be:42:4b', 'sriov': {'vfs': []}}, 'eno5': {'name': 'eno5', 'iface_type': 'ethernet', 'state': 'up', 'mtu': 1500, 'flags': ['broadcast', 'lower_up', 'multicast', 'running', 'up'], 'ipv4': {'addresses': [{'address': '10.73.89.30', 'prefix_len': 23, 'valid_lft': '39758sec', 'preferred_lft': '39758sec'}]}, 'ipv6': {'addresses': [{'address': '2620:52:0:4958:4adf:37ff:febe:4248', 'prefix_len': 64, 'valid_lft': '2591961sec', 'preferred_lft': '604761sec'}, {'address': 'fe80::4adf:37ff:febe:4248', 'prefix_len': 64, 'valid_lft': 'forever', 'preferred_lft': 'forever'}]}, 'mac_address': '48:df:37:be:42:48', 'sriov': {'vfs': []}}, 'veth0_ep': {'name': 'veth0_ep', 'iface_type': 'veth', 'state': 'up', 'mtu': 1500, 'flags': ['broadcast', 'lower_up', 'multicast', 'running', 'up'], 'ipv6': {'addresses': [{'address': 'fe80::486:57ff:fe76:8979', 'prefix_len': 64, 'valid_lft': 'forever', 'preferred_lft': 'forever'}]}, 'mac_address': '06:86:57:76:89:79', 'veth': {'peer': 'veth0'}}, 'lo': {'name': 'lo', 'iface_type': 'loopback', 'state': 'unknown', 'mtu': 65536, 'flags': ['loopback', 'lower_up', 'running', 'up'], 'ipv4': {'addresses': [{'address': '127.0.0.1', 'prefix_len': 8, 'valid_lft': 'forever', 'preferred_lft': 'forever'}]}, 'ipv6': {'addresses': [{'address': '::1', 'prefix_len': 128, 'valid_lft': 'forever', 'preferred_lft': 'forever'}]}, 'mac_address': '00:00:00:00:00:00'}, 'eno6': {'name': 'eno6', 'iface_type': 'ethernet', 'state': 'down', 'mtu': 1500, 'flags': ['broadcast', 'multicast', 'up'], 'mac_address': '48:df:37:be:42:49', 'sriov': {'vfs': []}}, 'ens1f0': {'name': 'ens1f0', 'iface_type': 'ethernet', 'state': 'up', 'mtu': 1500, 'flags': ['broadcast', 'lower_up', 'multicast', 'running', 'up'], 'mac_address': '40:a6:b7:0e:d5:60', 'sriov': {'vfs': []}}, 'enp1s0f4u4': {'name': 'enp1s0f4u4', 'iface_type': 'ethernet', 'state': 'unknown', 'mtu': 1500, 'flags': ['broadcast', 'lower_up', 'multicast', 'running', 'up'], 'mac_address': '62:54:05:db:21:1b'}, 'eno7': {'name': 'eno7', 'iface_type': 'ethernet', 'state': 'down', 'mtu': 1500, 'flags': ['broadcast', 'multicast', 'up'], 'mac_address': '48:df:37:be:42:4a', 'sriov': {'vfs': []}}, 'veth0': {'name': 'veth0', 'iface_type': 'veth', 'state': 'up', 'mtu': 1500, 'flags': ['broadcast', 'lower_up', 'multicast', 'running', 'up'], 'ipv6': {'addresses': [{'address': 'fe80::98d2:f6ff:fe30:4b8b', 'prefix_len': 64, 'valid_lft': 'forever', 'preferred_lft': 'forever'}]}, 'mac_address': '9a:d2:f6:30:4b:8b', 'veth': {'peer': 'veth0_ep'}}, 'ens1f1': {'name': 'ens1f1', 'iface_type': 'ethernet', 'state': 'up', 'mtu': 1500, 'flags': ['broadcast', 'lower_up', 'multicast', 'running', 'up'], 'mac_address': '40:a6:b7:0e:d5:61', 'sriov': {'vfs': []}}}, 'routes': [{'address_family': 'ipv6', 'tos': 0, 'table': 254, 'protocol': 'kernel', 'scope': 'universe', 'route_type': 'unicast', 'flags': 0, 'dst': '::1/128', 'oif': 'lo', 'cache_clntref': 0, 'cache_last_use': 0, 'cache_expires': 0, 'cache_error': 0, 'cache_used': 0, 'cache_id': 0, 'cache_ts': 0, 'cache_ts_age': 0, 'metric': 256, 'perf': 0}, {'address_family': 'ipv6', 'tos': 0, 'table': 254, 'protocol': 'ra', 'scope': 'universe', 'route_type': 'unicast', 'flags': 0, 'dst': '2620:52:0:4958::/64', 'oif': 'eno5', 'cache_clntref': 0, 'cache_last_use': 0, 'cache_expires': 0, 'cache_error': 0, 'cache_used': 0, 'cache_id': 0, 'cache_ts': 0, 'cache_ts_age': 0, 'metric': 100, 'perf': 0}, {'address_family': 'ipv6', 'tos': 0, 'table': 254, 'protocol': 'kernel', 'scope': 'universe', 'route_type': 'unicast', 'flags': 0, 'dst': 'fe80::/64', 'oif': 'eno5', 'cache_clntref': 0, 'cache_last_use': 0, 'cache_expires': 0, 'cache_error': 0, 'cache_used': 0, 'cache_id': 0, 'cache_ts': 0, 'cache_ts_age': 0, 'metric': 100, 'perf': 0}, {'address_family': 'ipv6', 'tos': 0, 'table': 254, 'protocol': 'kernel', 'scope': 'universe', 'route_type': 'unicast', 'flags': 0, 'dst': 'fe80::/64', 'oif': 'veth0', 'cache_clntref': 0, 'cache_last_use': 0, 'cache_expires': 0, 'cache_error': 0, 'cache_used': 0, 'cache_id': 0, 'cache_ts': 0, 'cache_ts_age': 0, 'metric': 101, 'perf': 0}, {'address_family': 'ipv6', 'tos': 0, 'table': 254, 'protocol': 'kernel', 'scope': 'universe', 'route_type': 'unicast', 'flags': 0, 'dst': 'fe80::/64', 'oif': 'veth0_ep', 'cache_clntref': 0, 'cache_last_use': 0, 'cache_expires': 0, 'cache_error': 0, 'cache_used': 0, 'cache_id': 0, 'cache_ts': 0, 'cache_ts_age': 0, 'metric': 256, 'perf': 0}, {'address_family': 'ipv6', 'tos': 0, 'table': 254, 'protocol': 'ra', 'scope': 'universe', 'route_type': 'unicast', 'flags': 0, 'oif': 'eno5', 'gateway': 'fe80::b233:a601:2cda:b0c1', 'cache_clntref': 0, 'cache_last_use': 0, 'cache_expires': 0, 'cache_error': 0, 'cache_used': 0, 'cache_id': 0, 'cache_ts': 0, 'cache_ts_age': 0, 'metric': 100, 'perf': 0}, {'address_family': 'ipv6', 'tos': 0, 'table': 255, 'protocol': 'kernel', 'scope': 'universe', 'route_type': 'local', 'flags': 0, 'dst': '::1/128', 'oif': 'lo', 'cache_clntref': 0, 'cache_last_use': 0, 'cache_expires': 0, 'cache_error': 0, 'cache_used': 0, 'cache_id': 0, 'cache_ts': 0, 'cache_ts_age': 0, 'metric': 0, 'perf': 0}, {'address_family': 'ipv6', 'tos': 0, 'table': 255, 'protocol': 'kernel', 'scope': 'universe', 'route_type': 'local', 'flags': 0, 'dst': '2620:52:0:4958:4adf:37ff:febe:4248/128', 'oif': 'eno5', 'cache_clntref': 0, 'cache_last_use': 0, 'cache_expires': 0, 'cache_error': 0, 'cache_used': 0, 'cache_id': 0, 'cache_ts': 0, 'cache_ts_age': 0, 'metric': 0, 'perf': 0}, {'address_family': 'ipv6', 'tos': 0, 'table': 255, 'protocol': 'kernel', 'scope': 'universe', 'route_type': 'local', 'flags': 0, 'dst': 'fe80::486:57ff:fe76:8979/128', 'oif': 'veth0_ep', 'cache_clntref': 0, 'cache_last_use': 0, 'cache_expires': 0, 'cache_error': 0, 'cache_used': 0, 'cache_id': 0, 'cache_ts': 0, 'cache_ts_age': 0, 'metric': 0, 'perf': 0}, {'address_family': 'ipv6', 'tos': 0, 'table': 255, 'protocol': 'kernel', 'scope': 'universe', 'route_type': 'local', 'flags': 0, 'dst': 'fe80::4adf:37ff:febe:4248/128', 'oif': 'eno5', 'cache_clntref': 0, 'cache_last_use': 0, 'cache_expires': 0, 'cache_error': 0, 'cache_used': 0, 'cache_id': 0, 'cache_ts': 0, 'cache_ts_age': 0, 'metric': 0, 'perf': 0}, {'address_family': 'ipv6', 'tos': 0, 'table': 255, 'protocol': 'kernel', 'scope': 'universe', 'route_type': 'local', 'flags': 0, 'dst': 'fe80::98d2:f6ff:fe30:4b8b/128', 'oif': 'veth0', 'cache_clntref': 0, 'cache_last_use': 0, 'cache_expires': 0, 'cache_error': 0, 'cache_used': 0, 'cache_id': 0, 'cache_ts': 0, 'cache_ts_age': 0, 'metric': 0, 'perf': 0}, {'address_family': 'ipv6', 'tos': 0, 'table': 255, 'protocol': 'boot', 'scope': 'universe', 'route_type': 'unicast', 'flags': 0, 'dst': 'ff00::/8', 'oif': 'eno5', 'cache_clntref': 0, 'cache_last_use': 0, 'cache_expires': 0, 'cache_error': 0, 'cache_used': 0, 'cache_id': 0, 'cache_ts': 0, 'cache_ts_age': 0, 'metric': 256, 'perf': 0}, {'address_family': 'ipv6', 'tos': 0, 'table': 255, 'protocol': 'boot', 'scope': 'universe', 'route_type': 'unicast', 'flags': 0, 'dst': 'ff00::/8', 'oif': 'enp1s0f4u4', 'cache_clntref': 0, 'cache_last_use': 0, 'cache_expires': 0, 'cache_error': 0, 'cache_used': 0, 'cache_id': 0, 'cache_ts': 0, 'cache_ts_age': 0, 'metric': 256, 'perf': 0}, {'address_family': 'ipv6', 'tos': 0, 'table': 255, 'protocol': 'boot', 'scope': 'universe', 'route_type': 'unicast', 'flags': 0, 'dst': 'ff00::/8', 'oif': 'ens1f0', 'cache_clntref': 0, 'cache_last_use': 0, 'cache_expires': 0, 'cache_error': 0, 'cache_used': 0, 'cache_id': 0, 'cache_ts': 0, 'cache_ts_age': 0, 'metric': 256, 'perf': 0}, {'address_family': 'ipv6', 'tos': 0, 'table': 255, 'protocol': 'boot', 'scope': 'universe', 'route_type': 'unicast', 'flags': 0, 'dst': 'ff00::/8', 'oif': 'ens1f1', 'cache_clntref': 0, 'cache_last_use': 0, 'cache_expires': 0, 'cache_error': 0, 'cache_used': 0, 'cache_id': 0, 'cache_ts': 0, 'cache_ts_age': 0, 'metric': 256, 'perf': 0}, {'address_family': 'ipv6', 'tos': 0, 'table': 255, 'protocol': 'boot', 'scope': 'universe', 'route_type': 'unicast', 'flags': 0, 'dst': 'ff00::/8', 'oif': 'veth0_ep', 'cache_clntref': 0, 'cache_last_use': 0, 'cache_expires': 0, 'cache_error': 0, 'cache_used': 0, 'cache_id': 0, 'cache_ts': 0, 'cache_ts_age': 0, 'metric': 256, 'perf': 0}, {'address_family': 'ipv6', 'tos': 0, 'table': 255, 'protocol': 'boot', 'scope': 'universe', 'route_type': 'unicast', 'flags': 0, 'dst': 'ff00::/8', 'oif': 'veth0', 'cache_clntref': 0, 'cache_last_use': 0, 'cache_expires': 0, 'cache_error': 0, 'cache_used': 0, 'cache_id': 0, 'cache_ts': 0, 'cache_ts_age': 0, 'metric': 256, 'perf': 0}, {'address_family': 'ipv4', 'tos': 0, 'table': 254, 'protocol': 'dhcp', 'scope': 'universe', 'route_type': 'unicast', 'flags': 0, 'oif': 'eno5', 'gateway': '10.73.89.254', 'metric': 100}, {'address_family': 'ipv4', 'tos': 0, 'table': 254, 'protocol': 'kernel', 'scope': 'link', 'route_type': 'unicast', 'flags': 0, 'dst': '10.73.88.0/23', 'oif': 'eno5', 'prefered_src': '10.73.89.30', 'metric': 100}, {'address_family': 'ipv4', 'tos': 0, 'table': 255, 'protocol': 'kernel', 'scope': 'link', 'route_type': 'broadcast', 'flags': 0, 'dst': '10.73.88.0/32', 'oif': 'eno5', 'prefered_src': '10.73.89.30'}, {'address_family': 'ipv4', 'tos': 0, 'table': 255, 'protocol': 'kernel', 'scope': 'host', 'route_type': 'local', 'flags': 0, 'dst': '10.73.89.30/32', 'oif': 'eno5', 'prefered_src': '10.73.89.30'}, {'address_family': 'ipv4', 'tos': 0, 'table': 255, 'protocol': 'kernel', 'scope': 'link', 'route_type': 'broadcast', 'flags': 0, 'dst': '10.73.89.255/32', 'oif': 'eno5', 'prefered_src': '10.73.89.30'}, {'address_family': 'ipv4', 'tos': 0, 'table': 255, 'protocol': 'kernel', 'scope': 'link', 'route_type': 'broadcast', 'flags': 0, 'dst': '127.0.0.0/32', 'oif': 'lo', 'prefered_src': '127.0.0.1'}, {'address_family': 'ipv4', 'tos': 0, 'table': 255, 'protocol': 'kernel', 'scope': 'host', 'route_type': 'local', 'flags': 0, 'dst': '127.0.0.0/8', 'oif': 'lo', 'prefered_src': '127.0.0.1'}, {'address_family': 'ipv4', 'tos': 0, 'table': 255, 'protocol': 'kernel', 'scope': 'host', 'route_type': 'local', 'flags': 0, 'dst': '127.0.0.1/32', 'oif': 'lo', 'prefered_src': '127.0.0.1'}, {'address_family': 'ipv4', 'tos': 0, 'table': 255, 'protocol': 'kernel', 'scope': 'link', 'route_type': 'broadcast', 'flags': 0, 'dst': '127.255.255.255/32', 'oif': 'lo', 'prefered_src': '127.0.0.1'}], 'rules': [{'action': 'table', 'address_family': 'ipv6', 'flags': 0, 'tos': 0, 'table': 255, 'protocol': 'kernel'}, {'action': 'table', 'address_family': 'ipv6', 'flags': 0, 'tos': 0, 'priority': 1000, 'protocol': 'kernel', 'l3mdev': True}, {'action': 'table', 'address_family': 'ipv6', 'flags': 0, 'tos': 0, 'table': 254, 'priority': 32766, 'protocol': 'kernel'}, {'action': 'table', 'address_family': 'ipv4', 'flags': 0, 'tos': 0, 'table': 255, 'protocol': 'kernel'}, {'action': 'table', 'address_family': 'ipv4', 'flags': 0, 'tos': 0, 'priority': 1000, 'protocol': 'kernel', 'l3mdev': True}, {'action': 'table', 'address_family': 'ipv4', 'flags': 0, 'tos': 0, 'table': 254, 'priority': 32766, 'protocol': 'kernel'}, {'action': 'table', 'address_family': 'ipv4', 'flags': 0, 'tos': 0, 'table': 253, 'priority': 32767, 'protocol': 'kernel'}]}
2021-03-22 14:59:39,460 root         DEBUG    Nispor: desired network state {'name': 'veth0', 'type': 'ethernet', 'state': 'up', 'ethernet': {'auto-negotiation': None, 'speed': None, 'duplex': None}, 'ipv4': {'enabled': False, 'dhcp': False, 'address': []}, 'ipv6': {'enabled': True, 'dhcp': False, 'autoconf': False, 'address': []}, 'lldp': {'enabled': False}, 'mac-address': '9A:D2:F6:30:4B:8B', 'mtu': 1500, 'veth': {'peer': 'veth0_ep'}, '_controller': 'vrf0', '_controller_type': 'vrf'}
2021-03-22 14:59:39,460 root         DEBUG    Nispor: desired network state {'name': 'vrf0', 'type': 'vrf', 'state': 'up', 'vrf': {'port': ['veth0'], 'route-table-id': 1000}, 'ipv6': {'enabled': False}}
2021-03-22 14:59:39,462 root         DEBUG    Async action: Update profile uuid:dbd51fea-d704-43e4-a563-38a19f2995bd iface:veth0 type:ethernet started
2021-03-22 14:59:39,463 root         DEBUG    Async action: Add profile: 1056c283-fb9b-49c1-928e-3a4e6e7fcefe, iface:vrf0, type:vrf started
2021-03-22 14:59:39,465 root         DEBUG    Async action: Update profile uuid:dbd51fea-d704-43e4-a563-38a19f2995bd iface:veth0 type:ethernet finished
2021-03-22 14:59:39,468 root         DEBUG    Async action: Add profile: 1056c283-fb9b-49c1-928e-3a4e6e7fcefe, iface:vrf0, type:vrf finished
2021-03-22 14:59:39,468 root         DEBUG    Async action: Activate profile uuid:1056c283-fb9b-49c1-928e-3a4e6e7fcefe iface:vrf0 type: vrf started
2021-03-22 14:59:39,477 root         DEBUG    Connection activation initiated: iface=vrf0 type=vrf con-state=<enum NM_ACTIVE_CONNECTION_STATE_ACTIVATING of type NM.ActiveConnectionState>
2021-03-22 14:59:39,485 root         DEBUG    Connection activation succeeded: iface=vrf0, type=vrf, con_state=<enum NM_ACTIVE_CONNECTION_STATE_ACTIVATED of type NM.ActiveConnectionState>, dev_state=<enum NM_DEVICE_STATE_ACTIVATED of type NM.DeviceState>, state_flags=<flags NM_ACTIVATION_STATE_FLAG_LAYER2_READY | NM_ACTIVATION_STATE_FLAG_IP4_READY | NM_ACTIVATION_STATE_FLAG_IP6_READY of type NM.ActivationStateFlags>
2021-03-22 14:59:39,485 root         DEBUG    Async action: Activate profile uuid:1056c283-fb9b-49c1-928e-3a4e6e7fcefe iface:vrf0 type: vrf finished
2021-03-22 14:59:39,486 root         DEBUG    Async action: Activate profile uuid:dbd51fea-d704-43e4-a563-38a19f2995bd iface:veth0 type: ethernet started
2021-03-22 14:59:39,488 root         DEBUG    Connection activation initiated: iface=veth0 type=ethernet con-state=<enum NM_ACTIVE_CONNECTION_STATE_ACTIVATING of type NM.ActiveConnectionState>
2021-03-22 14:59:39,491 root         DEBUG    Async action: Rollback to checkpoint /org/freedesktop/NetworkManager/Checkpoint/87 started
2021-03-22 14:59:39,496 root         DEBUG    Checkpoint /org/freedesktop/NetworkManager/Checkpoint/87 rollback executed
2021-03-22 14:59:39,496 root         DEBUG    Interface veth0_ep rollback succeeded
2021-03-22 14:59:39,496 root         DEBUG    Interface enp1s0f4u4 rollback succeeded
2021-03-22 14:59:39,496 root         DEBUG    Interface ens1f1 rollback succeeded
2021-03-22 14:59:39,496 root         DEBUG    Interface eno5 rollback succeeded
2021-03-22 14:59:39,496 root         DEBUG    Interface eno8 rollback succeeded
2021-03-22 14:59:39,496 root         DEBUG    Interface ens1f0 rollback succeeded
2021-03-22 14:59:39,496 root         DEBUG    Interface lo rollback succeeded
2021-03-22 14:59:39,496 root         DEBUG    Interface eno6 rollback succeeded
2021-03-22 14:59:39,496 root         DEBUG    Interface eno7 rollback succeeded
2021-03-22 14:59:39,496 root         DEBUG    Interface veth0 rollback succeeded
2021-03-22 14:59:39,496 root         DEBUG    Async action: Rollback to checkpoint /org/freedesktop/NetworkManager/Checkpoint/87 finished
Traceback (most recent call last):
  File "/usr/bin/nmstatectl", line 11, in <module>
    load_entry_point('nmstate==1.0.2', 'console_scripts', 'nmstatectl')()
  File "/usr/lib/python3.6/site-packages/nmstatectl/nmstatectl.py", line 73, in main
    return args.func(args)
  File "/usr/lib/python3.6/site-packages/nmstatectl/nmstatectl.py", line 326, in set
    return apply(args)
  File "/usr/lib/python3.6/site-packages/nmstatectl/nmstatectl.py", line 343, in apply
    args.save_to_disk,
  File "/usr/lib/python3.6/site-packages/nmstatectl/nmstatectl.py", line 407, in apply_state
    save_to_disk=save_to_disk,
  File "/usr/lib/python3.6/site-packages/libnmstate/netapplier.py", line 78, in apply
    _apply_ifaces_state(plugins, net_state, verify_change, save_to_disk)
  File "/usr/lib/python3.6/site-packages/libnmstate/netapplier.py", line 116, in _apply_ifaces_state
    plugin.apply_changes(net_state, save_to_disk)
  File "/usr/lib/python3.6/site-packages/libnmstate/nm/plugin.py", line 204, in apply_changes
    NmProfiles(self.context).apply_config(net_state, save_to_disk)
  File "/usr/lib/python3.6/site-packages/libnmstate/nm/profiles.py", line 89, in apply_config
    self._ctx.wait_all_finish()
  File "/usr/lib/python3.6/site-packages/libnmstate/nm/context.py", line 213, in wait_all_finish
    raise tmp_error
libnmstate.error.NmstateLibnmError: Activate profile uuid:dbd51fea-d704-43e4-a563-38a19f2995bd iface:veth0 type: ethernet failed: reason=<enum NM_ACTIVE_CONNECTION_STATE_REASON_DEVICE_DISCONNECTED of type NM.ActiveConnectionStateReason> <enum NM_DEVICE_STATE_REASON_IP_CONFIG_UNAVAILABLE of type NM.DeviceStateReason>

Comment 1 Mingyu Shi 2021-03-22 07:27:33 UTC
After run the reproducer for the 1st time, I tried to bring veth0 to 'state: absent', but didn't delete it from kernel, then run the rest of reproducer(without the first 2 lines about 'del' veth0 things), there would be failure anymore.
Until I run the whole reproducer again.

Comment 2 Mingyu Shi 2021-03-22 07:32:49 UTC
FYI, if remove this `echo` step from the reproducer:
echo "interfaces:
- name: veth0
  state: up
  type: ethernet" | nmstatectl set -
then it works well for the second applying:

nmcli con del veth0
ip link del veth0
cat << EOF > vrf.yaml
---
interfaces:
- name: vrf0
  type: vrf
  state: up
  vrf:
    port:
    - veth0
    route-table-id: 1000
- name: veth0
  type: ethernet
  state: up
EOF
ip link add veth0 type veth peer name veth0_ep
ip link set veth0 up
ip link set veth0_ep up
nmcli device set veth0 managed yes
nmcli device set veth0_ep managed yes
nmstatectl set vrf.yaml #fail
nmstatectl set vrf.yaml #pass

Comment 3 Mingyu Shi 2021-05-31 11:27:57 UTC
Update:

The key to reproduce is peer link up:
`ip link set veth0_ep up`

If remove this command from the reproducer, everything will be alright then.

Same in nmstate-1.1.0-0.1.el8.noarch

Comment 4 Fernando F. Mancera 2021-06-08 22:41:40 UTC
Hi Mingyu, thanks for reporting this. It is a real error and I was able to reproduce it.

Comment 10 Mingyu Shi 2022-02-08 14:27:07 UTC
Verified with versions:
nmstate-1.2.1-0.2.alpha2.el8.x86_64
nispor-1.2.3-1.el8.x86_64
NetworkManager-1.36.0-0.7.el8.x86_64

Both nmstate-python/rust work.

Comment 12 errata-xmlrpc 2022-05-10 13:34:46 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/RHEA-2022:1772


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