DM: configure unit on lo0 interface for L3 only VNs

Bug #1491506 reported by Nischal Sheth
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Juniper Openstack
Status tracked in Trunk
Trunk
Fix Committed
Wishlist
Suresh Balineni

Bug Description

If the forwarding mode for a VN is l2_l3, DM allocates IP address from
each VN subnet and configures them on an IRB IFL that belongs to the
L3 VRF for the VN. This functionality was implemented via bug 1465070.

Along similar lines, if the forwarding mode for a VN is l3, DM needs to
allocate IP address from each VN subnet and configure them on a lo0
IFL that belongs to the L3 VRF for the VN. This will be useful to test
connectivity between the VRF and a VM.

Note that the addresses for each lo0 unit must be persisted, pretty much
the same way that IRB addresses are persisted.

Unit number for the lo0 IFL can be calculated based on the VN index.
However, instead of using the VN index directly as the unit number,
we should calculate it using a fixed offset, say 1000 + VN index. This
is to avoid conflict with lo0.0 (which is typically configured by user)
and to have some unit numbers available for users for manual config.

Nischal Sheth (nsheth)
description: updated
Nischal Sheth (nsheth)
no longer affects: juniperopenstack/r2.20
Revision history for this message
OpenContrail Admin (ci-admin-f) wrote : [Review update] master

Review in progress for https://review.opencontrail.org/23393
Submitter: Suresh Balineni (<email address hidden>)

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

Review in progress for https://review.opencontrail.org/25796
Submitter: Suresh Balineni (<email address hidden>)

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

Reviewed: https://review.opencontrail.org/25796
Committed: http://github.org/Juniper/contrail-controller/commit/644dd9b9b5de1033ab0fe8ed8e32c2719045a640
Submitter: Zuul
Branch: master

commit 644dd9b9b5de1033ab0fe8ed8e32c2719045a640
Author: sbalineni <email address hidden>
Date: Mon Nov 7 16:32:01 2016 -0800

[DM]: Allocate ip from each subnet of VN for lo0 interface

- allocate ip from each subnet of VN (non-external L3 VNs) and configure lo0 interface
- lo0 interface ifl unit number is calculated as 1000 + vn_id
- for now, do not allocate this ip if vn is type external
- persist allocated IPs in DB, and on restart use same allocated ips
- on delete, free up allocated ips
- Cassandra Key indexing format is changed for supporting both irb & lo0
- Upgrade issue is taken care
- Added UT cases
- Fixed ip_alloc recent regression issue (bad parameter was passed to virtual_network_ip_alloc api)

Generated Config:

root@cmbu-tasman# show groups __contrail__ interfaces lo0 | display set
set groups __contrail__ interfaces lo0 unit 0 family inet address 172.16.184.200/32 primary
set groups __contrail__ interfaces lo0 unit 0 family inet address 172.16.184.200/32 preferred
set groups __contrail__ interfaces lo0 unit 1210 family inet address 40.0.0.6/32

[edit]
root@cmbu-tasman# show groups __contrail__ interfaces lo0 | display xml
<rpc-reply xmlns:junos="http://xml.juniper.net/junos/14.2R6/junos">
<configuration junos:changed-seconds="1471546906" junos:changed-localtime="2016-08-18 12:01:46 PDT">
<groups>
<name>__contrail__</name>
<interfaces>
<interface>
<name>lo0</name>
<unit>
<name>0</name>
<family>
<inet>
<address>
<name>172.16.184.200/32</name>
<primary/>
<preferred/>
</address>
</inet>
</family>
</unit>
<unit>
<name>1210</name>
<family>
<inet>
<address>
<name>40.0.0.6/32</name>
</address>
</inet>
</family>
</unit>
</interface>
</interfaces>
</groups>
</configuration>
<cli>
<banner>[edit]</banner>
</cli>
</rpc-reply>

Change-Id: I2104b0f5a2f72c824e1e14e464271b7bb44106f5
Closes-Bug: #1491506

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

Other bug subscribers

Remote bug watches

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