|
ODL version : Lithium RC2 or any stable/lithium distribution
Steps to reproduce:
1. unpack ODL
2. feature:install odl-bgpcep-bgp-all odl-restconf-noauth odl-netconf-connector-all
3. configure RIB through REST
URL: http://localhost:8181/restconf/config/network-topology:network-topology/topology/topology-netconf/node/controller-config/yang-ext:mount/config:modules/module/odl-bgp-rib-impl-cfg:rib-impl/example-bgp-rib
METHOD:PUT
INPUT:
<module xmlns="urn:opendaylight:params:xml:ns:yang:controller:config">
<type xmlns:x="urn:opendaylight:params:xml:ns:yang:controller:bgp:rib:impl">x:rib-impl</type>
<name>example-bgp-rib</name>
<session-reconnect-strategy xmlns="urn:opendaylight:params:xml:ns:yang:controller:bgp:rib:impl">
<type xmlns:x="urn:opendaylight:params:xml:ns:yang:controller:protocol:framework">x:reconnect-strategy-factory</type>
<name>example-reconnect-strategy-factory</name>
</session-reconnect-strategy>
<rib-id xmlns="urn:opendaylight:params:xml:ns:yang:controller:bgp:rib:impl">example-bgp-rib</rib-id>
<extensions xmlns="urn:opendaylight:params:xml:ns:yang:controller:bgp:rib:impl">
<type xmlns:x="urn:opendaylight:params:xml:ns:yang:controller:bgp:rib:spi">x:extensions</type>
<name>global-rib-extensions</name>
</extensions>
<codec-tree-factory xmlns="urn:opendaylight:params:xml:ns:yang:controller:bgp:rib:impl">
<type xmlns:x="urn:opendaylight:params:xml:ns:yang:controller:md:sal:binding">x:binding-codec-tree-factory</type>
<name>runtime-mapping-singleton</name>
</codec-tree-factory>
<tcp-reconnect-strategy xmlns="urn:opendaylight:params:xml:ns:yang:controller:bgp:rib:impl">
<type xmlns:x="urn:opendaylight:params:xml:ns:yang:controller:protocol:framework">x:reconnect-strategy-factory</type>
<name>example-reconnect-strategy-factory</name>
</tcp-reconnect-strategy>
<data-provider xmlns="urn:opendaylight:params:xml:ns:yang:controller:bgp:rib:impl">
<type xmlns:x="urn:opendaylight:params:xml:ns:yang:controller:md:sal:binding">x:binding-async-data-broker</type>
<name>pingpong-binding-data-broker</name>
</data-provider>
<local-as xmlns="urn:opendaylight:params:xml:ns:yang:controller:bgp:rib:impl">72</local-as>
<bgp-dispatcher xmlns="urn:opendaylight:params:xml:ns:yang:controller:bgp:rib:impl">
<type>bgp-dispatcher</type>
<name>global-bgp-dispatcher</name>
</bgp-dispatcher>
<dom-data-provider xmlns="urn:opendaylight:params:xml:ns:yang:controller:bgp:rib:impl">
<type xmlns:x="urn:opendaylight:params:xml:ns:yang:controller:md:sal:dom">x:dom-async-data-broker</type>
<name>pingpong-broker</name>
</dom-data-provider>
<local-table xmlns="urn:opendaylight:params:xml:ns:yang:controller:bgp:rib:impl">
<type>bgp-table-type</type>
<name>ipv4-unicast</name>
</local-table>
<local-table xmlns="urn:opendaylight:params:xml:ns:yang:controller:bgp:rib:impl">
<type>bgp-table-type</type>
<name>ipv6-unicast</name>
</local-table>
<local-table xmlns="urn:opendaylight:params:xml:ns:yang:controller:bgp:rib:impl">
<type>bgp-table-type</type>
<name>linkstate</name>
</local-table>
<local-table xmlns="urn:opendaylight:params:xml:ns:yang:controller:bgp:rib:impl">
<type>bgp-table-type</type>
<name>flowspec</name>
</local-table>
<bgp-rib-id xmlns="urn:opendaylight:params:xml:ns:yang:controller:bgp:rib:impl">10.25.2.9</bgp-rib-id>
</module>
4. Configure peer
URL: http://pce-guest29.cisco.com:8181/restconf/config/network-topology:network-topology/topology/topology-netconf/node/controller-config/yang-ext:mount/config:modules/
METHOD:POST
INPUT:
<module xmlns="urn:opendaylight:params:xml:ns:yang:controller:config">
<type xmlns:x="urn:opendaylight:params:xml:ns:yang:controller:bgp:rib:impl">x:bgp-peer</type>
<name>example-bgp-peer</name>
<host xmlns="urn:opendaylight:params:xml:ns:yang:controller:bgp:rib:impl">10.25.2.27</host>
<holdtimer xmlns="urn:opendaylight:params:xml:ns:yang:controller:bgp:rib:impl">180</holdtimer>
<peer-role xmlns="urn:opendaylight:params:xml:ns:yang:controller:bgp:rib:impl">ebgp</peer-role>
<rib xmlns="urn:opendaylight:params:xml:ns:yang:controller:bgp:rib:impl">
<type xmlns:x="urn:opendaylight:params:xml:ns:yang:controller:bgp:rib:cfg">x:rib</type>
<name>example-bgp-rib</name>
</rib>
<peer-registry xmlns="urn:opendaylight:params:xml:ns:yang:controller:bgp:rib:impl">
<type xmlns:x="urn:opendaylight:params:xml:ns:yang:controller:bgp:rib:impl">x:bgp-peer-registry</type>
<name>global-bgp-peer-registry</name>
</peer-registry>
<advertized-table xmlns="urn:opendaylight:params:xml:ns:yang:controller:bgp:rib:impl">
<type xmlns:x="urn:opendaylight:params:xml:ns:yang:controller:bgp:rib:impl">x:bgp-table-type</type>
<name>ipv4-unicast</name>
</advertized-table>
<advertized-table xmlns="urn:opendaylight:params:xml:ns:yang:controller:bgp:rib:impl">
<type xmlns:x="urn:opendaylight:params:xml:ns:yang:controller:bgp:rib:impl">x:bgp-table-type</type>
<name>ipv6-unicast</name>
</advertized-table>
<advertized-table xmlns="urn:opendaylight:params:xml:ns:yang:controller:bgp:rib:impl">
<type xmlns:x="urn:opendaylight:params:xml:ns:yang:controller:bgp:rib:impl">x:bgp-table-type</type>
<name>linkstate</name>
</advertized-table>
<advertized-table xmlns="urn:opendaylight:params:xml:ns:yang:controller:bgp:rib:impl">
<type xmlns:x="urn:opendaylight:params:xml:ns:yang:controller:bgp:rib:impl">x:bgp-table-type</type>
<name>flowspec</name>
</advertized-table>
</module>
Results in multiple threads accessing DS (ConflictingModificationAppliedException: Node was replaced by other transaction.)
Observed multiple threads calling onDataChange with the same data:
2015-06-25 09:12:24,607 | TRACE | lt-dispatcher-30 | LocRibWriter | 227 - org.opendaylight.bgpcep.bgp-rib-impl - 0.4.0.SNAPSHOT | Received data change to LocRib [DefaultDataTreeCandidate{rootPath=/(urn:opendaylight:params:xml:ns:yang:bgp-rib?revision=2013-09-25)bgp-rib/rib/rib[
{(urn:opendaylight:params:xml:ns:yang:bgp-rib?revision=2013-09-25)id=example-bgp-rib}
]/peer/peer[
{(urn:opendaylight:params:xml:ns:yang:bgp-rib?revision=2013-09-25)peer-id=bgp://40.40.40.40}
], rootNode=org.opendaylight.yangtools.yang.data.impl.schema.tree.AbstractModifiedNodeBasedCandidateNode$ChildNode@14c1d033}]
2015-06-25 09:12:24,607 | TRACE | ult-dispatcher-4 | LocRibWriter | 227 - org.opendaylight.bgpcep.bgp-rib-impl - 0.4.0.SNAPSHOT | Received data change to LocRib [DefaultDataTreeCandidate{rootPath=/(urn:opendaylight:params:xml:ns:yang:bgp-rib?revision=2013-09-25)bgp-rib/rib/rib[
{(urn:opendaylight:params:xml:ns:yang:bgp-rib?revision=2013-09-25)id=example-bgp-rib}
]/peer/peer[
{(urn:opendaylight:params:xml:ns:yang:bgp-rib?revision=2013-09-25)peer-id=bgp://40.40.40.40}
], rootNode=org.opendaylight.yangtools.yang.data.impl.schema.tree.AbstractModifiedNodeBasedCandidateNode$ChildNode@14c1d033}]
2015-06-25 09:12:24,608 | TRACE | lt-dispatcher-14 | LocRibWriter | 227 - org.opendaylight.bgpcep.bgp-rib-impl - 0.4.0.SNAPSHOT | Received data change to LocRib [DefaultDataTreeCandidate{rootPath=/(urn:opendaylight:params:xml:ns:yang:bgp-rib?revision=2013-09-25)bgp-rib/rib/rib[
{(urn:opendaylight:params:xml:ns:yang:bgp-rib?revision=2013-09-25)id=example-bgp-rib}
]/peer/peer[
{(urn:opendaylight:params:xml:ns:yang:bgp-rib?revision=2013-09-25)peer-id=bgp://40.40.40.40}
], rootNode=org.opendaylight.yangtools.yang.data.impl.schema.tree.AbstractModifiedNodeBasedCandidateNode$ChildNode@14c1d033}]
2015-06-25 09:12:24,608 | TRACE | lt-dispatcher-22 | LocRibWriter | 227 - org.opendaylight.bgpcep.bgp-rib-impl - 0.4.0.SNAPSHOT | Received data change to LocRib [DefaultDataTreeCandidate{rootPath=/(urn:opendaylight:params:xml:ns:yang:bgp-rib?revision=2013-09-25)bgp-rib/rib/rib[
{(urn:opendaylight:params:xml:ns:yang:bgp-rib?revision=2013-09-25)id=example-bgp-rib}
]/peer/peer[
{(urn:opendaylight:params:xml:ns:yang:bgp-rib?revision=2013-09-25)peer-id=bgp://40.40.40.40}
], rootNode=org.opendaylight.yangtools.yang.data.impl.schema.tree.AbstractModifiedNodeBasedCandidateNode$ChildNode@14c1d033}]
2015-06-25 09:12:24,609 | TRACE | lt-dispatcher-25 | LocRibWriter | 227 - org.opendaylight.bgpcep.bgp-rib-impl - 0.4.0.SNAPSHOT | Received data change to LocRib [DefaultDataTreeCandidate{rootPath=/(urn:opendaylight:params:xml:ns:yang:bgp-rib?revision=2013-09-25)bgp-rib/rib/rib[
{(urn:opendaylight:params:xml:ns:yang:bgp-rib?revision=2013-09-25)id=example-bgp-rib}
]/peer/peer[
{(urn:opendaylight:params:xml:ns:yang:bgp-rib?revision=2013-09-25)peer-id=bgp://40.40.40.40}
], rootNode=org.opendaylight.yangtools.yang.data.impl.schema.tree.AbstractModifiedNodeBasedCandidateNode$ChildNode@14c1d033}]
This does not happen if the same inputs are put manually in 41-bgp-example.xml
|