[HONEYVBD-3] NPE when putting certain data into WriteTransaction Created: 21/Jun/16  Updated: 19/Oct/17  Resolved: 21/Jun/16

Status: Resolved
Project: honeycomb-vbd
Component/s: General
Affects Version/s: unspecified
Fix Version/s: None

Type: Bug
Reporter: Tomas Cechvala Assignee: Unassigned
Resolution: Cannot Reproduce 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: 6094

 Description   

Cannot put vlan type topology into WriteTransaction.

The problem occurs when node-vbridge-vlan-augmentation is filled out
https://github.com/opendaylight/honeycomb-vbd/blob/master/api/src/main/yang/vlan-tunnel.yang

If it's not specified, put is executed successfully.

I tried this other way round by putting the data via Restconf - they were stored in datastore successfully.

How to replicate this:

build latest groupbasedpolicy distribution
https://github.com/opendaylight/groupbasedpolicy/tree/master/distribution-karaf

feature:install odl-vbd-ui odl-groupbasedpolicy-vpp odl-restconf
PUT the following data from these collection in order
https://www.getpostman.com/collections/d91d74158795bd60d8d5
(there is one PUT which only shows what data should be written to DS. Note, that it's possible to write them via Restconf as I mentioned above)

You should see NPE in log, notice the following piece in stacktrace

at org.opendaylight.controller.md.sal.binding.impl.BindingToNormalizedNodeCodec.toNormalizedNode(BindingToNormalizedNodeCodec.java:132)[183:org.opendaylight.controller.sal-binding-broker-impl:1.4.0.SNAPSHOT]
at org.opendaylight.controller.md.sal.binding.impl.AbstractWriteTransaction.put(AbstractWriteTransaction.java:39)[183:org.opendaylight.controller.sal-binding-broker-impl:1.4.0.SNAPSHOT]
at org.opendaylight.groupbasedpolicy.renderer.vpp.policy.BridgeDomainManagerImpl$2.apply(BridgeDomainManagerImpl.java:210)

That line 210 where put is called fires the error.



 Comments   
Comment by Tomas Cechvala [ 21/Jun/16 ]

BridgeDomainManagerImp
https://github.com/opendaylight/groupbasedpolicy/blob/b8d10f217006b443cb01ca8d361ac1907ae0c925/renderers/vpp/src/main/java/org/opendaylight/groupbasedpolicy/renderer/vpp/policy/BridgeDomainManagerImpl.java

Comment by Tomas Cechvala [ 21/Jun/16 ]

So just after reporting this the cause was find.

The class of augmentation should have been specified by NodeVbridgeVlanAugment.class and not object.getClass() because it returns NodeVbridgeVlanAugmentImpl

It will be fixed in GBP.

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