[BGPCEP-249] RESTCONF configuration creates multiple module instances Created: 25/Jun/15  Updated: 03/Mar/19  Resolved: 29/Jun/15

Status: Resolved
Project: bgpcep
Component/s: BGP
Affects Version/s: Bugzilla Migration
Fix Version/s: Bugzilla Migration

Type: Bug
Reporter: Dana Kutenicsova Assignee: Unassigned
Resolution: Done 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: 3860
Priority: Normal

 Description   

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



 Comments   
Comment by Dana Kutenicsova [ 26/Jun/15 ]

https://git.opendaylight.org/gerrit/23264
https://git.opendaylight.org/gerrit/23265

Generated at Wed Feb 07 19:12:28 UTC 2024 using Jira 8.20.10#820010-sha1:ace47f9899e9ee25d7157d59aa17ab06aee30d3d.