[VPNSERVICE-2] Invalid range Exception in setDpnId Created: 20/May/15  Updated: 30/Oct/17  Resolved: 22/May/15

Status: Resolved
Project: vpnservice
Component/s: General
Affects Version/s: unspecified
Fix Version/s: None

Type: Bug
Reporter: Vishal Thapar Assignee: Vishal Thapar
Resolution: Done Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

Operating System: All
Platform: All


Severity: critical
External issue ID: 3292

 Description   

Ran into following exception when trying to configure VPnInterface when using vpnservice with openstack/OVSDB.

2015-05-19 23:46:16,518 | ERROR | ult-dispatcher-3 | DataChangeListener | 276 - org.opendaylight.controller.sal-distributed-datastore - 1.2.0.SNAPSHOT | Error notifying listener org.opendaylight.vpnservice.fibmanager.FibManager
java.lang.IllegalArgumentException: Invalid range: 262702505666885, expected: [[0?4294967295]].
at org.opendaylight.yang.gen.v1.urn.opendaylight.vpnservice.l3nexthop.rev150409.GetEgressPointerInputBuilder.setDpnId(GetEgressPointerInputBuilder.java:85)[356:org.opendaylight.vpnservice.nexthopmgr-api:0.1.0.SNAPSHOT]
at org.opendaylight.vpnservice.fibmanager.FibManager.resolveAdjacency(FibManager.java:416)[367:org.opendaylight.vpnservice.fibmanager-impl:0.1.0.SNAPSHOT]
at org.opendaylight.vpnservice.fibmanager.FibManager.addRouteInternal(FibManager.java:193)[367:org.opendaylight.vpnservice.fibmanager-impl:0.1.0.SNAPSHOT]
at org.opendaylight.vpnservice.fibmanager.FibManager.createFibEntries(FibManager.java:184)[367:org.opendaylight.vpnservice.fibmanager-impl:0.1.0.SNAPSHOT]
at org.opendaylight.vpnservice.fibmanager.FibManager.add(FibManager.java:160)[367:org.opendaylight.vpnservice.fibmanager-impl:0.1.0.SNAPSHOT]

When using mininet dpnId is within range for 'long' but with OVSDB it uses a dpnid which is bigger than that. Note that most physical switches use a combination of mac-address and/or some other parameter to generate DatapathId, so dpnId will most of the times be bigger than range for long.



 Comments   
Comment by Vishal Thapar [ 20/May/15 ]

Correction: long is 64bit, so that is not the issue. Problem is that l3nexthop.yang defines dpnId as uint32:

rpc getEgressPointer {
description "returns egress pointer, an OF Group Id";
input {
leaf dpnId

{type uint32;}
leaf vpnId { type uint32;} /* optional */
leaf ipPrefix {type string;}
leaf nexthopIp {type string;}
}
output {
leaf egressPointer {type uint32;}


leaf localDestination

{type boolean;}

}
}

So, when trying to set a dpnInd with bigger value than uint32, it is causing this exception.

Comment by Vishal Thapar [ 22/May/15 ]

Fixed by:
https://git.opendaylight.org/gerrit/20881
https://git.opendaylight.org/gerrit/20938

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