Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.

Bug 1338601

Summary: [SR-IOV] - It is possible to add(hotplug) 'passthrough' vNIC to running VM, while there are no available VFs on the host
Product: [oVirt] ovirt-engine Reporter: Michael Burman <mburman>
Component: BLL.NetworkAssignee: Alona Kaplan <alkaplan>
Status: CLOSED CURRENTRELEASE QA Contact: Meni Yakove <myakove>
Severity: medium Docs Contact:
Priority: medium    
Version: 4.0.0CC: alkaplan, bugs, danken
Target Milestone: ovirt-4.0.0-rcFlags: rule-engine: ovirt-4.0.0+
rule-engine: planning_ack+
danken: devel_ack+
rule-engine: testing_ack+
Target Release: 4.0.0   
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2016-07-05 07:55:32 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: Network RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Attachments:
Description Flags
engine log none

Description Michael Burman 2016-05-23 06:16:42 UTC
Created attachment 1160453 [details]
engine log

Description of problem:
[SR-IOV] - It is possible to add(hotplug) 'passthrough' vNIC to running VM, while there are no available VFs on the host. 

Engine is not blocking from adding(hotplug) 'passthrough' vNIC to running while there are no free/available VFs on the host, operation seems to fail with error - 'Error while executing action: A Request to the Server failed with the following Status Code: 500' and the interface is not present in the guest OS, but it appears in the the engine UI and pretty confusing. 

"Failed to add Interface nic4 (PCI Passthrough) to VM vm2_sr-iov. (User: admin@internal-authz)"

Engine should block such operation, it shouldn't be possible to add 'passthorugh' vNICs if there are no available VFS. 


Version-Release number of selected component (if applicable):
4.0.0-0.7.master.el7ev
vdsm-4.18.0-0.el7ev.x86_64

How reproducible:
100

Steps to Reproduce:
- Scenario 1 - 
1)Enable 1 VF on the host and run VM with 1 'passthrough' vNIC.
2)Add new 'passthrough vNIC to the running VM.

- Scenario 2 - 
1) Enable 1 VF on the host with specific 'passthorugh' network 'n1'.
2) Run VM with 'n1' 'passthrough' vNIC.
3) Hotunplug the vNIC, update the profile to other 'passthrough' profile(that is not in the specific network white list).
4) Hotplug back the vNIC
   
- Scenario 3 -
1) Enable 1 VF on the host with specific 'passthrough' network 'n2' via label 'lb1' 
2) Run VM with 'n2' 'passthrough' vNIC
3) Hotunplug the vNIC, update the profile to other 'passthrough' profile(that is not in the specific networks white list via label 'lb1') 

Actual results + Expected results:
- "Failed to add Interface nic4 (PCI Passthrough) to VM vm2_sr-iov. (User: admin@internal-authz)"
- 'Error while executing action: A Request to the Server failed with the following Status Code: 500'
- In the engine UI, the interface was added to the VM and that is confusing. 
- In all scenarios there are no free/available VFs on the host and engine should validate that and block from hotplugging the vNIC to the running VM. 


Additional info:
See also - BZ 1234328

Comment 1 Michael Burman 2016-06-07 08:41:52 UTC
Verified on - 4.0.0.2-0.1.el7ev and vdsm-4.18.1-11.gita92976e.el7ev.x86_64

Comment 2 Sandro Bonazzola 2016-07-05 07:55:32 UTC
oVirt 4.0.0 has been released, closing current release.