This bug has been migrated to another issue tracking site. It has been closed here and may no longer be being monitored.

If you would like to get updates for this issue, or to participate in it, you may do so at Red Hat Issue Tracker .
Bug 2210044 - Better error message for SRIOV failure on `min-rx-rate`
Summary: Better error message for SRIOV failure on `min-rx-rate`
Keywords:
Status: CLOSED MIGRATED
Alias: None
Product: Red Hat Enterprise Linux 9
Classification: Red Hat
Component: nmstate
Version: 9.2
Hardware: x86_64
OS: Linux
unspecified
low
Target Milestone: rc
: ---
Assignee: Gris Ge
QA Contact: Mingyu Shi
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2023-05-25 14:54 UTC by Gris Ge
Modified: 2023-08-17 13:09 UTC (History)
6 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2023-08-17 13:08:58 UTC
Type: Bug
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Issue Tracker NMT-580 0 None None None 2023-05-25 14:55:20 UTC
Red Hat Issue Tracker   RHEL-1452 0 None None None 2023-08-17 13:08:57 UTC
Red Hat Issue Tracker RHELPLAN-158212 0 None None None 2023-05-25 14:55:25 UTC

Description Gris Ge 2023-05-25 14:54:39 UTC
Description of problem:

When applying a desire state of nmstate setting SR-IOV `min-rx-rate` on some i40e card, user get failure like:

```
NmstateError: VerificationError: Verification failure: ens1f0.interface.ethernet.sr-iov.total-vfs desire '5', current '0'
```

This give user a wrong impression that nmstate/NetworkManager failure to activate the SR-IOV.

But the actual failure is:

```
kernel: i40e 0000:3b:00.0: Invalid min tx rate (100) (greater than 0) specified for VF 2.
```

When NetworkManager failed to set SR-IOV parameters, NM will disable SRIOV setting which lead to nmstate found SR-IOV been disabled during verification stage.

Version-Release number of selected component (if applicable):
nmstate-2.2.10-3.el9

How reproducible:
100%

Steps to Reproduce:
1. Apply this desire state on i40e card which does not support setting `min-tx-rate`:

```
interfaces:
- name: ens1f0
  type: ethernet
  description: Change QOS on VF0
  state: up
  ethernet:
    sr-iov:
      total-vfs: 5
      vfs:
      - id: 2
        min-tx-rate: 100
        max-tx-rate: 200
```


Actual results:

 VerificationError: Verification failure: ens1f0.interface.ethernet.sr-iov.total-vfs desire '5', current '0'


Expected results:

InvalidArgument: Invalid SR-IOV parameter for interface ens1f0: kernel: i40e 0000:3b:00.0: Invalid min tx rate (100) (greater than 0) specified for VF 2.

Additional info:

Comment 1 Gris Ge 2023-05-25 14:57:55 UTC
Design A: nmstate collect kernel logs

1. On verification error of SR-IOV, nmstate check `NmDeviceStateReason` to
   confirm whether it is a `NM_DEVICE_STATE_REASON_SRIOV_CONFIGURATION_FAILED`.
2. Parse kernel dmesg and collect all warning+ message for failed
   interface(matched PCI address in this case)
3. Show above kernel logs as nmstate log along with `InvalidArgument` error.


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