[NEUTRON-143] Updating security groups fails with HTTP 500 Created: 28/Nov/16  Updated: 19/Oct/17

Status: In Progress
Project: neutron
Component/s: northbound-api
Affects Version/s: master
Fix Version/s: None

Type: Bug
Reporter: Mike Kolesnik Assignee: Unassigned
Resolution: Unresolved 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: 7256
Priority: Low

 Description   

Updating security group fails.

This is due to V2 driver sending only the delta i.e.:
{ 'security-group:

{ 'name':'whatever'}

}

This should succeed since the SG ID is already available in the request URL, but fails with:
2016-11-28 18:28:28,226 | WARN | qtp956555648-511 | NeutronSecurityGroupInterface | 240 - org.opendaylight.neutron.transcriber - 0.6.0.Beryllium

Attempting to write neutron securityGroup without UUID
2016-11-28 18:28:28,227
ERROR qtp956555648-511 ContainerResponse 173 - com.sun.jersey.jersey-server - 1.17.0 The RuntimeExc
eption could not be mapped to a response, re-throwing to the HTTP container
java.lang.IllegalArgumentException: All keys must be specified for class org.opendaylight.yang.gen.v1.urn.opendaylight.neutron.secgroups.rev150712.s
ecurity.groups.attributes.security.groups.SecurityGroupKey. Missing key is getUuid. Supplied key is SecurityGroupKey []
at com.google.common.base.Preconditions.checkArgument(Preconditions.java:145)
at org.opendaylight.yangtools.binding.data.codec.impl.ValueContext.getAndSerialize(ValueContext.java:46)
at org.opendaylight.yangtools.binding.data.codec.impl.IdentifiableItemCodec.serialize(IdentifiableItemCodec.java:124)
at org.opendaylight.yangtools.binding.data.codec.impl.IdentifiableItemCodec.serialize(IdentifiableItemCodec.java:31)
at org.opendaylight.yangtools.binding.data.codec.impl.KeyedListNodeCodecContext.addYangPathArgument(KeyedListNodeCodecContext.java:52)
at org.opendaylight.yangtools.binding.data.codec.impl.DataObjectCodecContext.bindingPathArgumentChild(DataObjectCodecContext.java:193)
at org.opendaylight.yangtools.binding.data.codec.impl.BindingCodecContext.getCodecContextNode(BindingCodecContext.java:127)
at org.opendaylight.yangtools.binding.data.codec.impl.BindingCodecContext.newWriter(BindingCodecContext.java:104)
at org.opendaylight.yangtools.binding.data.codec.impl.BindingNormalizedNodeCodecRegistry.toNormalizedNode(BindingNormalizedNodeCodecRegistry
.java:102)
at org.opendaylight.controller.md.sal.binding.impl.BindingToNormalizedNodeCodec.toNormalizedNode(BindingToNormalizedNodeCodec.java:133)
at org.opendaylight.controller.md.sal.binding.impl.AbstractWriteTransaction.put(AbstractWriteTransaction.java:39)
at org.opendaylight.neutron.transcriber.AbstractNeutronInterface.updateMd(AbstractNeutronInterface.java:177)
at org.opendaylight.neutron.transcriber.AbstractNeutronInterface.update(AbstractNeutronInterface.java:399)
at org.opendaylight.neutron.transcriber.AbstractNeutronInterface$10.action(AbstractNeutronInterface.java:409)
at org.opendaylight.neutron.transcriber.AbstractNeutronInterface$10.action(AbstractNeutronInterface.java:406)
at org.opendaylight.neutron.transcriber.AbstractNeutronInterface.chainWrapper2(AbstractNeutronInterface.java:105)
at org.opendaylight.neutron.transcriber.AbstractNeutronInterface.update(AbstractNeutronInterface.java:405)
at org.opendaylight.neutron.northbound.api.AbstractNeutronNorthboundIAware.update(AbstractNeutronNorthboundIAware.java:137)[237:org.opendayl
ight.neutron.northbound-api:0.6.0.Beryllium]
at org.opendaylight.neutron.northbound.api.NeutronSecurityGroupsNorthbound.updateSecurityGroup(NeutronSecurityGroupsNorthbound.java:216)[237
:org.opendaylight.neutron.northbound-api:0.6.0.Beryllium]
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)[:1.8.0_72]
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)[:1.8.0_72]
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)[:1.8.0_72]
at java.lang.reflect.Method.invoke(Method.java:498)[:1.8.0_72]
at com.sun.jersey.spi.container.JavaMethodInvokerFactory$1.invoke(JavaMethodInvokerFactory.java:60)[173:com.sun.jersey.jersey-server:1.17.0]
at com.sun.jersey.server.impl.model.method.dispatch.AbstractResourceMethodDispatchProvider$ResponseOutInvoker._dispatch(AbstractResourceMeth
odDispatchProvider.java:205)[173:com.sun.jersey.jersey-server:1.17.0]
at com.sun.jersey.server.impl.model.method.dispatch.ResourceJavaMethodDispatcher.dispatch(ResourceJavaMethodDispatcher.java:75)[173:com.sun.
-snip-


 Comments   
Comment by Isaku Yamahata [ 29/Nov/16 ]

It turned out the issue resides in neutron and netwokring-odl.
The work around patch is at
https://review.openstack.org/#/c/404003/

Comment by Isaku Yamahata [ 29/Nov/16 ]

Anyway, ODL neutron northbound should return proper error code instead of internal server error.

In this case, it's bad request.

Comment by Michael Vorburger [ 30/Nov/16 ]

> ODL neutron northbound should return
> proper error code instead of internal server error

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