Bug 1303640 - [SR-IOV] - PF is no longer considered as a PF after the VM shuts down, if it was attached/added directly to VM via Host Devices sub tab
[SR-IOV] - PF is no longer considered as a PF after the VM shuts down, if it ...
Status: CLOSED CURRENTRELEASE
Product: ovirt-engine
Classification: oVirt
Component: BLL.Network (Show other bugs)
3.6.2.6
x86_64 Linux
medium Severity high (vote)
: ovirt-3.6.5
: 3.6.5
Assigned To: Alona Kaplan
Michael Burman
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2016-02-01 09:46 EST by Michael Burman
Modified: 2016-04-21 10:42 EDT (History)
5 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2016-04-21 10:42:26 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: Network
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---
rule-engine: ovirt‑3.6.z+
rule-engine: exception+
ylavi: planning_ack+
danken: devel_ack+
rule-engine: testing_ack+


Attachments (Terms of Use)


External Trackers
Tracker ID Priority Status Summary Last Updated
oVirt gerrit 53393 master MERGED engine: Fixing updating of HostNicVfsConfig table 2016-02-21 03:25 EST
oVirt gerrit 53766 ovirt-engine-3.6 MERGED engine: Fixing updating of HostNicVfsConfig table 2016-02-22 03:20 EST

  None (edit)
Description Michael Burman 2016-02-01 09:46:44 EST
Description of problem:
[SR-IOV] - PF is no longer considered as a PF after the VM shuts down, if it was attached/added directly to VM via Host Devices sub tab.

Direct attachment of a PF to VM via Host Devices sub tab and then shutting the VM down, will cause the NIC to no longer be considered as a PF. 

Once running VM with PF a direct attachment, his record deleted from host_nic_vfs_config table, since it has a foreign key on the vds_interface table and after shutting the VM, the host_nic_vfs_config record is not recovered. 
  
Version-Release number of selected component (if applicable):
3.6.3-0.1.el6

How reproducible:
100

Steps to Reproduce:
1. Attach a PF to VM as direct attachment via the Host Devices sub tab
2. Run the VM
3. Shut down the VM

Actual results:
PF/s no longer considered as PF/s, but as regular NICs(no sr-iov icon, no edit option).

Expected results:
PF should remain PF
Comment 1 Alona Kaplan 2016-02-01 12:09:22 EST
An oVirt user had a similar problem-
http://lists.ovirt.org/pipermail/users/2016-January/037509.html

The names of the nics were switched.

The user had a host with 4 sriov nics.
The sriov nics were - eth2, eth3, eth4 and eth5.
After a reboot, the names were switched - eth1, eth3, eth4 and eth6 became the sriov nics.

Since the pci devices didn't change and only the 'net_iface_name' on the net devices was changed, 'host_nic_vfs_config' table is not being updated (currently, the code updates it only if the pci devices are changed).
Since the id value in vds_interface table is resolved by the nic_name reported from by getVdsCap. The vds_interface table ids and names are staying the same, just the data is switched. If previously id 'id1' referenced to name 'eth1', after the name switching id 'id1' will still reference to name 'eth1'.

The entries in 'host_nic_vfs_config' table refer via the nic_id to 'vds_interface' table.
It means that they refer to the same nic_names they referred before the switch.

Since after the names switch this nic_name no longer refer to sriov nic. It cause NPE when trying to open the 'Host setup networks' dialog of the related host (it assumes the nic is sriov and has 'total_num_of_vfs'. This assumption is wrong and causes NPE).
Comment 2 Michael Burman 2016-03-31 05:12:22 EDT
Verified on - 3.6.5-0.1.el6 and vdsm-4.17.25-0.el7ev.noarch

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