Bug 862559

Summary: [RHEVM] [backend] [Host Networking] wrong error message on bond interface change
Product: Red Hat Enterprise Virtualization Manager Reporter: Martin Pavlik <mpavlik>
Component: ovirt-engineAssignee: Mike Kolesnik <mkolesni>
Status: CLOSED WORKSFORME QA Contact: Martin Pavlik <mpavlik>
Severity: medium Docs Contact:
Priority: medium    
Version: 3.1.0CC: dyasny, gklein, iheim, lpeer, masayag, mavital, Rhev-m-bugs, sgrinber, yeylon, ykaul
Target Milestone: ---   
Target Release: ---   
Hardware: x86_64   
OS: All   
Whiteboard: network
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2013-02-05 07:59:49 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:
Bug Depends On: 875487, 888315    
Bug Blocks:    
Attachments:
Description Flags
vdsm.log + engine.log
none
screenshot 1 none

Description Martin Pavlik 2012-10-03 08:46:04 UTC
Created attachment 620692 [details]
vdsm.log + engine.log

Description of problem:

If a user detaches network used by running VM from bond, destroys the bond (e.g bond4) and creates a new bond with same interfaces, same options but different name (e.g. bond 3). The following error message appears:

Error while executing action Setup Networks: Interface name can't be found

It would be better if the user got clear message which describes the problem and its solution. It should be same message which appears if user disconnects the network and does not attach it to the new bond:

Cannot setup Networks. The following VMs are actively using the Logical Network: Fedora, w-xp-java, fedora17, rhel63, w7-virtio. Please stop the VMs and try again.

Version-Release number of selected component (if applicable):
Red Hat Enterprise Virtualization Manager Version: '3.1.0-18.el6ev' 

How reproducible:
100%

Steps to Reproduce:
1. create logical network
2. attach the logical network to bond on host (e.g. bond0)
3. create VM which uses network from step 1, run the VM
4. hosts->your host-> setup host networks
   a)break bond from step 2
   b)take previously bonded interfaces and create a new bond (e.g. bond1) with same options as bond0 had
   c) assign network from step 1 to newly created bond
   d) click ok
  
Actual results:
Error while executing action Setup Networks: Interface name can't be found

Expected results:
Cannot setup Networks. The following VMs are actively using the Logical Network: $VM1, $VM2. Please stop or migrate the VMs and try again.

Additional info:
2012-10-03 10:39:14,396 ERROR [org.ovirt.engine.core.vdsbroker.vdsbroker.BrokerCommandBase] (ajp-/127.0.0.1:8009-11) [3aa0be82] Failed in SetupNetworksVDS method
2012-10-03 10:39:14,397 ERROR [org.ovirt.engine.core.vdsbroker.vdsbroker.BrokerCommandBase] (ajp-/127.0.0.1:8009-11) [3aa0be82] Error code ERR_BAD_NIC and error message VDSGenericException: VDSErrorException: Failed to SetupNetworksVDS, error = delNetwork: ['p1p1', 'p1p2', 'vnet1'] are not all nics enslaved to bond0
2012-10-03 10:39:14,397 ERROR [org.ovirt.engine.core.vdsbroker.vdsbroker.BrokerCommandBase] (ajp-/127.0.0.1:8009-11) [3aa0be82] org.ovirt.engine.core.vdsbroker.vdsbroker.VDSErrorException: VDSGenericException: VDSErrorException: Failed to SetupNetworksVDS, error = delNetwork: ['p1p1', 'p1p2', 'vnet1'] are not all nics enslaved to bond0
2012-10-03 10:39:14,397 ERROR [org.ovirt.engine.core.vdsbroker.VDSCommandBase] (ajp-/127.0.0.1:8009-11) [3aa0be82] Command SetupNetworksVDS execution failed. Exception: VDSErrorException: VDSGenericException: VDSErrorException: Failed to SetupNetworksVDS, error = delNetwork: ['p1p1', 'p1p2', 'vnet1'] are not all nics enslaved to bond0
2012-10-03 10:39:14,397 ERROR [org.ovirt.engine.core.bll.SetupNetworksCommand] (ajp-/127.0.0.1:8009-11) [3aa0be82] Command org.ovirt.engine.core.bll.SetupNetworksCommand throw Vdc Bll exception. With error message VdcBLLException: org.ovirt.engine.core.vdsbroker.vdsbroker.VDSErrorException: VDSGenericException: VDSErrorException: Failed to SetupNetworksVDS, error = delNetwork: ['p1p1', 'p1p2', 'vnet1'] are not all nics enslaved to bond0

Comment 1 Martin Pavlik 2012-10-03 08:47:38 UTC
Created attachment 620693 [details]
screenshot 1

Comment 3 Mike Kolesnik 2013-02-05 07:22:45 UTC
I tried this scenario, getting the error: Error while executing action Setup Networks: Network is currently being used

This seems good to me, since you didn't actually remove the network from the host but you can't do the setup networks since the network is used by the running VM.

What do you think?

Comment 4 Martin Pavlik 2013-02-05 07:38:26 UTC
It seems to be close enough.

Comment 5 Mike Kolesnik 2013-02-05 07:59:49 UTC
Closing this bug as it seems the message is OK now