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
Summary: [SR-IOV] - PF is no longer considered as a PF after the VM shuts down, if it ...
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: ovirt-engine
Classification: oVirt
Component: BLL.Network
Version: 3.6.2.6
Hardware: x86_64
OS: Linux
medium
high
Target Milestone: ovirt-3.6.5
: 3.6.5
Assignee: Alona Kaplan
QA Contact: Michael Burman
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2016-02-01 14:46 UTC by Michael Burman
Modified: 2016-04-21 14:42 UTC (History)
5 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2016-04-21 14:42:26 UTC
oVirt Team: Network
Embargoed:
rule-engine: ovirt-3.6.z+
rule-engine: exception+
ylavi: planning_ack+
danken: devel_ack+
rule-engine: testing_ack+


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
oVirt gerrit 53393 0 master MERGED engine: Fixing updating of HostNicVfsConfig table 2016-02-21 08:25:19 UTC
oVirt gerrit 53766 0 ovirt-engine-3.6 MERGED engine: Fixing updating of HostNicVfsConfig table 2016-02-22 08:20:04 UTC

Description Michael Burman 2016-02-01 14:46:44 UTC
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 17:09:22 UTC
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 09:12:22 UTC
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.