|
Attachment karaf.log has been added with description: attached log
|
|
I have checked with patch https://git.opendaylight.org/gerrit/#/c/40056/
still i see below exception in logs (attached log file as well) in method security.getProtocol() when i provide input as
{
"security-rule":
{
"uuid": "d0d639a5-ca9a-44a9-97c6-603c176c9673",
"direction": "neutron-constants:direction-egress",
"ethertype": "neutron-constants:ethertype-v4",
"remote-group-id": "362cc56c-a9d4-4abc-9074-c5f83d305a2a",
"protocol": 6,
"port-range-max": 80,
"port-range-min": 70,
"security-group-id": "362cc56c-a9d4-4abc-9074-c5f83d305a2b"
}
}
or
{
"security-rule":
{
"uuid": "d0d639a5-ca9a-44a9-97c6-603c176c9674",
"direction": "neutron-constants:direction-egress",
"ethertype": "neutron-constants:ethertype-v4",
"remote-group-id": "362cc56c-a9d4-4abc-9074-c5f83d305a2a",
"protocol": "neutron-constants:protocol-tcp",
"port-range-max": 80,
"port-range-min": 70,
"security-group-id": "362cc56c-a9d4-4abc-9074-c5f83d305a2b"
}
}
2016-07-04 11:44:18,127 | ERROR | pool-45-thread-1 | NeutronSecurityRuleListener | 326 - org.opendaylight.netvirt.neutronvpn-impl - 0.3.0.SNAPSHOT | Exception occured while adding acl for security rule:
java.lang.IllegalArgumentException: Failed to construct union for value 6
at org.opendaylight.yangtools.binding.data.codec.impl.UnionValueOptionContext.deserializeUnion(UnionValueOptionContext.java:66)[119:org.opendaylight.mdsal.binding-dom-codec:0.9.0.SNAPSHOT]
at org.opendaylight.yangtools.binding.data.codec.impl.UnionTypeCodec.deserialize(UnionTypeCodec.java:77)[119:org.opendaylight.mdsal.binding-dom-codec:0.9.0.SNAPSHOT]
at org.opendaylight.yangtools.binding.data.codec.impl.LeafNodeCodecContext.deserializeObject(LeafNodeCodecContext.java:199)[119:org.opendaylight.mdsal.binding-dom-codec:0.9.0.SNAPSHOT]
at org.opendaylight.yangtools.binding.data.codec.impl.DataObjectCodecContext.getBindingChildValue(DataObjectCodecContext.java:328)[119:org.opendaylight.mdsal.binding-dom-codec:0.9.0.SNAPSHOT]
at org.opendaylight.yangtools.binding.data.codec.impl.KeyedListNodeCodecContext.getBindingChildValue(KeyedListNodeCodecContext.java:66)[119:org.opendaylight.mdsal.binding-dom-codec:0.9.0.SNAPSHOT]
at org.opendaylight.yangtools.binding.data.codec.impl.LazyDataObject.getBindingData(LazyDataObject.java:148)[119:org.opendaylight.mdsal.binding-dom-codec:0.9.0.SNAPSHOT]
at org.opendaylight.yangtools.binding.data.codec.impl.LazyDataObject.invoke(LazyDataObject.java:71)[119:org.opendaylight.mdsal.binding-dom-codec:0.9.0.SNAPSHOT]
at com.sun.proxy.$Proxy177.getProtocol(Unknown Source)[262:org.opendaylight.neutron.model:0.7.0.SNAPSHOT]
at org.opendaylight.netvirt.neutronvpn.NeutronSecurityRuleListener.toAceBuilder(NeutronSecurityRuleListener.java:139)[326:org.opendaylight.netvirt.neutronvpn-impl:0.3.0.SNAPSHOT]
at org.opendaylight.netvirt.neutronvpn.NeutronSecurityRuleListener.add(NeutronSecurityRuleListener.java:83)[326:org.opendaylight.netvirt.neutronvpn-impl:0.3.0.SNAPSHOT]
at org.opendaylight.netvirt.neutronvpn.NeutronSecurityRuleListener.add(NeutronSecurityRuleListener.java:51)[326:org.opendaylight.netvirt.neutronvpn-impl:0.3.0.SNAPSHOT]
at org.opendaylight.genius.datastoreutils.AsyncDataTreeChangeListenerBase$DataTreeChangeHandler.run(AsyncDataTreeChangeListenerBase.java:121)[296:org.opendaylight.genius.mdsalutil-api:0.1.0.SNAPSHOT]
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)[:1.8.0_71]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)[:1.8.0_71]
at java.lang.Thread.run(Thread.java:745)[:1.8.0_71]
Caused by: java.lang.ClassCastException: Cannot cast java.lang.String to java.lang.Short
at java.lang.invoke.MethodHandleImpl.newClassCastException(MethodHandleImpl.java:361)[:1.8.0_71]
at java.lang.invoke.MethodHandleImpl.castReference(MethodHandleImpl.java:356)[:1.8.0_71]
at org.opendaylight.yangtools.binding.data.codec.impl.UnionValueOptionContext.deserializeUnion(UnionValueOptionContext.java:64)[119:org.opendaylight.mdsal.binding-dom-codec:0.9.0.SNAPSHOT]
... 14 more
2016-07-04 11:46:05,294 | ERROR | pool-45-thread-1 | NeutronSecurityRuleListener | 326 - org.opendaylight.netvirt.neutronvpn-impl - 0.3.0.SNAPSHOT | Exception occured while adding acl for security rule:
java.lang.IllegalArgumentException: Failed to construct union for value neutron-constants:protocol-tcp
at org.opendaylight.yangtools.binding.data.codec.impl.UnionValueOptionContext.deserializeUnion(UnionValueOptionContext.java:66)[119:org.opendaylight.mdsal.binding-dom-codec:0.9.0.SNAPSHOT]
at org.opendaylight.yangtools.binding.data.codec.impl.UnionTypeCodec.deserialize(UnionTypeCodec.java:77)[119:org.opendaylight.mdsal.binding-dom-codec:0.9.0.SNAPSHOT]
at org.opendaylight.yangtools.binding.data.codec.impl.LeafNodeCodecContext.deserializeObject(LeafNodeCodecContext.java:199)[119:org.opendaylight.mdsal.binding-dom-codec:0.9.0.SNAPSHOT]
at org.opendaylight.yangtools.binding.data.codec.impl.DataObjectCodecContext.getBindingChildValue(DataObjectCodecContext.java:328)[119:org.opendaylight.mdsal.binding-dom-codec:0.9.0.SNAPSHOT]
at org.opendaylight.yangtools.binding.data.codec.impl.KeyedListNodeCodecContext.getBindingChildValue(KeyedListNodeCodecContext.java:66)[119:org.opendaylight.mdsal.binding-dom-codec:0.9.0.SNAPSHOT]
at org.opendaylight.yangtools.binding.data.codec.impl.LazyDataObject.getBindingData(LazyDataObject.java:148)[119:org.opendaylight.mdsal.binding-dom-codec:0.9.0.SNAPSHOT]
at org.opendaylight.yangtools.binding.data.codec.impl.LazyDataObject.invoke(LazyDataObject.java:71)[119:org.opendaylight.mdsal.binding-dom-codec:0.9.0.SNAPSHOT]
at com.sun.proxy.$Proxy177.getProtocol(Unknown Source)[262:org.opendaylight.neutron.model:0.7.0.SNAPSHOT]
at org.opendaylight.netvirt.neutronvpn.NeutronSecurityRuleListener.toAceBuilder(NeutronSecurityRuleListener.java:139)[326:org.opendaylight.netvirt.neutronvpn-impl:0.3.0.SNAPSHOT]
at org.opendaylight.netvirt.neutronvpn.NeutronSecurityRuleListener.add(NeutronSecurityRuleListener.java:83)[326:org.opendaylight.netvirt.neutronvpn-impl:0.3.0.SNAPSHOT]
at org.opendaylight.netvirt.neutronvpn.NeutronSecurityRuleListener.add(NeutronSecurityRuleListener.java:51)[326:org.opendaylight.netvirt.neutronvpn-impl:0.3.0.SNAPSHOT]
at org.opendaylight.genius.datastoreutils.AsyncDataTreeChangeListenerBase$DataTreeChangeHandler.run(AsyncDataTreeChangeListenerBase.java:121)[296:org.opendaylight.genius.mdsalutil-api:0.1.0.SNAPSHOT]
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)[:1.8.0_71]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)[:1.8.0_71]
at java.lang.Thread.run(Thread.java:745)[:1.8.0_71]
Caused by: java.lang.ClassCastException: Cannot cast java.lang.String to java.lang.Short
at java.lang.invoke.MethodHandleImpl.newClassCastException(MethodHandleImpl.java:361)[:1.8.0_71]
at java.lang.invoke.MethodHandleImpl.castReference(MethodHandleImpl.java:356)[:1.8.0_71]
at org.opendaylight.yangtools.binding.data.codec.impl.UnionValueOptionContext.deserializeUnion(UnionValueOptionContext.java:64)[119:org.opendaylight.mdsal.binding-dom-codec:0.9.0.SNAPSHOT]
... 14 more
|
|
i have checked with patch https://git.opendaylight.org/gerrit/#/c/40056/
it fails with this patch as well, attached the log file.
|
|
Attachment karaf.log has been added with description: attached log with patch - failed
|
|
Now I confirmed it. It occurs only when restconf is used.
neutron rest is used it doesn't occur.
As personal memo, the following command line is used.
curl --header "Accept: application/json" --header "Content-type: application/json" --user admin:admin -X POST -d '{ "security-rule":
{ "uuid": "d0d639a5-ca9a-44a9-97c6-603c176c9673","direction": "neutron-constants:direction-egress","ethertype": "neutron-constants:ethertype-v4","remote-group-id": "362cc56c-a9d4-4abc-9074-c5f83d305a2a","protocol": 6,"port-range-max": 80,"port-range-min": 70,"security-group-id": "362cc56c-a9d4-4abc-9074-c5f83d305a2b" }
}' http://localhost:8181/restconf/config/neutron:neutron/security-rules/
|
|
https://git.opendaylight.org/gerrit/#/c/41545/
|
|
i have verified with patch https://git.opendaylight.org/gerrit/#/c/41545/
it is passing for input-1 but failing for input-2.
input-1 :
{
"security-rule":
{
"uuid": "d0d639a5-ca9a-44a9-97c6-603c176c9675",
"direction": "neutron-constants:direction-egress",
"ethertype": "neutron-constants:ethertype-v4",
"remote-group-id": "362cc56c-a9d4-4abc-9074-c5f83d305a2a",
"protocol": "neutron-constants:protocol-tcp",
"port-range-max": 80,
"port-range-min": 70,
"security-group-id": "362cc56c-a9d4-4abc-9074-c5f83d305a2b"
}
}
Result: pass
input-2:
{
"security-rule":
{
"uuid": "d0d639a5-ca9a-44a9-97c6-603c176c9675",
"direction": "neutron-constants:direction-egress",
"ethertype": "neutron-constants:ethertype-v4",
"remote-group-id": "362cc56c-a9d4-4abc-9074-c5f83d305a2a",
"protocol": 6,
"port-range-max": 80,
"port-range-min": 70,
"security-group-id": "362cc56c-a9d4-4abc-9074-c5f83d305a2b"
}
}
Result: failed with below exception
2016-07-11 12:31:29,345 | ERROR | pool-46-thread-1 | NeutronSecurityRuleListener | 327 - org.opendaylight.netvirt.neutronvpn-impl - 0.3.0.SNAPSHOT | Exception occured while adding acl for security rule:
java.lang.ClassCastException: java.lang.Short cannot be cast to org.opendaylight.yangtools.yang.common.QName
at org.opendaylight.yangtools.binding.data.codec.impl.IdentityCodec.deserialize(IdentityCodec.java:17)[119:org.opendaylight.mdsal.binding-dom-codec:0.9.0.SNAPSHOT]
at org.opendaylight.yangtools.binding.data.codec.impl.UnionTypeCodec.deserialize(UnionTypeCodec.java:103)[119:org.opendaylight.mdsal.binding-dom-codec:0.9.0.SNAPSHOT]
at org.opendaylight.yangtools.binding.data.codec.impl.LeafNodeCodecContext.deserializeObject(LeafNodeCodecContext.java:199)[119:org.opendaylight.mdsal.binding-dom-codec:0.9.0.SNAPSHOT]
at org.opendaylight.yangtools.binding.data.codec.impl.DataObjectCodecContext.getBindingChildValue(DataObjectCodecContext.java:328)[119:org.opendaylight.mdsal.binding-dom-codec:0.9.0.SNAPSHOT]
at org.opendaylight.yangtools.binding.data.codec.impl.KeyedListNodeCodecContext.getBindingChildValue(KeyedListNodeCodecContext.java:66)[119:org.opendaylight.mdsal.binding-dom-codec:0.9.0.SNAPSHOT]
at org.opendaylight.yangtools.binding.data.codec.impl.LazyDataObject.getBindingData(LazyDataObject.java:148)[119:org.opendaylight.mdsal.binding-dom-codec:0.9.0.SNAPSHOT]
at org.opendaylight.yangtools.binding.data.codec.impl.LazyDataObject.invoke(LazyDataObject.java:71)[119:org.opendaylight.mdsal.binding-dom-codec:0.9.0.SNAPSHOT]
at com.sun.proxy.$Proxy177.getProtocol(Unknown Source)[263:org.opendaylight.neutron.model:0.7.0.SNAPSHOT]
at org.opendaylight.netvirt.neutronvpn.NeutronSecurityRuleListener.toAceBuilder(NeutronSecurityRuleListener.java:139)[327:org.opendaylight.netvirt.neutronvpn-impl:0.3.0.SNAPSHOT]
at org.opendaylight.netvirt.neutronvpn.NeutronSecurityRuleListener.add(NeutronSecurityRuleListener.java:83)[327:org.opendaylight.netvirt.neutronvpn-impl:0.3.0.SNAPSHOT]
at org.opendaylight.netvirt.neutronvpn.NeutronSecurityRuleListener.add(NeutronSecurityRuleListener.java:51)[327:org.opendaylight.netvirt.neutronvpn-impl:0.3.0.SNAPSHOT]
at org.opendaylight.genius.datastoreutils.AsyncDataTreeChangeListenerBase$DataTreeChangeHandler.run(AsyncDataTreeChangeListenerBase.java:121)[297:org.opendaylight.genius.mdsalutil-api:0.1.0.SNAPSHOT]
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)[:1.8.0_71]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)[:1.8.0_71]
at java.lang.Thread.run(Thread.java:745)[:1.8.0_71]
|
|
For protocol = 6 case,
https://git.opendaylight.org/gerrit/#/c/40056/
would help.
|
|
When i applied both patches, it is working for
input-1: "protocol": 6
Result : pass
input-2: "protocol": "neutron-constants:protocol-tcp"
Result: failed with below exception
2016-07-12 16:55:58,113 | ERROR | pool-46-thread-1 | NeutronSecurityRuleListener | 327 - org.opendaylight.netvirt.neutronvpn-impl - 0.3.0.SNAPSHOT | Exception occured while adding acl for security rule:
java.lang.IllegalArgumentException: Failed to construct union for value (urn:opendaylight:neutron-constants?revision=2015-07-12)protocol-tcp
at org.opendaylight.yangtools.binding.data.codec.impl.UnionValueOptionContext.deserializeUnion(UnionValueOptionContext.java:66)[119:org.opendaylight.mdsal.binding-dom-codec:0.9.0.SNAPSHOT]
at org.opendaylight.yangtools.binding.data.codec.impl.UnionTypeCodec.deserialize(UnionTypeCodec.java:77)[119:org.opendaylight.mdsal.binding-dom-codec:0.9.0.SNAPSHOT]
at org.opendaylight.yangtools.binding.data.codec.impl.LeafNodeCodecContext.deserializeObject(LeafNodeCodecContext.java:199)[119:org.opendaylight.mdsal.binding-dom-codec:0.9.0.SNAPSHOT]
at org.opendaylight.yangtools.binding.data.codec.impl.DataObjectCodecContext.getBindingChildValue(DataObjectCodecContext.java:328)[119:org.opendaylight.mdsal.binding-dom-codec:0.9.0.SNAPSHOT]
at org.opendaylight.yangtools.binding.data.codec.impl.KeyedListNodeCodecContext.getBindingChildValue(KeyedListNodeCodecContext.java:66)[119:org.opendaylight.mdsal.binding-dom-codec:0.9.0.SNAPSHOT]
at org.opendaylight.yangtools.binding.data.codec.impl.LazyDataObject.getBindingData(LazyDataObject.java:148)[119:org.opendaylight.mdsal.binding-dom-codec:0.9.0.SNAPSHOT]
at org.opendaylight.yangtools.binding.data.codec.impl.LazyDataObject.invoke(LazyDataObject.java:71)[119:org.opendaylight.mdsal.binding-dom-codec:0.9.0.SNAPSHOT]
at com.sun.proxy.$Proxy177.getProtocol(Unknown Source)[263:org.opendaylight.neutron.model:0.7.0.SNAPSHOT]
at org.opendaylight.netvirt.neutronvpn.NeutronSecurityRuleListener.toAceBuilder(NeutronSecurityRuleListener.java:139)[327:org.opendaylight.netvirt.neutronvpn-impl:0.3.0.SNAPSHOT]
at org.opendaylight.netvirt.neutronvpn.NeutronSecurityRuleListener.add(NeutronSecurityRuleListener.java:83)[327:org.opendaylight.netvirt.neutronvpn-impl:0.3.0.SNAPSHOT]
at org.opendaylight.netvirt.neutronvpn.NeutronSecurityRuleListener.add(NeutronSecurityRuleListener.java:51)[327:org.opendaylight.netvirt.neutronvpn-impl:0.3.0.SNAPSHOT]
at org.opendaylight.genius.datastoreutils.AsyncDataTreeChangeListenerBase$DataTreeChangeHandler.run(AsyncDataTreeChangeListenerBase.java:121)[297:org.opendaylight.genius.mdsalutil-api:0.1.0.SNAPSHOT]
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)[:1.8.0_71]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)[:1.8.0_71]
at java.lang.Thread.run(Thread.java:745)[:1.8.0_71]
Caused by: java.lang.ClassCastException: Cannot cast org.opendaylight.yangtools.yang.common.QName to java.lang.Short
at java.lang.invoke.MethodHandleImpl.newClassCastException(MethodHandleImpl.java:361)[:1.8.0_71]
at java.lang.invoke.MethodHandleImpl.castReference(MethodHandleImpl.java:356)[:1.8.0_71]
at org.opendaylight.yangtools.binding.data.codec.impl.UnionValueOptionContext.deserializeUnion(UnionValueOptionContext.java:64)[119:org.opendaylight.mdsal.binding-dom-codec:0.9.0.SNAPSHOT]
... 14 more
|
|
Finally we have four patches to address this bug.
https://git.opendaylight.org/gerrit/#/c/40056/
https://git.opendaylight.org/gerrit/#/c/41545/
https://git.opendaylight.org/gerrit/#/c/41742/
https://git.opendaylight.org/gerrit/#/c/41691/
|
|
I have verified with above mention 4 patches, it is working for below scenarios.
input-1: "protocol": 6
Result : pass
input-2: "protocol": "neutron-constants:protocol-tcp"
Result: pass
we can close the bug once these 4 patches are successfully merged.
|
|
Finally all the patches were merged.
The patch were modified according to patch review.
So can you please test it again, then this report can be closed.
|
|
verified for below scenario with latest build (Aug 1st):
case-1 : "protocol": 6
&
case-2 : "protocol": "neutron-constants:protocol-tcp"
it is working as expected for both scenario.
|
|
Thank you for confirmation!
|
Generated at Wed Feb 07 20:53:49 UTC 2024 using Jira 8.20.10#820010-sha1:ace47f9899e9ee25d7157d59aa17ab06aee30d3d.