Bug 995850

Summary: [Neutron integration]External network provider | wrong error when adding non-existing Network Label in add new networks
Product: [oVirt] ovirt-engine Reporter: Meni Yakove <myakove>
Component: GeneralAssignee: Dan Kenigsberg <danken>
Status: CLOSED DEFERRED QA Contact: Meni Yakove <myakove>
Severity: medium Docs Contact:
Priority: medium    
Version: ---CC: bazulay, bugs, lpeer, masayag, mkolesni, nyechiel, rbalakri, Rhev-m-bugs, yeylon, ykaul, ylavi
Target Milestone: ---Flags: ylavi: ovirt-4.0.0?
rule-engine: planning_ack?
rule-engine: devel_ack?
rule-engine: testing_ack?
Target Release: ---   
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2016-03-25 19:26:53 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: 1048777    
Bug Blocks:    

Description Meni Yakove 2013-08-11 14:27:50 UTC
Description of problem:
When adding new network from external network provider (neutron) with wrong network label the error in the UI is:
Error while executing action AddNetworkOnProvider: Failed to communicate with the external provider.

The real error is (from neutron server):
2013-08-11 17:07:34    ERROR [quantum.api.v2.resource] create failed
Traceback (most recent call last):
  File "/usr/lib/python2.6/site-packages/quantum/api/v2/resource.py", line 82, in resource
    result = method(request=request, **args)
  File "/usr/lib/python2.6/site-packages/quantum/api/v2/base.py", line 369, in create
    obj = obj_creator(request.context, **kwargs)
  File "/usr/lib/python2.6/site-packages/quantum/plugins/linuxbridge/lb_quantum_plugin.py", line 393, in create_network
    network['network'])
  File "/usr/lib/python2.6/site-packages/quantum/plugins/linuxbridge/lb_quantum_plugin.py", line 362, in _process_provider_create
    raise q_exc.InvalidInput(error_message=msg)
InvalidInput: Invalid input for operation: Unknown provider:physical_network qnet3.


From engine log:
2013-08-11 17:15:17,120 ERROR [org.ovirt.engine.core.bll.provider.network.AddNetworkOnProviderCommand] (ajp-/127.0.0.1:8702-2) Command org.ovirt.engine.core.bll.provider.network.AddNetworkOnProviderCommand throw Vdc Bll exception. With error message VdcBLLException: (Failed with error PROVIDER_FAILURE and code 5050)
2013-08-11 17:15:17,124 INFO  [org.ovirt.engine.core.dal.dbbroker.auditloghandling.AuditLogDirector] (ajp-/127.0.0.1:8702-2) Correlation ID: 1014ffb3, Call Stack: null, Custom Event ID: -1, Message: Failed to add Network neutrom_net1 to Data Center: Neutron_DC


Steps to Reproduce:
1. Add new network on external network provider
2. On "Network Label" enter non-existing label

Comment 1 Lior Vernia 2013-09-15 12:23:41 UTC
I actually think we might not wanna solve this for 3.3 as part of the feature's "tech preview" status. In the long run the label widget should really be some sort of suggest box, where existing labels would be suggested and new labels could be created. It just wasn't in the scope of the 3.3 feature.

Comment 3 Nir Yechiel 2014-02-19 12:53:16 UTC
Mike, does the network labels reported in neutron API?

Comment 4 Mike Kolesnik 2014-03-05 13:20:12 UTC
(In reply to Nir Yechiel from comment #3)
> Mike, does the network labels reported in neutron API?

Currently this information is not reported by the API. You can see from the documentation [1] that what is available is just on the networks resource, so only for a specific network you can see what physical network it's on but you don't have a full list of them.

We could let the user specify the list of existing labels explicitly in the "provider" dialog, so that we can suggest to him what labels to use when adding an external network.

[1] http://docs.openstack.org/api/openstack-network/2.0/content/provider_ext.html

Comment 5 Moti Asayag 2014-03-05 13:26:20 UTC
(In reply to Mike Kolesnik from comment #4)
> (In reply to Nir Yechiel from comment #3)
> > Mike, does the network labels reported in neutron API?
> 
> Currently this information is not reported by the API. You can see from the
> documentation [1] that what is available is just on the networks resource,
> so only for a specific network you can see what physical network it's on but
> you don't have a full list of them.
> 
> We could let the user specify the list of existing labels explicitly in the
> "provider" dialog, so that we can suggest to him what labels to use when
> adding an external network.

Another idea would be to parse the bridge mappings if provided and to extract the labels out of it.

> 
> [1]
> http://docs.openstack.org/api/openstack-network/2.0/content/provider_ext.html

Comment 6 Lior Vernia 2014-03-12 13:11:53 UTC
Without the ability to get a "formal" list of legitimate labels from the Neutron server, could we at least get a more specific error from the server? In which case, this would be related to Bug 1048777 (and probably should depend on it).

Comment 7 Red Hat Bugzilla Rules Engine 2015-11-30 18:59:41 UTC
Target release should be placed once a package build is known to fix a issue. Since this bug is not modified, the target version has been reset. Please use target milestone to plan a fix for a oVirt release.