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 1818750 - Get failure when mac of vf contains upper case
Summary: Get failure when mac of vf contains upper case
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 8
Classification: Red Hat
Component: nmstate
Version: 8.2
Hardware: Unspecified
OS: Unspecified
medium
medium
Target Milestone: rc
: 8.0
Assignee: Fernando F. Mancera
QA Contact: Mingyu Shi
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2020-03-30 09:30 UTC by Mingyu Shi
Modified: 2020-11-04 03:10 UTC (History)
6 users (show)

Fixed In Version: nmstate-0.3.2-1.el8
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2020-11-04 03:08:25 UTC
Type: Bug
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Github nmstate nmstate pull 1029 0 None closed sriov: normalize vf mac address before verification 2020-12-23 10:22:45 UTC
Red Hat Product Errata RHBA-2020:4696 0 None None None 2020-11-04 03:08:42 UTC

Description Mingyu Shi 2020-03-30 09:30:06 UTC
Description of problem:
Now for ovs interface it will return lower case with success. But for a vf, it will get failure when it's mac contains upper case.

Version-Release number of selected component (if applicable):
nmstate-0.2.6-6.el8.noarch
NetworkManager-1.22.8-4.el8.x86_64
DISTRO=RHEL-8.2.0-20200323.n.1
Linux dell-per740-30.rhts.eng.pek2.redhat.com 4.18.0-191.el8.x86_64 #1 SMP Fri Mar 20 19:26:53 UTC 2020 x86_64 x86_64 x86_64 GNU/Linux

How reproducible:
100%

Steps to Reproduce:
(It requires a NIC that supports sr-iov)
[17:11:42@dell-per740-30 ~/sriov]0# cat sr-iov.yaml 
---
interfaces:
- name: ens3f1
  state: up
  ethernet:
    sr-iov:
      total-vfs: 1
      vfs:
      - id: 0
        mac-address: D4:ee:00:25:42:5a
        max-tx-rate: 25000
        min-tx-rate: 1
        spoof-check: true
        trust: true
[17:11:46@dell-per740-30 ~/sriov]0# nmstatectl set sr-iov.yaml 
2020-03-30 17:11:50,658 root         DEBUG    Checkpoint /org/freedesktop/NetworkManager/Checkpoint/110 created for all devices: 60
2020-03-30 17:11:50,659 root         DEBUG    Adding new interfaces: []
2020-03-30 17:11:50,661 root         DEBUG    Editing interfaces: ['ens3f1']
2020-03-30 17:11:50,668 root         DEBUG    Executing NM action: func=commit_changes_async
2020-03-30 17:11:50,676 root         DEBUG    Connection update succeeded: dev=ens3f1
2020-03-30 17:11:50,676 root         DEBUG    Executing NM action: func=_safe_modify_async
2020-03-30 17:11:50,680 root         DEBUG    Device reapply failed on ens3f1: error=nm-device-error-quark: Can't reapply any changes to 'sriov' setting (3)
Fallback to device activation
2020-03-30 17:11:50,687 root         DEBUG    Connection activation initiated: dev=ens3f1, con-state=<enum NM_ACTIVE_CONNECTION_STATE_ACTIVATING of type NM.ActiveConnectionState>
2020-03-30 17:11:51,664 root         DEBUG    Connection activation succeeded: dev=ens3f1, 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>
2020-03-30 17:11:52,166 root         DEBUG    NM action queue exhausted, quiting mainloop
2020-03-30 17:11:52,245 root         DEBUG    Checkpoint /org/freedesktop/NetworkManager/Checkpoint/110 rollback executed: dbus.Dictionary({dbus.String('/org/freedesktop/NetworkManager/Devices/1'): dbus.UInt32(0), dbus.String('/org/freedesktop/NetworkManager/Devices/5'): dbus.UInt32(0), dbus.String('/org/freedesktop/NetworkManager/Devices/1012'): dbus.UInt32(0), dbus.String('/org/freedesktop/NetworkManager/Devices/1011'): dbus.UInt32(0), dbus.String('/org/freedesktop/NetworkManager/Devices/6'): dbus.UInt32(0), dbus.String('/org/freedesktop/NetworkManager/Devices/2'): dbus.UInt32(0), dbus.String('/org/freedesktop/NetworkManager/Devices/1015'): dbus.UInt32(0), dbus.String('/org/freedesktop/NetworkManager/Devices/1016'): dbus.UInt32(0), dbus.String('/org/freedesktop/NetworkManager/Devices/7'): dbus.UInt32(0), dbus.String('/org/freedesktop/NetworkManager/Devices/3'): dbus.UInt32(0), dbus.String('/org/freedesktop/NetworkManager/Devices/1014'): dbus.UInt32(0), dbus.String('/org/freedesktop/NetworkManager/Devices/1013'): dbus.UInt32(0), dbus.String('/org/freedesktop/NetworkManager/Devices/4'): dbus.UInt32(0), dbus.String('/org/freedesktop/NetworkManager/Devices/1007'): dbus.UInt32(0)}, signature=dbus.Signature('su'))
Traceback (most recent call last):
  File "/usr/bin/nmstatectl", line 11, in <module>
    load_entry_point('nmstate==0.2.6', 'console_scripts', 'nmstatectl')()
  File "/usr/lib/python3.6/site-packages/nmstatectl/nmstatectl.py", line 59, in main
    return args.func(args)
  File "/usr/lib/python3.6/site-packages/nmstatectl/nmstatectl.py", line 217, in apply
    statedata, args.verify, args.commit, args.timeout
  File "/usr/lib/python3.6/site-packages/nmstatectl/nmstatectl.py", line 241, in apply_state
    rollback_timeout=timeout,
  File "/usr/lib/python3.6/site-packages/libnmstate/deprecation.py", line 40, in wrapper
    return func(*args, **kwargs)
  File "/usr/lib/python3.6/site-packages/libnmstate/nm/nmclient.py", line 98, in wrapped
    ret = func(*args, **kwargs)
  File "/usr/lib/python3.6/site-packages/libnmstate/netapplier.py", line 70, in apply
    state.State(desired_state), verify_change, commit, rollback_timeout
  File "/usr/lib/python3.6/site-packages/libnmstate/netapplier.py", line 163, in _apply_ifaces_state
    _verify_change(desired_state)
  File "/usr/lib/python3.6/site-packages/libnmstate/netapplier.py", line 207, in _verify_change
    desired_state.verify_interfaces(current_state)
  File "/usr/lib/python3.6/site-packages/libnmstate/state.py", line 330, in verify_interfaces
    self._assert_interfaces_equal(other_state)
  File "/usr/lib/python3.6/site-packages/libnmstate/state.py", line 732, in _assert_interfaces_equal
    current_state.interfaces[ifname],
libnmstate.error.NmstateVerificationError: 
desired
=======
---
name: ens3f1
type: ethernet
state: up
ethernet:
  sr-iov:
    total-vfs: 1
    vfs:
    - id: 0
      mac-address: D4:ee:00:25:42:5a
      max-tx-rate: 25000
      min-tx-rate: 1
      spoof-check: true
      trust: true
ipv4:
  enabled: false
ipv6:
  enabled: false
mac-address: B8:59:9F:D2:1E:0B
mtu: 1500

current
=======
---
name: ens3f1
type: ethernet
state: up
ethernet:
  auto-negotiation: true
  duplex: full
  speed: 25000
  sr-iov:
    total-vfs: 1
    vfs:
    - id: 0
      mac-address: d4:ee:00:25:42:5a
      max-tx-rate: 25000
      min-tx-rate: 1
      spoof-check: true
      trust: true
ipv4:
  enabled: false
ipv6:
  enabled: false
mac-address: B8:59:9F:D2:1E:0B
mtu: 1500

difference
==========
--- desired
+++ current
@@ -3,11 +3,14 @@
 type: ethernet
 state: up
 ethernet:
+  auto-negotiation: true
+  duplex: full
+  speed: 25000
   sr-iov:
     total-vfs: 1
     vfs:
     - id: 0
-      mac-address: D4:ee:00:25:42:5a
+      mac-address: d4:ee:00:25:42:5a
       max-tx-rate: 25000
       min-tx-rate: 1
       spoof-check: true

Actual results:
Fail

Expected results:
No failure

Additional info:
Change all the upper cases to lower cases, it applies successfully

Comment 1 Fernando F. Mancera 2020-04-23 12:31:44 UTC
Here is the upstream pull request. https://github.com/nmstate/nmstate/pull/1029

Comment 4 Mingyu Shi 2020-07-17 10:24:42 UTC
Verified with versions:
nmstate-0.3.3-2.el8.noarch
NetworkManager-1.26.0-1.el8.x86_64
DISTRO=RHEL-8.3.0-20200717.n.0                                                       
Linux dell-per740-06.rhts.eng.pek2.redhat.com 4.18.0-226.el8.x86_64 #1 SMP Wed Jul 15 07:40:39 UTC 2020 x86_64 x86_64 x86_64 GNU/Linux

nmstate will convert them to upper cases:
[18:08:25@dell-per740-06 ~]0# nmstatectl set sriov.yaml 
2020-07-17 18:08:30,866 root         DEBUG    Async action: Create checkpoint started
2020-07-17 18:08:30,872 root         DEBUG    Checkpoint None created for all devices
2020-07-17 18:08:30,872 root         DEBUG    Async action: Create checkpoint finished
2020-07-17 18:08:30,875 root         DEBUG    Async action: Delete profile: id:ens1f0np0, uuid:f32b46cc-0966-4d23-92d3-06392bdf250a started
2020-07-17 18:08:30,876 root         DEBUG    Async action: Add profile: ens1f0np0 started
2020-07-17 18:08:30,879 root         DEBUG    Async action: Delete profile: id:ens1f0np0, uuid:f32b46cc-0966-4d23-92d3-06392bdf250a finished
2020-07-17 18:08:30,886 root         DEBUG    Async action: Add profile: ens1f0np0 finished
2020-07-17 18:08:30,887 root         DEBUG    Async action: Activate profile: ens1f0np0 started
2020-07-17 18:08:30,890 root         DEBUG    Connection activation initiated: dev=ens1f0np0, con-state=<enum NM_ACTIVE_CONNECTION_STATE_ACTIVATING of type NM.ActiveConnectionState>
2020-07-17 18:08:31,933 root         DEBUG    Connection activation succeeded: dev=ens1f0np0, 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>
2020-07-17 18:08:31,934 root         DEBUG    Async action: Activate profile: ens1f0np0 finished
2020-07-17 18:08:31,976 root         DEBUG    Async action: Destroy checkpoint /org/freedesktop/NetworkManager/Checkpoint/7 started
2020-07-17 18:08:31,981 root         DEBUG    Checkpoint /org/freedesktop/NetworkManager/Checkpoint/7 destroyed
2020-07-17 18:08:31,981 root         DEBUG    Async action: Destroy checkpoint /org/freedesktop/NetworkManager/Checkpoint/7 finished
Desired state applied: 
---
interfaces:
- name: ens1f0np0
  state: up
  ethernet:
    sr-iov:
      total-vfs: 1
      vfs:
      - id: 0
        mac-address: d4:Ee:00:25:42:5A
        max-tx-rate: 1000
        min-tx-rate: 1
        spoof-check: true
        trust: true
[18:08:32@dell-per740-06 ~]0# nmstatectl show ens1f0np0
---
dns-resolver:
  config:
    search: []
    server: []
  running:
    search:
    - rhts.eng.pek2.redhat.com
    server:
    - 10.73.2.107
    - 10.73.2.108
    - 10.66.127.10
route-rules:
  config: []
routes:
  config: []
  running: []
interfaces:
- name: ens1f0np0
  type: ethernet
  state: up
  ethernet:
    auto-negotiation: true
    duplex: full
    speed: 100000
    sr-iov:
      total-vfs: 1
      vfs:
      - id: 0
        mac-address: D4:EE:00:25:42:5A
        max-tx-rate: 1000
        min-tx-rate: 1
        spoof-check: true
        trust: true
  ipv4:
    enabled: false
    dhcp: false
  ipv6:
    enabled: false
    autoconf: false
    dhcp: false
  lldp:
    enabled: false
  mac-address: 7C:FE:90:1C:36:74
  mtu: 1500
[18:08:40@dell-per740-06 ~]0# ip link
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN mode DEFAULT group default qlen 1000
    link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
2: eno1: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc mq state UP mode DEFAULT group default qlen 1000
    link/ether 20:04:0f:eb:af:98 brd ff:ff:ff:ff:ff:ff
3: eno2: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc mq state DOWN mode DEFAULT group default qlen 1000
    link/ether 20:04:0f:eb:af:99 brd ff:ff:ff:ff:ff:ff
4: eno3: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc mq state DOWN mode DEFAULT group default qlen 1000
    link/ether 20:04:0f:eb:af:9a brd ff:ff:ff:ff:ff:ff
5: eno4: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc mq state DOWN mode DEFAULT group default qlen 1000
    link/ether 20:04:0f:eb:af:9b brd ff:ff:ff:ff:ff:ff
6: ens1f0np0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc mq state UP mode DEFAULT group default qlen 1000
    link/ether 7c:fe:90:1c:36:74 brd ff:ff:ff:ff:ff:ff
    vf 0     link/ether d4:ee:00:25:42:5a brd ff:ff:ff:ff:ff:ff, tx rate 1000 (Mbps), max_tx_rate 1000Mbps, min_tx_rate 1Mbps, spoof checking on, link-state auto, trust on, query_rss off
7: ens1f1np1: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc mq state UP mode DEFAULT group default qlen 1000
    link/ether 7c:fe:90:1c:36:75 brd ff:ff:ff:ff:ff:ff
24: ens1f0np0v0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc mq state UP mode DEFAULT group default qlen 1000
    link/ether de:8c:49:a9:75:47 brd ff:ff:ff:ff:ff:ff

Comment 7 errata-xmlrpc 2020-11-04 03:08:25 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-2020:4696


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