Carrier Class BGPaas: dedicated mapping of Control Nodes to VN metadata ips

Bug #1775872 reported by richard roberts
26
This bug affects 2 people
Affects Status Importance Assigned to Milestone
Juniper Openstack
Status tracked in Trunk
Trunk
In Progress
High
Yuvaraja Mariappan

Bug Description

The current BGPaas implementation introduces major limitations when dealing with HA.

The problem is described in LP 1738049 -"bgpaas requires predictable selection of control node at vrouter to manage HA deployments" where a first "quick and dirty" fix is implemented. In this scenario, the order to control node can be configured in the vrouter-agent config file so as to have better predictability. This is a first level improvement which can help in POC, however it is very hard to operate and will not actually solve all scenarios (noticeably most VEPC solutions, where sub second convergence is a must have).

This LP is created to track the following enhancement which relies on the definition of extra metadata IPs dedicated to each Control Node.

Let's take an example of a 10/24 is a virtual network, where by default the following IPs will be hosted by the vrouter:
  - .1 = Gateway
  - .2 = metadata
With the current implementation, the VM can set up two BGP peers to .1 and .2 (neighbor 10.0.0.1 + neighbor 10.0.0.2). This approach will not work in case of fat Telco VNF such as VEPC, RAN / IMS etc...) because a same VN will be shared accross several computes. Two different computes (one hosting the .1 and the other the .2 bgpaas peers) can elect a same control node as the BGPaas peer. In case of failure of this CN, both peer will fail which result in slow convergence due to peer failure detection + reconnexion (non carrier class).

This enhancement proposes to - optionally - add dedicated metadata IPs to Virtual Networks where HA is requested. In this example, assuming we have 3 Control Nodes, we would have the following:
 - 10.0.0.1 -> GW
 - 10.0.0.2 -> Metadata
 - 10.0.0.3 -> CN1 bgpaas
 - 10.0.0.4 -> CN2 bgpaas
 - 10.0.0.5 -> CN3 bgpaas

#1 This must be optional: default bgpaas is ok for non carrier class scenarios
#2 The relationship must be a 1:1 relationship 10.0.0.3 is mapped to Control Node X, while 10.0.0.4 is mapped to Control node Y
# This must be compliant with the distrbuted compute architecture (several control nodes).

=> pending question/point of vigilance to be discussed together with engineering/customers/VEPC vendors:
# shall we re-use .1 and .2 or mandate the introduction of extra IPs ?
# how to effectively define the mapping of CN to VN IPs (new "bgpaas-metadata-ip-preference" object where we can make sure that ?) ?
# need to adjust the ipam too

thanks !

Changed in juniperopenstack:
importance: Undecided → High
milestone: none → r5.1.0
summary: - Carrier Class BGPaas: dedicated metadata IP to VN Control Node
+ Carrier Class BGPaas: dedicated mapping of Control Nodes to VN metadata
+ ips
Changed in juniperopenstack:
assignee: nobody → Ananth Suryanarayana (anantha-l)
Jeba Paulaiyan (jebap)
no longer affects: juniperopenstack/r5.0
tags: added: contrail-control
Jeba Paulaiyan (jebap)
tags: added: feature
Revision history for this message
Ananth Suryanarayana (anantha-l) wrote :

In bgp_schema.xsd, we already have a reference from bgp-as-a-service to bgp-router today. This bgp-router is of type bgpaas-client.

We can add another reference to the same bgp-as-as-service object, to the desired bgp-router (where in router_type of the bgp-router shall be "control-node).

Also, we can add bgpaas-local-ip-address as a new property to bgp-as-a-service, in order to make the bgpaas peering local-address configurable (instead of how it is hard-coded as .1 and .2)

diff --git a/schema/vnc_cfg.xsd b/schema/vnc_cfg.xsd
index dc8f15f..911e28e 100644
--- a/schema/vnc_cfg.xsd
+++ b/schema/vnc_cfg.xsd
@@ -2507,6 +2507,10 @@ targetNamespace="http://www.contrailsystems.com/2012/VNC-CONFIG/0
 <!--#IFMAP-SEMANTICS-IDL
      Property('bgpaas-ip-address', 'bgp-as-a-service', 'required', 'CRUD',
               'Ip address of the BGP peer.') -->
+<xsd:element name="bgpaas-local-ip-address" type="IpAddressType"/>
+<!--#IFMAP-SEMANTICS-IDL
+ Property('bgpaas-local-ip-address', 'bgp-as-a-service', 'required', 'CRUD',
+ 'Ip address that maps to the Control-Node BGP Router.') -->
 <xsd:element name="bgpaas-session-attributes" type="BgpSessionAttributes"/>
 <!--#IFMAP-SEMANTICS-IDL
      Property('bgpaas-session-attributes', 'bgp-as-a-service', 'required', 'CRUD',

The desired 1:1 mapping can be enforced by UI/provisioning scripts but I wonder if that needs to be enforced by the back-end at all..

Revision history for this message
Ananth Suryanarayana (anantha-l) wrote :

On further discussion, it is perhaps better to encode local-ip-address as link attribute of bgp-as-a-service-to-bgp-router reference.

Revision history for this message
OpenContrail Admin (ci-admin-f) wrote : [Review update] master

Review in progress for https://review.opencontrail.org/46606
Submitter: Yuvaraja Mariappan

information type: Proprietary → Public
Revision history for this message
OpenContrail Admin (ci-admin-f) wrote :

Review in progress for https://review.opencontrail.org/47517
Submitter: Yuvaraja Mariappan

Revision history for this message
OpenContrail Admin (ci-admin-f) wrote : A change has been merged

Reviewed: https://review.opencontrail.org/47517
Committed: http://github.com/Juniper/contrail-api-client/commit/036f9cf2adc07f79d2800c0bfea691b1a4687c15
Submitter: Zuul v3 CI (<email address hidden>)
Branch: master

commit 036f9cf2adc07f79d2800c0bfea691b1a4687c15
Author: Yuvaraja Mariappan <email address hidden>
Date: Tue Nov 6 17:09:19 2018 -0800

schema changes for bgpaas peer selection feature

schema changes for bgpaas peer selection feature
1. Added control-node-zone ifmap node
2. Added link between bgp-router and control-node-zone
3. Added link between global-system-config and control-node-zone
4. Added BgpaasBgpRouterType to pass primary and seconday zone

Change-Id: Ia17c6cb0f3eff50fc39dfe27b1b9ee878a84a2d1
Partial-bug: #1775872

Revision history for this message
OpenContrail Admin (ci-admin-f) wrote : [Review update] master

Review in progress for https://review.opencontrail.org/46606
Submitter: Yuvaraja Mariappan

Revision history for this message
OpenContrail Admin (ci-admin-f) wrote : A change has been merged

Reviewed: https://review.opencontrail.org/46606
Committed: http://github.com/Juniper/contrail-specs/commit/c1ba520960fe187690bcc1934bf271ef1b43b983
Submitter: Zuul v3 CI (<email address hidden>)
Branch: master

commit c1ba520960fe187690bcc1934bf271ef1b43b983
Author: Yuvaraja Mariappan <email address hidden>
Date: Sun Sep 30 18:34:52 2018 -0700

blueprint for bgpaas-peer-selection

blueprint for bgpaas-peer-selection
Partial-bug: #1775872

Change-Id: I4850eea9d250eebe9500297479732157a414dc43

Revision history for this message
OpenContrail Admin (ci-admin-f) wrote : [Review update] master

Review in progress for https://review.opencontrail.org/47951
Submitter: Yuvaraja Mariappan

Revision history for this message
OpenContrail Admin (ci-admin-f) wrote : A change has been merged

Reviewed: https://review.opencontrail.org/47951
Committed: http://github.com/Juniper/contrail-api-client/commit/94f4808924fd1b00968d1bc7935e34b024fa5b19
Submitter: Zuul v3 CI (<email address hidden>)
Branch: master

commit 94f4808924fd1b00968d1bc7935e34b024fa5b19
Author: Yuvaraja Mariappan <email address hidden>
Date: Fri Nov 30 08:03:34 2018 -0800

schema update for bgpaas peer selection feature

Since primary and secondary zone information was passed as a string
via BgpaasBgpRouterType, user can configure zone information
without creating it which should be avoided. More appropriate way
is having a link between bgpaas and control-node-zone.

Added the below changes to do the above.
1. Removed BgpaasBgpRouterType
2. Added link between bgpaas and control-node-zone

Change-Id: Ibe065ce1fac1919843fced04dbae92c59f980ce1
Partial-bug: #1775872

Revision history for this message
OpenContrail Admin (ci-admin-f) wrote : [Review update] master

Review in progress for https://review.opencontrail.org/47967
Submitter: Yuvaraja Mariappan

Revision history for this message
OpenContrail Admin (ci-admin-f) wrote :

Review in progress for https://review.opencontrail.org/48060
Submitter: Yuvaraja Mariappan

Revision history for this message
OpenContrail Admin (ci-admin-f) wrote :

Review in progress for https://review.opencontrail.org/47967
Submitter: Yuvaraja Mariappan

Revision history for this message
OpenContrail Admin (ci-admin-f) wrote : A change has been merged

Reviewed: https://review.opencontrail.org/47967
Committed: http://github.com/Juniper/contrail-controller/commit/f2f71620b28388cfef7a26000ce59fb29fff39ba
Submitter: Zuul v3 CI (<email address hidden>)
Branch: master

commit f2f71620b28388cfef7a26000ce59fb29fff39ba
Author: Yuvaraja Mariappan <email address hidden>
Date: Sun Dec 2 18:25:01 2018 -0800

bgp-peer selection support for bgpaas

1. Listener BgpRouterConfig is added for BgpRouter and ControlNodeZone
2. BgpRouterConfig builds BgpRouterTree and ControlNodeZoneTree
from IFMapNode
3. BGPaaS gets BgpRouter for configured ControlNodeZone from
BgpRouterConfig and Updates bgp-peer-ip and bgp-peer-port in
the flow.
4. Step 3 is followed for xmpp based peer-selection also.
5. BGPaaS sandesh is updated with primary_control_node_zone,
secondary_control_node_zone, bgp_peer_ip and bgp_peer_port

Change-Id: I11680f8edc04ca0549452ca828fbda023ce0e4cd
Partial-bug: #1775872

Revision history for this message
OpenContrail Admin (ci-admin-f) wrote : [Review update] master

Review in progress for https://review.opencontrail.org/48373
Submitter: Yuvaraja Mariappan

Revision history for this message
OpenContrail Admin (ci-admin-f) wrote : A change has been merged

Reviewed: https://review.opencontrail.org/48373
Committed: http://github.com/Juniper/contrail-controller/commit/c061868d8f68a190de8338a71aedc2f77f855028
Submitter: Zuul v3 CI (<email address hidden>)
Branch: master

commit c061868d8f68a190de8338a71aedc2f77f855028
Author: Yuvaraja Mariappan <email address hidden>
Date: Wed Dec 26 18:07:04 2018 -0800

bgp-peer selection support for bgpaas

1. Added introspect to BgpRouter and ControlNodeZone
2. Added Unit tests to validate secondary control-node-zone

Change-Id: I2e5998ca13d2d937b95a7fbea47eb994bbebd0bb
Partial-bug: #1775872
Partial-jira-bug: #JCB-184435

Revision history for this message
Jiang Lu (lujiang) wrote :

Final fix will be tracked in JCB-216886.
https://contrail-jws.atlassian.net/browse/JCB-216886

Revision history for this message
Jiang Lu (lujiang) wrote :

Pls ignore the last comment. It is not under JCB-216886, but under this LP.

Revision history for this message
OpenContrail Admin (ci-admin-f) wrote : [Review update] master

Review in progress for https://review.opencontrail.org/48538
Submitter: Yuvaraja Mariappan

Revision history for this message
OpenContrail Admin (ci-admin-f) wrote :

Review in progress for https://review.opencontrail.org/48549
Submitter: Arun RS (<email address hidden>)

Revision history for this message
OpenContrail Admin (ci-admin-f) wrote :

Review in progress for https://review.opencontrail.org/48566
Submitter: Yuvaraja Mariappan

Revision history for this message
OpenContrail Admin (ci-admin-f) wrote :

Review in progress for https://review.opencontrail.org/48566
Submitter: Mithun Mistry (<email address hidden>)

Revision history for this message
OpenContrail Admin (ci-admin-f) wrote :

Review in progress for https://review.opencontrail.org/48538
Submitter: Yuvaraja Mariappan

Revision history for this message
OpenContrail Admin (ci-admin-f) wrote : A change has been merged

Reviewed: https://review.opencontrail.org/48566
Committed: http://github.com/Juniper/contrail-controller/commit/1f528dcae99a0e23b6d3ae0268da048638469e45
Submitter: Zuul v3 CI (<email address hidden>)
Branch: master

commit 1f528dcae99a0e23b6d3ae0268da048638469e45
Author: Yuvaraja Mariappan <email address hidden>
Date: Tue Jan 8 14:30:50 2019 -0800

bgp-peer selection support for bgpaas

Added missing link delete in cleanup

Change-Id: I944be4ee99b21746f0d2f40fbed9230f528b5a0d
Partial-bug: #1775872
Partial-jira-bug: JCB-184435

Revision history for this message
OpenContrail Admin (ci-admin-f) wrote : [Review update] master

Review in progress for https://review.opencontrail.org/48616
Submitter: Ananth Suryanarayana (<email address hidden>)

Revision history for this message
OpenContrail Admin (ci-admin-f) wrote :

Review in progress for https://review.opencontrail.org/48646
Submitter: Yuvaraja Mariappan

Revision history for this message
OpenContrail Admin (ci-admin-f) wrote : A change has been merged

Reviewed: https://review.opencontrail.org/48616
Committed: http://github.com/Juniper/contrail-controller/commit/d6b6600bd0ecb3d528326d0fac62f631e8ce4d87
Submitter: Zuul v3 CI (<email address hidden>)
Branch: master

commit d6b6600bd0ecb3d528326d0fac62f631e8ce4d87
Author: Ananth Suryanarayana <email address hidden>
Date: Fri Jan 4 12:06:04 2019 -0800

Manage rtarget routes associated with bgpaas sessions

With bgpaas static configuration for associated control-nodes, it is possible
that bgpaas sessions can connect to a control-node in a routing-instance, even
though there is no explicit xmpp agent subscription for the same. If this
happens, then as is, control-node will not attract any routes of the instance
if route-target-filtering is enabled (which is the default configuration)

It is only when agents subscribe do we add import-target to the bgp.target.0
table so that instance routes are attracted in bgp.l3vpn.0 table.

With this change, when ever bgpaas session comes up in a routing-instance,
then all its associated import route targets are added to bgp.rtarget.0
table with source peer as bgpaas peer pointer. This is similar to what we
do when an agent subscribes. On the other hand, when bgpaas session goes
down, then those routes are removed from the bgp.rtarget.0 table.

Also, current set of route-targets configured for an instance are tracked so
that in case of configuration change to the import route targets list, routes
are correctly updated.

TODO: Add more unit tests to cover routing-instance configuration changes.

Change-Id: I4964a163101695a7954d282afed69e6bc02ffa1a
Partial-bug: #1775872

Revision history for this message
OpenContrail Admin (ci-admin-f) wrote :

Reviewed: https://review.opencontrail.org/48646
Committed: http://github.com/Juniper/contrail-specs/commit/dbc76ef22547e7c2ef7d4182154545fce73a73d6
Submitter: Zuul v3 CI (<email address hidden>)
Branch: master

commit dbc76ef22547e7c2ef7d4182154545fce73a73d6
Author: Yuvaraja Mariappan <email address hidden>
Date: Sat Jan 12 12:37:57 2019 -0800

bgp-peer selection support for bgpaas

Inorder to put schema in a block,
added an empty line before the schema.

Change-Id: I9d7857af631bbb0fd0fa02be7d8244339367fbed
Partial-bug: #1775872
Partial-jira-bug: JCB-184435

Revision history for this message
OpenContrail Admin (ci-admin-f) wrote : [Review update] master

Review in progress for https://review.opencontrail.org/48877
Submitter: Arun RS (<email address hidden>)

Revision history for this message
OpenContrail Admin (ci-admin-f) wrote : A change has been merged
Download full text (37.3 KiB)

Reviewed: https://review.opencontrail.org/49393
Committed: http://github.com/Juniper/contrail-controller/commit/77df3b58265b3fab414dfbc00e1ff39d19f0a99c
Submitter: Zuul v3 CI (<email address hidden>)
Branch: R6.0-WIP

commit 77df3b58265b3fab414dfbc00e1ff39d19f0a99c
Author: Shivayogi Ugaji <email address hidden>
Date: Mon Nov 5 22:07:18 2018 -0800

Apply commits from master onto R6.0-WIP

db_resync_done lock is used to indicate the amqp thread to wait for resync to
complete. In this case, when we call SchemaTransformer.destroy_instance()
due to Casandra connection failure, this lock remains locked blocking
destroy_instance. destroy_instance calls _vnc_subscribe_callback to drain the
amqp queue which waits infinitely for db_resync_done lock to be released.
This fix releases db_resync_done lock so that destroy_instance doesnt get
blocked.
Closes-Bug: #1801474

[DM] Hitless image upgrade implementation
Closes-Bug: #1799322

Provisioner for the devicemanager node.
usage:
from /opt/contrail/utils
python provision_devicemgr_node.py --host_name aio --host_ip 10.87.82.2
--oper add --admin_user admin --admin_password contrail123 --admin_tenant_name
admin --openstack_ip 10.87.82.2 --api_server_ip 10.87.82.2
Closes-Bug: #1805303

CFM: Changes for onboarding L3PNF
- Add new platform SRX240
- Add L3PNF subnet is schema
- Add new namespace, VN and IPAM for L3PNF during brownfield onboarding
Closes-Bug: 1800701

Add entrypoint to vrouter-agent service on Windows
Introduce entrypoint for agent similar in design to that from
microservice deployment. For now it will only start agent,
actual features will be added in following changes.
Partial-Bug: #1806677

Check build dependencies for tbb, SimpleAmqpClient and rabbitmq
Closes-Bug: #1806719

Make agent's entrypoint update agent's config on Windows
In future we will generate the whole config from scratch
as on Linux, but for now we only update the vhost's ifname.
It's the only field that can change upon restart.
Partial-Bug: #1806677

bgp-peer selection support for bgpaas
1. Listener BgpRouterConfig is added for BgpRouter and ControlNodeZone
2. BgpRouterConfig builds BgpRouterTree and ControlNodeZoneTree
from IFMapNode
3. BGPaaS gets BgpRouter for configured ControlNodeZone from
BgpRouterConfig and Updates bgp-peer-ip and bgp-peer-port in
the flow.
4. Step 3 is followed for xmpp based peer-selection also.
5. BGPaaS sandesh is updated with primary_control_node_zone,
secondary_control_node_zone, bgp_peer_ip and bgp_peer_port
Partial-bug: #1775872

[DM] Inside-outside workflow - lag/mH
1. Change the exisiting business logic to adhere to the new data model for lag/mH workflow
2. Multi-vlan support
Partial-Bug: #1799329

Rework nodemgr before fixing ntp issue
- move windows/linux code to separate classes instead of same condition through the code
- simplify main.py
- remove copy duplication
Closes-Bug: 1800704

[fabric] Added playbook retry support to job manager
1) When playbook return retry_devices in the output, job manager will retry the playbooks against those devices
2) remove obsolete playbooks from 5.0
3) remove obsolete ansible roles from 5.0
4) added a warning log on missing loopback interface when ...

Revision history for this message
OpenContrail Admin (ci-admin-f) wrote : [Review update] R5.1

Review in progress for https://review.opencontrail.org/51233
Submitter: Ananth Suryanarayana (<email address hidden>)

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.