Bug 852052

Summary: [Backend] NON_VM custom MTU is overwritten if there is network with higher MTU attach to the nic
Product: Red Hat Enterprise Virtualization Manager Reporter: Meni Yakove <myakove>
Component: ovirt-engineAssignee: Moti Asayag <masayag>
Status: CLOSED CURRENTRELEASE QA Contact: Meni Yakove <myakove>
Severity: high Docs Contact:
Priority: medium    
Version: 3.1.0CC: dyasny, iheim, lpeer, lvernia, Rhev-m-bugs, sgrinber, yeylon, ykaul
Target Milestone: ---   
Target Release: ---   
Hardware: x86_64   
OS: Linux   
Whiteboard: network
Fixed In Version: si17 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2012-12-04 20:01:20 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
ifcfg- files
none
vdsm.log
none
engine.log none

Description Meni Yakove 2012-08-27 12:58:59 UTC
Description of problem:
When adding two networks to nic, one network is NON_VM with MTU 5000 and another network VM_VLAN with MTU 9000 the MTU on the nic will be 9000. But it is should be 5000.

Version-Release number of selected component (if applicable):


How reproducible:
100%

Steps to Reproduce:
1.Create two networks: NON_VM_MTU_5000 and VM_NET_MTU_9000
2.Attach the two networks to the same nic

  
Actual results:
The nic MTU is 9000

Expected results:
The nic MTU should be 5000

Additional info:
This action should be blocked, When there is NON_VM net attach to the nic all the networks for this nic should be with the same MTU.

Comment 1 lpeer 2012-08-28 10:43:40 UTC
Agreed with Simon on the following behaviour: if a non-bridged network is attched to nic/bond, the MTU of all the networks attached to that nic/bond should have the same MTU value.

Comment 2 lpeer 2012-08-28 10:51:03 UTC
Can you please add logs and cfg files.

Comment 3 Meni Yakove 2012-08-28 19:24:50 UTC
On eth3 attached two networks:
1. VM_VLAN_MTU9000 
2. NONVM_MTU5000

grep MTU= /etc/sysconfig/network-scripts/ifcfg-*
/etc/sysconfig/network-scripts/ifcfg-eth3:MTU=9000
/etc/sysconfig/network-scripts/ifcfg-eth3.999:MTU=9000
/etc/sysconfig/network-scripts/ifcfg-VN_VLAN_MTU9000:MTU=9000

Comment 4 Meni Yakove 2012-08-28 19:25:22 UTC
Created attachment 607681 [details]
ifcfg- files

Comment 5 Meni Yakove 2012-08-28 19:26:08 UTC
Created attachment 607682 [details]
vdsm.log

Comment 6 Moti Asayag 2012-09-02 07:50:38 UTC
A suggested patch:

http://gerrit.ovirt.org/#/c/7661/

Comment 8 Meni Yakove 2012-09-05 13:16:04 UTC
Verified on rhevm-3.1.0-15.el6ev.noarch

Comment 9 Meni Yakove 2012-09-05 13:29:09 UTC
On SetupNetworks I can attach NON_VM_MTU_5000 interface and with any VLAN network (VM and NONVM that have different MTU then the NON_VM network)
When apply I get error on engine:
 WARN  [org.ovirt.engine.core.bll.SetupNetworksCommand] (ajp-/127.0.0.1:8009-6) [48382a56] CanDoAction of action SetupNetworks failed. Reasons:VAR__ACTION__SETUP,VAR__TYPE__NETWORKS,NETWORK_MTU_DIFFERENCES,$NETWORK_MTU_DIFFERENCES_LIST [NON_VM_MTU_5000(5000), VM_VLAN_MTU(9000)]


and error on UI:
Error:

orchid-vds1:

    Cannot setup Networks. The following Logical Networks don't have the same MTU value: [NON_VM_MTU_5000(5000), VM_VLAN_MTU(9000)].


This operation should be blocked like in the UI with invalid operation.

Comment 10 Moti Asayag 2012-09-05 15:52:43 UTC
Meni, do you mean that UI should disallow the user to perform attaching networks with mismatch MTU ? 

Currently this logic is being enforced in the backend, and that's how this bug was addressed: any attempt to attach networks with mismatch MTU is blocked by can-do-action.

If wishes to enhance it, then either open UI bug for this or modify the component to webadmin.

So just to make sure this is the issue and not failure to perform attachment of networks with different MTU, where one of the networks is non-VM and non Vlan network.

Comment 11 Meni Yakove 2012-09-05 16:07:44 UTC
When I try any non VLAN network with different MTU I blocked by UI,  But when I try with VLAN network the UI allows me to attach the network so it's should be UI fix. 
But on the engine the is not can do action but WARN. I will attach the engine log tomorrow.

Comment 12 Meni Yakove 2012-09-06 06:09:32 UTC
Created attachment 610179 [details]
engine.log

Comment 13 Moti Asayag 2012-09-06 06:27:18 UTC
Those are the messages from the attached engine.log:

2012-09-05 16:14:35,157 WARN  [org.ovirt.engine.core.bll.SetupNetworksCommand] (ajp-/127.0.0.1:8009-9) [7c9f873a] CanDoAction of action SetupNetworks failed. Reasons:VAR__ACTION__SETUP,VAR__TYPE__NETWORKS,NETWORK_MTU_DIFFERENCES,$NETWORK_MTU_DIFFERENCES_LIST [NON_VM_MTU_5000(5000), NVMVLANMTU2000(2000)]                                                                          
2012-09-05 16:20:44,452 WARN  [org.ovirt.engine.core.bll.SetupNetworksCommand] (ajp-/127.0.0.1:8009-6) [48382a56] CanDoAction of action SetupNetworks failed. Reasons:VAR__ACTION__SETUP,VAR__TYPE__NETWORKS,NETWORK_MTU_DIFFERENCES,$NETWORK_MTU_DIFFERENCES_LIST [NON_VM_MTU_5000(5000), VM_VLAN_MTU(9000)]

Seems ok to me. Have you got some other error ?

Comment 14 Meni Yakove 2012-09-06 08:07:00 UTC
Backend block the operation, I will open BUG for UI.