[NEUTRON-66] java.lang.NullPointerException at org.opendaylight.neutron.transcriber.NeutronSubnetInterface.fromMd Created: 09/Sep/15 Updated: 16/Oct/15 Resolved: 16/Oct/15 |
|
| Status: | Resolved |
| Project: | neutron |
| Component/s: | transcriber |
| Affects Version/s: | master |
| Fix Version/s: | None |
| Type: | Bug | ||
| Reporter: | Rijil Abraham | Assignee: | Ravindra Kenchappa |
| Resolution: | Done | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Environment: |
Operating System: All |
||
| Attachments: |
|
| External issue ID: | 4285 |
| Description |
|
While trying to display the subnet information, I hit on the following null pointer exception. Here are the steps I did. GET controller/nb/v2/neutron/subnets <html> <pre> Server Error</pre> </body> |
| Comments |
| Comment by Rijil Abraham [ 09/Sep/15 ] |
|
Attachment q-svc.log.2015-09-09-091950 has been added with description: q-svc log |
| Comment by Rijil Abraham [ 09/Sep/15 ] |
|
Attachment karaf.log has been added with description: odl log |
| Comment by Rijil Abraham [ 14/Sep/15 ] |
|
Exact steps to recreate the issue: 1)On a devstack (stable/kilo) setup installed ODL(beryllium) 2)Create a network using the POST API 3)Create a subnet using POST API ], "host_routes": [], "ip_version": 6, "ipv6_address_mode": null, "cidr": "2003::/64", "id": "251598aa-bccf-4c1c-b429-655565b80f7e", "subnetpool_id": null}} 4)Delete the network using the DELETE API 5)Now using the API display the subnet info |
| Comment by Ravindra Kenchappa [ 24/Sep/15 ] |
|
When deleting the network in NeutronSubnetinterface.java it tries to access all the subnets belongs the network that being deleted. For some reason some of subnets do not have the gateway-ip and hence the NPE. When NPE check is added the issue is not seen and in the test-network.py tempest test 6 more tests case were passed. Now we have 6 failures related to UPDATE network testcase. |
| Comment by Isaku Yamahata [ 30/Sep/15 ] |
|
https://git.opendaylight.org/gerrit/#/c/27619/ Can you please try the above patch? |
| Comment by Isaku Yamahata [ 30/Sep/15 ] |
|
NOTE: looking at openstack neutron code, ipv6 ra mode and ipv6 address mode also can be null in addition to gateway ip. |
| Comment by Ravindra Kenchappa [ 30/Sep/15 ] |
|
I looked at the changes https://git.opendaylight.org/gerrit/#/c/27619/ and it should work, but the other 2 checks is not needed because there will not be NPE until the "subnet" is NULL. if (subnet.getIpv6RaMode() != null) { In this test-case when the SUBNET is created the gateway-ip is set to NULL. 3)Create a subnet using POST API ], "host_routes": [], "ip_version": 6, "ipv6_address_mode": null, "cidr": "2003::/64", "id": "251598aa-bccf-4c1c-b429-655565b80f7e", "subnetpool_id": null}} And in fromMD() we tried to access the gateway_ip from the subnet object and tries get its vlaue, since gateway_ip is null we get NPE. result.setGatewayIP(String.valueOf(subnet.getGatewayIp().getValue())); We have encounter another issue and fixing that also and uploading that patch. |