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 1938675 - cannot reduce amounts of VF if VF instances were activated
Summary: cannot reduce amounts of VF if VF instances were activated
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 8
Classification: Red Hat
Component: nmstate
Version: 8.4
Hardware: Unspecified
OS: Unspecified
low
low
Target Milestone: rc
: ---
Assignee: Gris Ge
QA Contact: Mingyu Shi
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2021-03-15 07:37 UTC by Mingyu Shi
Modified: 2022-01-10 05:32 UTC (History)
6 users (show)

Fixed In Version: nmstate-1.1.0-0.6.alpha6.el8
Doc Type: No Doc Update
Doc Text:
Clone Of:
Environment:
Last Closed: 2021-11-09 17:43:40 UTC
Type: Bug
Target Upstream Version:
Embargoed:
mshi: needinfo+


Attachments (Terms of Use)
nmstate.log (146.46 KB, text/plain)
2021-03-15 07:37 UTC, Mingyu Shi
no flags Details


Links
System ID Private Priority Status Summary Last Updated
Github nmstate nmstate pull 1652 0 None open SR-IOV: Fix issue when VF pre-exist before PF changes. 2021-06-23 15:27:03 UTC
Red Hat Product Errata RHBA-2021:4157 0 None None None 2021-11-09 17:44:01 UTC

Description Mingyu Shi 2021-03-15 07:37:11 UTC
Created attachment 1763321 [details]
nmstate.log

Description of problem:
Cannot reduce amounts of VF if VF instances were activated. 

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
Linux hp-dl388g10-01.rhts.eng.pek2.redhat.com 4.18.0-293.el8.x86_64 #1 SMP Mon Mar 1 10:04:09 EST 2021 x86_64 x86_64 x86_64 GNU/Linux

How reproducible:
100%

Steps to Reproduce:
cat << EOF > sr-iov_eno6.yaml 
---
interfaces:
- name: eno6
  state: up
  ethernet:
    sr-iov:
      total-vfs: 7
EOF
nmstatectl set sr-iov_eno6.yaml
#bring the VF instances up:
nmstatectl show eno6v* | sed 's/state: down/state: up/g' | nmstatectl set -
#reduce vf numbers to 6:
sed 's/7/6/' sr-iov_eno6.yaml | nmstatectl set -

Actual results:
Failed

Expected results:
No failure

Additional info:
This worked well with nmstate-1.0.2-1.el8.noarch
The attachment contains success on 1.0.2-1, and failure on 1.0.2-5

Comment 2 Gris Ge 2021-06-23 15:33:22 UTC
Pre-test could be done via `sudo dnf copr enable packit/nmstate-nmstate-1652`

Comment 5 Mingyu Shi 2021-07-13 09:38:03 UTC
Versions:
nmstate-1.1.0-0.7.alpha7.el8.noarch
nispor-1.1.1-1.el8.x86_64
NetworkManager-1.32.2-1.el8.x86_64
Linux dell-per740-79.rhts.eng.pek2.redhat.com 4.18.0-321.el8.x86_64 #1 SMP Mon Jul 5 14:18:50 EDT 2021 x86_64 x86_64 x86_64 GNU/Linux

Still failed, at least on an i40e driver
# ethtool -i ens1f0
driver: i40e
version: 4.18.0-321.el8.x86_64
firmware-version: 7.10 0x800075df 19.5.12
expansion-rom-version: 
bus-info: 0000:3b:00.0
supports-statistics: yes
supports-test: yes
supports-eeprom-access: yes
supports-register-dump: yes
supports-priv-flags: yes

Reduce VFs from 64 to 63, raise:
2021-07-13 17:32:23,993 root         ERROR    Interface /org/freedesktop/NetworkManager/Devices/912 rollback failed
2021-07-13 17:32:23,993 root         ERROR    Interface /org/freedesktop/NetworkManager/Devices/927 rollback failed
Traceback (most recent call last):
  File "/usr/bin/nmstatectl", line 11, in <module>
    load_entry_point('nmstate==1.1.0', 'console_scripts', 'nmstatectl')()
  File "/usr/lib/python3.6/site-packages/nmstatectl/nmstatectl.py", line 74, in main
    return args.func(args)
  File "/usr/lib/python3.6/site-packages/nmstatectl/nmstatectl.py", line 336, in set
    return apply(args)
  File "/usr/lib/python3.6/site-packages/nmstatectl/nmstatectl.py", line 353, in apply
    args.save_to_disk,
  File "/usr/lib/python3.6/site-packages/nmstatectl/nmstatectl.py", line 417, in apply_state
    save_to_disk=save_to_disk,
  File "/usr/lib/python3.6/site-packages/libnmstate/netapplier.py", line 90, in apply
    _apply_ifaces_state(plugins, net_state, verify_change, save_to_disk)
  File "/usr/lib/python3.6/site-packages/libnmstate/netapplier.py", line 123, in _apply_ifaces_state
    plugin.apply_changes(net_state, save_to_disk)
  File "/usr/lib/python3.6/site-packages/libnmstate/nm/plugin.py", line 233, 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 98, in apply_config
    self._ctx.wait_all_finish()
  File "/usr/lib/python3.6/site-packages/libnmstate/nm/context.py", line 217, in wait_all_finish
    raise tmp_error
libnmstate.error.NmstateLibnmError: Activate profile uuid:b60faeb3-9814-4b4b-aac6-c665e1a07f7a iface:ens1f0 type: ethernet failed: reason=<enum NM_ACTIVE_CONNECTION_STATE_REASON_DEVICE_DISCONNECTED of type NM.ActiveConnectionStateReason><enum NM_DEVICE_STATE_REASON_SRIOV_CONFIGURATION_FAILED of type NM.DeviceStateReason>

Comment 10 Mingyu Shi 2021-08-03 09:32:11 UTC
driver: ixgbe
version: 4.18.0-313.el8.test.x86_64
firmware-version: 0x800007f4, 17.5.10
expansion-rom-version: 
bus-info: 0000:01:00.1
supports-statistics: yes
supports-test: yes
supports-eeprom-access: yes
supports-register-dump: yes
supports-priv-flags: yes

If set total-vfs to 8 at the beginning, and in the end reduce it to 7, it works well
However, if set total-vfs to 63(maximum) at the beginning, and in the end reduce it to 62, it fails

But this could be another problem, the issue described in #comment0 has been fixed, thanks to Fernando's investigation.
Mark it as VERIFIED and I will do some test about the new issue.

Comment 12 errata-xmlrpc 2021-11-09 17:43:40 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:4157


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