[BGPCEP-774] Adding BGP neighbor via restconf does not work according bgp-user-guide Created: 22/Mar/18 Updated: 27/Mar/18 Resolved: 23/Mar/18 |
|
| Status: | Verified |
| Project: | bgpcep |
| Component/s: | BGP |
| Affects Version/s: | Nitrogen |
| Fix Version/s: | Nitrogen |
| Type: | Bug | Priority: | Medium |
| Reporter: | Jiri Prokes | Assignee: | Claudio David Gasparini |
| Resolution: | Done | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Description |
|
I have configured ODL BGP with several BGP neighbors. I tried to follow bgp user guide http://docs.opendaylight.org/en/stable-nitrogen/user-guide/bgp-user-guide.html Nevertheless I got it running only when I configured all neighbors inside etc/opendaylight/bgp/protocols-config.xml.
If I tried to add new neighbor via restconf it appeared just in config tree but it was not populated to operational tree. Is it bug in code or in documentation?
Steps to reproduce: I removed one neighbor from etc/opendaylight/bgp/protocols-config.xml and start fresh odl Then I added that neighbor via postman:
Body: <neighbor xmlns="urn:opendaylight:params:xml:ns:yang:bgp:openconfig-extensions"> <neighbor-address>10.166.30.38</neighbor-address> <timers> <config> <hold-time>90</hold-time> <connect-retry>10</connect-retry> </config> </timers> <transport> <config> <remote-port>179</remote-port> <passive-mode>false</passive-mode> </config> </transport> <config> <peer-type>EXTERNAL</peer-type> <peer-as>65102</peer-as> </config> </neighbor>
In karaf.log I can find following exception: 2018-03-21 14:06:36,440 | DEBUG | on-dispatcher-75 | BgpDeployerImpl | 202 - org.opendaylight.bgpcep.bgp-rib-impl - 0.8.1 | Creating Peer instance with configuration: Neighbor{getConfig=Config{getPeerAs=AsNumber [_value=65102], getPeerType=EXTERNAL, getSendCommunity=NONE, isRouteFlapDamping=false, augmentations={}}, getNeighborAddress=IpAddress [_ipv4Address=Ipv4Address [_value=10.166.30.38]], getTimers=Timers{getConfig=Config{getConnectRetry=10, getHoldTime=90, getKeepaliveInterval=30, getMinimumAdvertisementInterval=30, augmentations={}}, augmentations={}}, getTransport=Transport{getConfig=Config{isMtuDiscovery=false, isPassiveMode=false, augmentations={interface org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.openconfig.extensions.rev160614.Config1=Config1 {getRemotePort=PortNumber [_value=179]}}}, augmentations={}}, augmentations={}} 2018-03-21 14:06:36,442 | ERROR | on-dispatcher-75 | DataTreeChangeListenerActor | 238 - org.opendaylight.controller.sal-clustering-commons - 1.6.1 | member-1-shard-default-config: Error notifying listener org.opendaylight.protocol.bgp.rib.impl.config.BgpDeployerImpl@2deb15 java.lang.NullPointerException at com.google.common.base.Preconditions.checkNotNull(Preconditions.java:782)[27:com.google.guava:22.0.0] at org.opendaylight.protocol.bgp.rib.impl.config.BgpPeer$BgpPeerSingletonService.<init>(BgpPeer.java:241)[202:org.opendaylight.bgpcep.bgp-rib-impl:0.8.1] at org.opendaylight.protocol.bgp.rib.impl.config.BgpPeer$BgpPeerSingletonService.<init>(BgpPeer.java:221)[202:org.opendaylight.bgpcep.bgp-rib-impl:0.8.1] at org.opendaylight.protocol.bgp.rib.impl.config.BgpPeer.start(BgpPeer.java:89)[202:org.opendaylight.bgpcep.bgp-rib-impl:0.8.1] at org.opendaylight.protocol.bgp.rib.impl.config.BgpDeployerImpl.initiatePeerInstance(BgpDeployerImpl.java:343)[202:org.opendaylight.bgpcep.bgp-rib-impl:0.8.1] at org.opendaylight.protocol.bgp.rib.impl.config.BgpDeployerImpl.onNeighborCreated(BgpDeployerImpl.java:297)[202:org.opendaylight.bgpcep.bgp-rib-impl:0.8.1] at org.opendaylight.protocol.bgp.rib.impl.config.BgpDeployerImpl.onNeighborModified(BgpDeployerImpl.java:281)[202:org.opendaylight.bgpcep.bgp-rib-impl:0.8.1] at org.opendaylight.protocol.bgp.rib.impl.config.BgpDeployerImpl.onNeighborsChanged(BgpDeployerImpl.java:267)[202:org.opendaylight.bgpcep.bgp-rib-impl:0.8.1] at org.opendaylight.protocol.bgp.rib.impl.config.BgpDeployerImpl.onDataTreeChanged(BgpDeployerImpl.java:116)[202:org.opendaylight.bgpcep.bgp-rib-impl:0.8.1] at org.opendaylight.controller.md.sal.binding.impl.BindingDOMDataTreeChangeListenerAdapter.onDataTreeChanged(BindingDOMDataTreeChangeListenerAdapter.java:41)[232:org.opendaylight.controller.sal-binding-broker-impl:1.6.1] at org.opendaylight.controller.cluster.datastore.DataTreeChangeListenerActor.dataChanged(DataTreeChangeListenerActor.java:67)[245:org.opendaylight.controller.sal-distributed-datastore:1.6.1] at org.opendaylight.controller.cluster.datastore.DataTreeChangeListenerActor.handleReceive(DataTreeChangeListenerActor.java:41)[245:org.opendaylight.controller.sal-distributed-datastore:1.6.1] at org.opendaylight.controller.cluster.common.actor.AbstractUntypedActor.onReceive(AbstractUntypedActor.java:38)[238:org.opendaylight.controller.sal-clustering-commons:1.6.1] at akka.actor.UntypedActor$$anonfun$receive$1.applyOrElse(UntypedActor.scala:165)[34:com.typesafe.akka.actor:2.4.18] at akka.actor.Actor$class.aroundReceive(Actor.scala:502)[34:com.typesafe.akka.actor:2.4.18] at akka.actor.UntypedActor.aroundReceive(UntypedActor.scala:95)[34:com.typesafe.akka.actor:2.4.18] at akka.actor.ActorCell.receiveMessage(ActorCell.scala:526)[34:com.typesafe.akka.actor:2.4.18] at akka.actor.ActorCell.invoke(ActorCell.scala:495)[34:com.typesafe.akka.actor:2.4.18] at akka.dispatch.Mailbox.processMailbox(Mailbox.scala:257)[34:com.typesafe.akka.actor:2.4.18] at akka.dispatch.Mailbox.run(Mailbox.scala:224)[34:com.typesafe.akka.actor:2.4.18] at akka.dispatch.Mailbox.exec(Mailbox.scala:234)[34:com.typesafe.akka.actor:2.4.18] at scala.concurrent.forkjoin.ForkJoinTask.doExec(ForkJoinTask.java:260)[380:org.scala-lang.scala-library:2.11.11.v20170413-090219-8a413ba7cc] at scala.concurrent.forkjoin.ForkJoinPool$WorkQueue.runTask(ForkJoinPool.java:1339)[380:org.scala-lang.scala-library:2.11.11.v20170413-090219-8a413ba7cc] at scala.concurrent.forkjoin.ForkJoinPool.runWorker(ForkJoinPool.java:1979)[380:org.scala-lang.scala-library:2.11.11.v20170413-090219-8a413ba7cc] at scala.concurrent.forkjoin.ForkJoinWorkerThread.run(ForkJoinWorkerThread.java:107)[380:org.scala-lang.scala-library:2.11.11.v20170413-090219-8a413ba7cc] 2018-03-21 14:06:58,806 | DEBUG | entLoopGroup-7-1 | BGPSessionImpl | 202 - org.opendaylight.bgpcep.bgp-rib-impl - 0.8.1 | Message was received: Keepalive [augmentation=[]] 2018-03-21 14:06:58,869 | DEBUG | entLoopGroup-7-1 | BGPMessageToByteEncoder | 202 - org.opendaylight.bgpcep.bgp-rib-impl - 0.8.1 | Message sent to output: Keepalive [augmentation=[]]
|
| Comments |
| Comment by Jiri Prokes [ 22/Mar/18 ] |
|
I’ve found issue which looks similar: So I tried to reuse hints from that ticket. I’m not sure if it resolved my issue nevertheless it can be used as WA. When I added following configuration into the restconf body bellow then added neighbor become regular peer. </config> <afi-safis> <afi-safi> <afi-safi-name xmlns:x="http://openconfig.net/yang/bgp-types">x:IPV4-UNICAST</afi-safi-name> <!--Advertise N Paths <receive>true</receive> <send-max>0</send-max>--> </afi-safi> <afi-safi> <afi-safi-name>LINKSTATE</afi-safi-name> </afi-safi> <afi-safi> <afi-safi-name>IPV4-FLOW</afi-safi-name> </afi-safi> </afi-safis> </neighbor>
So it seems that something is missing in code. Maybe it could be handled similarly like “application peer” neighbor which add that configuration by default. Or at least http://docs.opendaylight.org/en/stable-nitrogen/user-guide/bgp-user-guide.html have to be updated. |
| Comment by Claudio David Gasparini [ 23/Mar/18 ] |
|
Added to documentation clarification about mandatory Afis/Safis tag, which enables families supported per Neighbor. Since this is documented on Families documentation, but not on the first example for peer configuration.
https://git.opendaylight.org/gerrit/#/q/topic:BGPCEP-774+(status:open+OR+status:merged) |
| Comment by Claudio David Gasparini [ 23/Mar/18 ] |
|
jiriproX Could you review the patch -> change result . Feel free to propose any change, or modify it . Regards,
|
| Comment by Jiri Prokes [ 23/Mar/18 ] |
|
As Families are mandatory I would expect default (or minimal) set of Families there, which enable adding of standard BGP neighbor. Even if I went through "Family" section of this guide I was not able to decide which families are needed. What happen if we add full list of families? Does it have any performance impact if we do not use them later on? |
| Comment by Claudio David Gasparini [ 23/Mar/18 ] |
|
Hi jiriproX, I added the tag to the doc, so it should be clear now that user needs to add some family. You can add all, there wont be any performance impact, but if you get the full, you will have more useless information. Otherwise there is no issue all of them or only one, is up to the user.
Regards, |
| Comment by Jiri Prokes [ 27/Mar/18 ] |
|
When the update will be available in http://docs.opendaylight.org/en/stable-nitrogen/user-guide/bgp-user-guide.html ? |