[NETVIRT-550] Conflicting modification on VpnInterface creation for router-interface in newton Created: 20/Mar/17  Updated: 30/Oct/17  Resolved: 10/Apr/17

Status: Resolved
Project: netvirt
Component/s: General
Affects Version/s: Carbon
Fix Version/s: None

Type: Bug
Reporter: Janki Chhatbar Assignee: Tali Ben-Meir
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: 8020

 Description   

2017-03-19 23:28:59,009 | WARN | lt-dispatcher-19 | ShardDataTree | 218 - org.opendaylight.controller.sal-distributed-datastore - 1.5.0.SNAPSHOT | member-1-shard-default-config: Store Tx member-1-datastore-config-fe-0-txn-31370-0: Conflicting modification for path /(urn:huawei:params:xml:ns:yang:l3vpn?revision=2014-08-15)vpn-interfaces/vpn-interface/vpn-interface[

{(urn:huawei:params:xml:ns:yang:l3vpn?revision=2014-08-15)name=8434f949-bc03-4ce1-8395-9285f4561348}

].
2017-03-19 23:28:59,009 | WARN | ult-dispatcher-5 | ConcurrentDOMDataBroker | 218 - org.opendaylight.controller.sal-distributed-datastore - 1.5.0.SNAPSHOT | Tx: DOM-46793 Error during phase CAN_COMMIT, starting Abort
OptimisticLockFailedException

{message=Optimistic lock failed., errorList=[RpcError [message=Optimistic lock failed., severity=ERROR, errorType=APPLICATION, tag=resource-denied, applicationTag=null, info=null, cause=org.opendaylight.yangtools.yang.data.api.schema.tree.ConflictingModificationAppliedException: Node was created by other transaction.]]}

at org.opendaylight.controller.cluster.datastore.ShardDataTree.lambda$processNextPendingTransaction$0(ShardDataTree.java:682)[218:org.opendaylight.controller.sal-distributed-datastore:1.5.0.SNAPSHOT]
at org.opendaylight.controller.cluster.datastore.ShardDataTree.processNextPending(ShardDataTree.java:720)[218:org.opendaylight.controller.sal-distributed-datastore:1.5.0.SNAPSHOT]
at org.opendaylight.controller.cluster.datastore.ShardDataTree.processNextPendingTransaction(ShardDataTree.java:667)[218:org.opendaylight.controller.sal-distributed-datastore:1.5.0.SNAPSHOT]
at org.opendaylight.controller.cluster.datastore.ShardDataTree.startCanCommit(ShardDataTree.java:746)[218:org.opendaylight.controller.sal-distributed-datastore:1.5.0.SNAPSHOT]
at org.opendaylight.controller.cluster.datastore.SimpleShardDataTreeCohort.canCommit(SimpleShardDataTreeCohort.java:76)[218:org.opendaylight.controller.sal-distributed-datastore:1.5.0.SNAPSHOT]
at org.opendaylight.controller.cluster.datastore.CohortEntry.canCommit(CohortEntry.java:97)[218:org.opendaylight.controller.sal-distributed-datastore:1.5.0.SNAPSHOT]
at org.opendaylight.controller.cluster.datastore.ShardCommitCoordinator.handleCanCommit(ShardCommitCoordinator.java:236)[218:org.opendaylight.controller.sal-distributed-datastore:1.5.0.SNAPSHOT]
at org.opendaylight.controller.cluster.datastore.ShardCommitCoordinator.handleReadyLocalTransaction(ShardCommitCoordinator.java:200)[218:org.opendaylight.controller.sal-distributed-datastore:1.5.0.SNAPSHOT]
at org.opendaylight.controller.cluster.datastore.Shard.handleReadyLocalTransaction(Shard.java:573)[218:org.opendaylight.controller.sal-distributed-datastore:1.5.0.SNAPSHOT]
at org.opendaylight.controller.cluster.datastore.Shard.handleNonRaftCommand(Shard.java:296)[218:org.opendaylight.controller.sal-distributed-datastore:1.5.0.SNAPSHOT]
at org.opendaylight.controller.cluster.raft.RaftActor.handleCommand(RaftActor.java:268)[212:org.opendaylight.controller.sal-akka-raft:1.5.0.SNAPSHOT]
at org.opendaylight.controller.cluster.common.actor.AbstractUntypedPersistentActor.onReceiveCommand(AbstractUntypedPersistentActor.java:31)[211:org.opendaylight.controller.sal-clustering-commons:1.5.0.SNAPSHOT]
at akka.persistence.UntypedPersistentActor.onReceive(PersistentActor.scala:170)[192:com.typesafe.akka.persistence:2.4.17]
at org.opendaylight.controller.cluster.common.actor.MeteringBehavior.apply(MeteringBehavior.java:104)[211:org.opendaylight.controller.sal-clustering-commons:1.5.0.SNAPSHOT]
at akka.actor.ActorCell$$anonfun$become$1.applyOrElse(ActorCell.scala:544)[185:com.typesafe.akka.actor:2.4.17]
at akka.actor.Actor$class.aroundReceive(Actor.scala:497)[185:com.typesafe.akka.actor:2.4.17]
at akka.persistence.UntypedPersistentActor.akka$persistence$Eventsourced$$super$aroundReceive(PersistentActor.scala:168)[192:com.typesafe.akka.persistence:2.4.17]
at akka.persistence.Eventsourced$$anon$1.stateReceive(Eventsourced.scala:664)[192:com.typesafe.akka.persistence:2.4.17]
at akka.persistence.Eventsourced$class.aroundReceive(Eventsourced.scala:183)[192:com.typesafe.akka.persistence:2.4.17]
at akka.persistence.UntypedPersistentActor.aroundReceive(PersistentActor.scala:168)[192:com.typesafe.akka.persistence:2.4.17]
at akka.actor.ActorCell.receiveMessage(ActorCell.scala:526)[185:com.typesafe.akka.actor:2.4.17]
at akka.actor.ActorCell.invoke(ActorCell.scala:495)[185:com.typesafe.akka.actor:2.4.17]
at akka.dispatch.Mailbox.processMailbox(Mailbox.scala:257)[185:com.typesafe.akka.actor:2.4.17]
at akka.dispatch.Mailbox.run(Mailbox.scala:224)[185:com.typesafe.akka.actor:2.4.17]
at akka.dispatch.Mailbox.exec(Mailbox.scala:234)[185:com.typesafe.akka.actor:2.4.17]
at scala.concurrent.forkjoin.ForkJoinTask.doExec(ForkJoinTask.java:260)[181:org.scala-lang.scala-library:2.11.8.v20160304-115712-1706a37eb8]
at scala.concurrent.forkjoin.ForkJoinPool$WorkQueue.runTask(ForkJoinPool.java:1339)[181:org.scala-lang.scala-library:2.11.8.v20160304-115712-1706a37eb8]
at scala.concurrent.forkjoin.ForkJoinPool.runWorker(ForkJoinPool.java:1979)[181:org.scala-lang.scala-library:2.11.8.v20160304-115712-1706a37eb8]
at scala.concurrent.forkjoin.ForkJoinWorkerThread.run(ForkJoinWorkerThread.java:107)[181:org.scala-lang.scala-library:2.11.8.v20160304-115712-1706a37eb8]
Caused by: org.opendaylight.yangtools.yang.data.api.schema.tree.ConflictingModificationAppliedException: Node was created by other transaction.
at org.opendaylight.yangtools.yang.data.impl.schema.tree.SchemaAwareApplyOperation.checkWriteApplicable(SchemaAwareApplyOperation.java:174)[108:org.opendaylight.yangtools.yang-data-impl:1.1.0.SNAPSHOT]
at org.opendaylight.yangtools.yang.data.impl.schema.tree.SchemaAwareApplyOperation.checkApplicable(SchemaAwareApplyOperation.java:128)[108:org.opendaylight.yangtools.yang-data-impl:1.1.0.SNAPSHOT]
at org.opendaylight.yangtools.yang.data.impl.schema.tree.AbstractNodeContainerModificationStrategy.checkChildPreconditions(AbstractNodeContainerModificationStrategy.java:305)[108:org.opendaylight.yangtools.yang-data-impl:1.1.0.SNAPSHOT]
at org.opendaylight.yangtools.yang.data.impl.schema.tree.AbstractNodeContainerModificationStrategy.checkMergeApplicable(AbstractNodeContainerModificationStrategy.java:313)[108:org.opendaylight.yangtools.yang-data-impl:1.1.0.SNAPSHOT]
at org.opendaylight.yangtools.yang.data.impl.schema.tree.SchemaAwareApplyOperation.checkApplicable(SchemaAwareApplyOperation.java:131)[108:org.opendaylight.yangtools.yang-data-impl:1.1.0.SNAPSHOT]
at org.opendaylight.yangtools.yang.data.impl.schema.tree.AbstractNodeContainerModificationStrategy.checkChildPreconditions(AbstractNodeContainerModificationStrategy.java:305)[108:org.opendaylight.yangtools.yang-data-impl:1.1.0.SNAPSHOT]
at org.opendaylight.yangtools.yang.data.impl.schema.tree.AbstractNodeContainerModificationStrategy.checkTouchApplicable(AbstractNodeContainerModificationStrategy.java:288)[108:org.opendaylight.yangtools.yang-data-impl:1.1.0.SNAPSHOT]
at org.opendaylight.yangtools.yang.data.impl.schema.tree.SchemaAwareApplyOperation.checkApplicable(SchemaAwareApplyOperation.java:125)[108:org.opendaylight.yangtools.yang-data-impl:1.1.0.SNAPSHOT]
at org.opendaylight.yangtools.yang.data.impl.schema.tree.StructuralContainerModificationStrategy.checkApplicable(StructuralContainerModificationStrategy.java:99)[108:org.opendaylight.yangtools.yang-data-impl:1.1.0.SNAPSHOT]
at org.opendaylight.yangtools.yang.data.impl.schema.tree.AbstractNodeContainerModificationStrategy.checkChildPreconditions(AbstractNodeContainerModificationStrategy.java:305)[108:org.opendaylight.yangtools.yang-data-impl:1.1.0.SNAPSHOT]
at org.opendaylight.yangtools.yang.data.impl.schema.tree.AbstractNodeContainerModificationStrategy.checkTouchApplicable(AbstractNodeContainerModificationStrategy.java:288)[108:org.opendaylight.yangtools.yang-data-impl:1.1.0.SNAPSHOT]
at org.opendaylight.yangtools.yang.data.impl.schema.tree.SchemaAwareApplyOperation.checkApplicable(SchemaAwareApplyOperation.java:125)[108:org.opendaylight.yangtools.yang-data-impl:1.1.0.SNAPSHOT]
at org.opendaylight.yangtools.yang.data.impl.schema.tree.RootModificationApplyOperation.checkApplicable(RootModificationApplyOperation.java:72)[108:org.opendaylight.yangtools.yang-data-impl:1.1.0.SNAPSHOT]
at org.opendaylight.yangtools.yang.data.impl.schema.tree.AbstractDataTreeTip.validate(AbstractDataTreeTip.java:35)[108:org.opendaylight.yangtools.yang-data-impl:1.1.0.SNAPSHOT]
at org.opendaylight.controller.cluster.datastore.ShardDataTree.lambda$processNextPendingTransaction$0(ShardDataTree.java:674)[218:org.opendaylight.controller.sal-distributed-datastore:1.5.0.SNAPSHOT]
... 28 more



 Comments   
Comment by Tali Ben-Meir [ 06/Apr/17 ]

Attempting to create the same VpnInterface for a given router interface twice in newton.
The first router-interface port added does not contain device-owner and device-id hence it is added as a normal port and also to the subnetmap ports.
When update arrives containing the device-owner and device-id, VpnInterface creation occurs twice since the leg has already been added as a normal port to the subnet.

q-svc log with empty device-id/owner for router interface

2017-04-04 15:53:38.214 11154 DEBUG networking_odl.common.client [-] Sending METHOD (post) URL (http://10.29.14.221:8080/controller/nb/v2/neutron/ports) JSON ({
"port": {
"port_security_enabled": true,
"binding:host_id": "",
"name": "",
"allowed_address_pairs": [],
"admin_state_up": true,
"network_id": "0c0f8c8e-9a07-4e31-bf68-1906a0afcfdb",
"tenant_id": "df362640e6cc40a188319a112dc6337b",
"binding:vif_details": {},
"binding:vnic_type": "normal",
"binding:vif_type": "unbound",
"device_owner": "",
"mac_address": "fa:16:3e:12:56:30",
"binding:profile": {},
"project_id": "df362640e6cc40a188319a112dc6337b",
"fixed_ips": [

{ "subnet_id": "37d3b445-69a3-4e4e-a192-33f881dcf87a", "ip_address": "10.0.0.7" }

],
"id": "e01dd93e-bf25-4b86-947b-f3f9f3f9fbed",
"security_groups": [

{ "id": "2f409e85-d5fd-4c47-9df4-14477f424e40" }

],
"device_id": ""
}

odl log

2017-04-04 15:53:39,009 | INFO | eChangeHandler-0 | NeutronvpnManager | 343 - org.opendaylight.netvirt.neutronvpn-impl - 0.4.0.SNAPSHOT | Creating vpn interface VpnInterface [_key=VpnInterfaceKey [_name=e01dd93e-bf25-4b86-947b-f3f9f3f9fbed], _name=e01dd93e-bf25-4b86-947b-f3f9f3f9fbed, _vpnInstanceName=361c4de0-9289-4349-b0bf-425374f3ef06, _isRouterInterface=true, augmentation=[Adjacencies [_adjacency=[Adjacency [_ipAddress=10.0.0.7/32, _key=AdjacencyKey [_ipAddress=10.0.0.7/32], _macAddress=fa:16:3e:12:56:30, _subnetId=Uuid [_value=37d3b445-69a3-4e4e-a192-33f881dcf87a], _primaryAdjacency=true, augmentation=[]]]]]]
2017-04-04 15:53:39,011 | INFO | nPool-1-worker-2 | NeutronvpnManager | 343 - org.opendaylight.netvirt.neutronvpn-impl - 0.4.0.SNAPSHOT | Creating vpn interface VpnInterface [_key=VpnInterfaceKey [_name=e01dd93e-bf25-4b86-947b-f3f9f3f9fbed], _name=e01dd93e-bf25-4b86-947b-f3f9f3f9fbed, _vpnInstanceName=361c4de0-9289-4349-b0bf-425374f3ef06, _isRouterInterface=true, augmentation=[Adjacencies [_adjacency=[Adjacency [_ipAddress=10.0.0.7/32, _key=AdjacencyKey [_ipAddress=10.0.0.7/32], _macAddress=fa:16:3e:12:56:30, _subnetId=Uuid [_value=37d3b445-69a3-4e4e-a192-33f881dcf87a], _primaryAdjacency=true, augmentation=[]]]]]]

Comment by Tali Ben-Meir [ 10/Apr/17 ]

Review link: https://git.opendaylight.org/gerrit/#/c/54410/

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