[NEUTRON-56] create floating ip fails with bad request Created: 18/Jul/15  Updated: 19/Oct/17  Resolved: 21/Jul/15

Status: Resolved
Project: neutron
Component/s: northbound-api
Affects Version/s: unspecified
Fix Version/s: None

Type: Bug
Reporter: Isaku Yamahata Assignee: Unassigned
Resolution: Done Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

Operating System: All
Platform: All


External issue ID: 4015

 Description   

tempest.api.network.test_floating_ips.FloatingIPTestJSON.
test_create_floating_ip_specifying_a_fixed_ip_address
fails to create floating ip as follows.

an external network with an ipv4 subnet + an ipv6 subnet is created.
Then, it tries to create floating ip. ODL returns bad request to neutron.

When creating/updating floating ip and attaching interface to router
subnets needs to exist.
The check is done by the number of subnets != 1.
But it should be done the number of ipv4 subnet == 0.

> Traceback (most recent call last):
> File "tempest/api/network/test_floating_ips.py", line 181, in test_create_floating_ip_specifying_a_fixed_ip_address
> fixed_ip_address=self.ports[1]['fixed_ips'][0]['ip_address'])
> File "tempest/services/network/json/network_client.py", line 188, in create_floatingip
> return self._create_resource(uri, post_data)
> File "tempest/services/network/json/network_client.py", line 109, in _create_resource
> resp, body = self.post(req_uri, req_post_data)
> File "/opt/stack/tempest/.venv/local/lib/python2.7/site-packages/tempest_lib/common/rest_client.py", line 256, in post
> return self.request('POST', url, extra_headers, headers, body)
> File "/opt/stack/tempest/.venv/local/lib/python2.7/site-packages/tempest_lib/common/rest_client.py", line 636, in request
> resp, resp_body)
> File "/opt/stack/tempest/.venv/local/lib/python2.7/site-packages/tempest_lib/common/rest_client.py", line 747, in _error_checker
> raise exceptions.ServerFault(resp_body, message=message)
> tempest_lib.exceptions.ServerFault: Got server fault
> Details: Request Failed: internal server error while processing your request.



 Comments   
Comment by Flavio Fernandes [ 21/Jul/15 ]

gerrits:

master: https://git.opendaylight.org/gerrit/#/c/24258/
lithium: https://git.opendaylight.org/gerrit/#/c/24342/

Comment by Flavio Fernandes [ 21/Jul/15 ]

Trace on ODL side:

java.lang.NullPointerException
at org.opendaylight.neutron.northbound.api.NeutronFloatingIPsNorthbound.updateFloatingIP(NeutronFloatingIPsNorthbound.java:367)[238:org.opendaylight.neutron.northbound-api:0.6.0.SNAPSHOT]
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)[:1.7.0_80]
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)[:1.7.0_80]
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)[:1.7.0_80]
at java.lang.reflect.Method.invoke(Method.java:606)[:1.7.0_80]
at com.sun.jersey.spi.container.JavaMethodInvokerFactory$1.invoke(JavaMethodInvokerFactory.java:60)[237:com.sun.jersey.jersey-server:1.17.0]
at com.sun.jersey.server.impl.model.method.dispatch.AbstractResourceMethodDispatchProvider$ResponseOutInvoker._dispatch(AbstractResourceMethodDispatchProvider.java:205)[237:com.sun.jersey.jersey-\
server:1.17.0]
at com.sun.jersey.server.impl.model.method.dispatch.ResourceJavaMethodDispatcher.dispatch(ResourceJavaMethodDispatcher.java:75)[237:com.sun.jersey.jersey-server:1.17.0]
at com.sun.jersey.server.impl.uri.rules.HttpMethodRule.accept(HttpMethodRule.java:302)[237:com.sun.jersey.jersey-server:1.17.0]
at com.sun.jersey.server.impl.uri.rules.RightHandPathRule.accept(RightHandPathRule.java:147)[237:com.sun.jersey.jersey-server:1.17.0]
at com.sun.jersey.server.impl.uri.rules.ResourceClassRule.accept(ResourceClassRule.java:108)[237:com.sun.jersey.jersey-server:1.17.0]
at com.sun.jersey.server.impl.uri.rules.RightHandPathRule.accept(RightHandPathRule.java:147)[237:com.sun.jersey.jersey-server:1.17.0]
at com.sun.jersey.server.impl.uri.rules.RootResourceClassesRule.accept(RootResourceClassesRule.java:84)[237:com.sun.jersey.jersey-server:1.17.0]
at com.sun.jersey.server.impl.application.WebApplicationImpl._handleRequest(WebApplicationImpl.java:1511)[237:com.sun.jersey.jersey-server:1.17.0]
at com.sun.jersey.server.impl.application.WebApplicationImpl._handleRequest(WebApplicationImpl.java:1442)[237:com.sun.jersey.jersey-server:1.17.0]
at com.sun.jersey.server.impl.application.WebApplicationImpl.handleRequest(WebApplicationImpl.java:1391)[237:com.sun.jersey.jersey-server:1.17.0]
at com.sun.jersey.server.impl.application.WebApplicationImpl.handleRequest(WebApplicationImpl.java:1381)[237:com.sun.jersey.jersey-server:1.17.0]
...

Generated at Wed Feb 07 20:25:26 UTC 2024 using Jira 8.20.10#820010-sha1:ace47f9899e9ee25d7157d59aa17ab06aee30d3d.