Bug 1196275

Summary: [HostNetworkQos] Setting QoS on the only VLAN network on interface fails
Product: [oVirt] ovirt-engine Reporter: Michael Burman <mburman>
Component: GeneralAssignee: Alona Kaplan <alkaplan>
Status: CLOSED CURRENTRELEASE QA Contact: Michael Burman <mburman>
Severity: high Docs Contact:
Priority: high    
Version: ---CC: alkaplan, bazulay, bugs, ecohen, gcheresh, gklein, lsurette, mmucha, rbalakri, yeylon, ylavi
Target Milestone: ovirt-3.6.0-rcFlags: rule-engine: ovirt-3.6.0+
ylavi: Triaged+
ylavi: planning_ack+
rule-engine: devel_ack+
rule-engine: testing_ack+
Target Release: 3.6.0   
Hardware: x86_64   
OS: Linux   
Whiteboard: network
Fixed In Version: 3.6.0_beta4 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2015-11-04 13:41:05 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
screenshot none

Description Michael Burman 2015-02-25 15:45:12 UTC
Created attachment 995256 [details]
engine log

Description of problem:
SetupNetworks > Engine blocking from attaching VM/non VM vlan tagged network with Host QoS configured.
When trying to approve operation via SN:
Operation Canceled
Error while executing action:

red-vds2.qa.lab.tlv.redhat.com:

    Cannot setup Networks. All or none of the networks attached to an interface must have QoS configured, but on the following interface(s) some of the networks are missing QoS: enp6s0.

engine.log:

2015-02-25 17:18:37,077 WARN  [org.ovirt.engine.core.bll.network.host.SetupNetworksCommand] (ajp--127.0.0.1-8702-11) [564d487a] CanDoAction of action 'SetupNetworks' failed for user admin@internal. Reasons: VAR__ACTION__SETUP,VAR__TYPE__NETWORKS,ACTION_TYPE_FAILED_HOST_NETWORK_QOS_INTERFACES_WITHOUT_QOS,$ACTION_TYPE_FAILED_HOST_NETWORK_QOS_INTERFACES_WITHOUT_QOS_LIST enp6s0


Version-Release number of selected component (if applicable):
3.6.0-0.0.master.20150224122249.git99da5fd.el6


How reproducible:
100

Steps to Reproduce:
1. Create VM/non VM vlan tagged network with Host QoS configured.
2. Try to attach vlan network to NIC 
3.

Actual results:
Operation canceled with a wrong error message. 

Expected results:
Operation should succeed.

Comment 1 Michael Burman 2015-02-25 15:48:39 UTC
Created attachment 995259 [details]
screenshot

Comment 2 Lior Vernia 2015-03-04 13:29:52 UTC
Engine seems to mistakenly think the interface is shared by other networks, even though the VLAN network is alone there - so shouldn't be any issue (since QoS is configured on all the networks on the interface).

Comment 3 Barak 2015-08-03 13:32:22 UTC
Is this relevant in the new API as well ?

Comment 4 Alona Kaplan 2015-08-04 07:19:25 UTC
(In reply to Barak from comment #3)
> Is this relevant in the new API as well ?

The bug is in- 
SetupNetworkHelper.validateQosNotPartiallyConfigured(..)

It uses- 'NetworkUtils.qosConfiguredOnInterface(iface, network)' to find out whether a the iface has qos configured on it.

- For the 'baseNic' the 'NetworkUtils.qosConfiguredOnInterface(iface, network)' return false, since there is no network on it (the network is null).
- For the 'baseNic.vlan' the the method return true since it has qos.

So 'validateQosNotPartiallyConfigured' considers the qos as partially configured on the nic.

The fix should be that in case there is no network on the nic, it shouldn't be taken in account when validating if the qos in partially configured on then ic.

Comment 6 Michael Burman 2015-10-07 11:11:46 UTC
Verified on - rhevm-3.6.0-0.18.el6.noarch with vdsm-4.17.8-1.el7ev.noarch

Comment 7 Sandro Bonazzola 2015-11-04 13:41:05 UTC
oVirt 3.6.0 has been released on November 4th, 2015 and should fix this issue.
If problems still persist, please open a new BZ and reference this one.