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 1930019 - [SR-IOV] nmstate shouldn't try to activate VF profiles
Summary: [SR-IOV] nmstate shouldn't try to activate VF profiles
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 8
Classification: Red Hat
Component: nmstate
Version: 8.3
Hardware: x86_64
OS: Linux
unspecified
high
Target Milestone: rc
: ---
Assignee: Fernando F. Mancera
QA Contact: Mingyu Shi
URL:
Whiteboard:
Depends On:
Blocks: 1931290
TreeView+ depends on / blocked
 
Reported: 2021-02-18 08:16 UTC by Michael Burman
Modified: 2021-05-18 15:18 UTC (History)
8 users (show)

Fixed In Version: nmstate-1.0.2-1.el8
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
: 1931290 (view as bug list)
Environment:
Last Closed: 2021-05-18 15:18:22 UTC
Type: Bug
Target Upstream Version:
Embargoed:
pm-rhel: mirror+


Attachments (Terms of Use)
tested.log (106.14 KB, text/plain)
2021-02-18 15:36 UTC, Mingyu Shi
no flags Details


Links
System ID Private Priority Status Summary Last Updated
Github nmstate nmstate pull 1520 0 None open SRIOV: Remove VF interface when total-vfs decrease 2021-02-18 09:57:56 UTC
Github nmstate nmstate pull 1524 0 None open [nmstate-0.3] SR-IOV: Do not create VF profiles automatically 2021-02-21 21:55:11 UTC

Description Michael Burman 2021-02-18 08:16:36 UTC
Description of problem:
[SR-IOV] nmstate shouldn't try to activate VF profiles

We have noticed that nmstate trying to activate the VF profiles, but it shouldn't.
After enabling the VF, the VF shouldn't seen in the output of nmcli c s at all.
It should be seen only as disconnected under nmcli dev status.
Because of that, the VFs profiles remain as white connection under nmcli c s:
eno2v0     8531fee8-fa1f-4e47-a440-ce9de4215adc  ethernet  --        
eno2v1     cad3ee46-45a4-4210-b8e7-bc55a79bab35  ethernet  --

After we disable the VFs on the host, they still remain there and cause error next time trying to enable Vfs on this mother PF. 
There shouldn't be any ethernet profile connection activated for the VF and the Vfs profiles shouldn't be see under nmcli c s, only as disconnected connection under nmcli dev status

MainProcess|jsonrpc/2::ERROR::2021-02-18 09:38:05,320::supervdsm_server::98::SuperVdsm.ServerCallback::(wrapper) Error in change_numvfs

libnmstate.error.NmstateVerificationError: 
desired
=======
---
name: eno2v0
type: ethernet
state: down

current
=======
---
name: eno2v0
type: ethernet
state: up
ethernet:
  auto-negotiation: false
  duplex: full
  speed: 10000
ipv4:
  enabled: false
ipv6:
  enabled: false
lldp:
  enabled: false
mac-address: xx:xx:xx:xx:xx:xx
mtu: 1500

difference
==========
--- desired
+++ current
@@ -1,4 +1,16 @@
 ---
 name: eno2v0
 type: ethernet
-state: down
+state: up
+ethernet:
+  auto-negotiation: false
+  duplex: full
+  speed: 10000
+ipv4:
+  enabled: false
+ipv6:
+  enabled: false
+lldp:
+  enabled: false
+mac-address: xx:xx:xx:xx:xx:xx
+mtu: 1500

Version-Release number of selected component (if applicable):
nmstate-0.3.4-25.el8_3.noarch

How reproducible:
100%

Steps to Reproduce:
1. Enable VF via RHV

Actual results:
nmstate thinks the VF profile should be activated and there is a connection created under nmcli c s

Expected results:
nmstate shouldn't try to activate VF profile, it shouldn't appear under nmcli c s at all. Only under nmcli dev status as disconnected red profile as was always.

Comment 2 Gris Ge 2021-02-18 09:57:57 UTC
Patch sent to upstream https://github.com/nmstate/nmstate/pull/1520 for review.


The patch will instruct nmstate to remove the deleted VFs' profile when total_vfs decreased.

Comment 3 Martin Perina 2021-02-18 10:19:04 UTC
We really need that fixed in RHEL 8.3.z

Comment 4 Mingyu Shi 2021-02-18 15:36:22 UTC
Created attachment 1757832 [details]
tested.log

Tested with versions:
nmstate-1.0.2-0.20210218100459029637.pr1520.23.g0df0f6e.el8.noarch
nispor-1.0.1-3.el8.x86_64
NetworkManager-1.30.0-0.10.el8.x86_64

Comment 5 Gris Ge 2021-02-18 22:07:08 UTC
Upstream merged.

Comment 10 Fernando F. Mancera 2021-02-21 21:55:12 UTC
I've created a new fix for nmstate-0.3: https://github.com/nmstate/nmstate/pull/1524

Comment 15 Mingyu Shi 2021-02-22 09:38:17 UTC
Verified with versions:
nmstate-1.0.2-1.el8.noarch
nispor-1.0.1-3.el8.x86_64
NetworkManager-1.30.0-0.10.el8.x86_64

Notice the fix in nmstate-1.0 is to remove corresponding VF profiles when reduce number of `total-vfs`.
Another issue, creating VFs automatically creates there NM profiles, doesn't exist on RHEL8.4(nmstate-1.0), check the cloned for 8.3.0.z: https://bugzilla.redhat.com/show_bug.cgi?id=1931290

Comment 17 errata-xmlrpc 2021-05-18 15:18:22 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-2021:1748


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