commit a9f90b4857b78c121ffdc2592efb23b4f78ef448
Author: Praveen K V <email address hidden>
Date: Thu Jan 29 00:43:29 2015 +0530
Merge following commits from R2.1 branch.
Dont allocate nh-index 0
nh-index 0 is reserved by vrouter. So, pre-allocate the first index so that nh
added by agent use index 1 and above
Change-Id: Ieed6d8666fc45399a51b280f1aae075425cee52c
(cherry picked from commit 3f2005b4c7be556cfdec9929b33b330ecc6ade3a)
Problem: TOR path not deleted on VRF delete.
When VRF is deleted in TSN mode, notification is received for physical_device_vn
entry.This entry contain vn_entry which can in turn can be used to extract VRF.
Multicast handler on adding the entry puts a state where it adds the VRF
entry name so that it can be used at the time of deletion because when VRF is
deleted vn_entry from physical_device_vn may not contain any VRF.
Issue was that search for multicast object was being done using vrf from VN
at time of delete. This should be done using the vrf_name stored in state.
Fixed the same here. Along with this fix also added a check to verify VRF is
in deleted state when IsTorDeleted being calculated.
Closes-bug: #1416808
Change-Id: Ica526b736a07723db40c6bb31a2f91f756cb1373
(cherry picked from commit 84347759dde36c758f37f4d12a7540de97786dbd)
Remove forwarding mode setting using IPAM gateway attributes.
Though it allows 0.0.0.0 gateway but it is not used for
forwarding mode.
Partial-Bug: #1415014
Change-Id: I72c2a3faf3ededfdd05c677d06ce654b8798618f
(cherry picked from commit 78bae98b52173a754669168478cd2c4151955f8c)
DNS disable knob : when DNS server is given as 0.0.0.0 in the dns_servers
field for the subnet or in the DHCP options list, vrouter doesnt provide
DNS proxy function any more. Do not send DNS server or DNS domain options
in DHCP response in such a case.
When there is any DNS server specified in the DHCP options list, do not
add the vrouter DNS server address any more.
If the DNS server in IPAM subnet config comes unspecified, set it to be
the same as the GW address.
Change-Id: If3e66bcfd7c137064de1471cc515e4742ea14b73
Fixes-Bug: 1416711
(cherry picked from commit 2a0d85dc4cc521e8c417182eedebe14dc9b4848b)
Conflicts:
src/vnsw/agent/oper/vn.cc
Fix the VLAN-ID comparison in logical interface
Added checks for following,
1. VLAN-ID is not reused on multiple logical-ports on a single
physical-port
2. VLAN-ID must be set during creation of logical-interface
3. Do not allow change of vlan-id after logical-interface is
created
4. Rename interface_object to li_object to avoid confusion in
_check_interface_name
Closes-Bug: #1416323
Change-Id: I444f83d8cf8d34a6848026fe3fd0b8e23a7798f4
(cherry picked from commit 0a778eb1dab3e94c94cf0a37f36ad30f593c4e3b)
Adding 10Sec delay for ovsdb session to start txn
Issue:
------
On reconnect TOR Agent use to start the audit process immediately
causing all the previouslt installed entries to get delete as
stale, then re-added on config availabilty
Fix:
----
For R2.1, on connection establish we will wait for 10sec before
triggering a fetch from the OVSDB, due to which any addtion of
config or audit will be delayed by 10Sec.
Change-Id: I1a11c6547be8c50b25fdf1e4d2a596d901f86882
Closes-Bug: 1417432
(cherry picked from commit 1de41f09263dc8f2b311f90a57bf7e91ee767a0b)
Problem: Agent crash on removing one TOR from setup of two TOR.
Fix: Multicast handler was deleting the DB state and then adds it back
on deleted physical_device_vn entry. Fix was to push the DB state add
code nder non delete check.
Closes-bug: #1418192
Change-Id: I9f5b32f409bd88b1058f1dfdc8f454aff58f50a6
(cherry picked from commit 8e7e130c0d8336a43bd4d74483b0211664027d6c)
update the iterator in the loop in IsTorDevice.
Change-Id: Iccf3673b35c2da1ed1011edafbcfff3420f093e4
Fixes-bug: 1420119
(cherry picked from commit b16540f90071f7eab68e7efa5a99ec4b674b96e2)
NULL check for local_path.
Closes-bug: #1420034
Change-Id: I13ec142fdbb34fc046f1e72898cdee1cc2ea78ca
(cherry picked from commit 5ee0de98ba1a172a6642e6958bcda9ae35708186)
* Enqueue traffic seen request even if IpV4 traffic is processed as
layer2 flow. Adding a test case for same
Change-Id: I38e420a28175bf13c6591f2845bbd5f84e4589b4
(cherry picked from commit edf19476fa7735f4aae7446bc7318cd9559da081)
* Dont add layer 2 route for prefix lenght evaluation map
FLow entries are maintained in prefix lenght map, so that
more specific route gets used for flow processing,
we were adding layer2 route entry also in the map
resulting 48 bit comparision on ip address.
Added UT for the same
Closes-bug:1419909
Change-Id: I3da175e43f2f9ca1de5e05ee02f6e0f9dcaa57b5
(cherry picked from commit ca661d35014123ae1d8f0c8965171c1d74572421)
The check for duplicate VLAN ids should be retricted to the logical
interfaces on the same physical interface. Adding this check.
Closes-bug: 1420418
Change-Id: I768c7ea89b0f46c97d37bd9d500b36904b505d3b
(cherry picked from commit 34d1d2ddfa3120d0c234334b8fd46c44b3842239)
* If agent receives a tunneled packet whose tunnel type is neither
GRE, UDP or VXLAN log a message, instead of asserting.
We still have to analyse as of which packet caused the issue
Partial-bug:#1418948
Change-Id: Iac8364db642d53f939f10737602bed3d37722738
(cherry picked from commit 1730b85eeb5b011e8f085e9aedabe53d2464b389)
Fix SG handling for baremetals
When OVS Route is exported from Tor-Agent, pick the SG-ID from
VMINterface and add it to the route exported. If there is change in
SG-ID for interface, do a route-update with new SG-ID
Added code to manage RouteFlowInfo tree for BridgeTable entries
Add UT for the same
Change-Id: I1cb29c9e4d04c22b933a6cad3c99d3586dc3e13c
(cherry picked from commit eb94b17d2e763c80456accb459757e5aaf364b7d)
When agent gets interface config after route is received, the DHCP flag is not updated.
Fix by updating the paths in EVPN and Bridge tables.
Committing on behalf of Manish.
Closes-bug: 1420800
Change-Id: Ie11572f733966d01d0ef801b892ed3bb0f96635c
(cherry picked from commit 178b569ff08a631e601213a2981dcb47dead56d6)
Skip EVPN route update if VRF/VN in VIF is NULL
Closes-bug: #1421115
Change-Id: I2934351d414a07500a41a11ba3ac51082eb6ad6f
(cherry picked from commit ec9aba8f58b6a21dd10a9e11fac921071a4c9c27)
Fix tor-agent-crash if Vxlan is NULL
In VMInterfaceKSyncEntry::Sync, its possible that Vxlan inside VN is
null. Adding check to skip route update if Vxlan is NULL
Also, exit contrail-tor-agent on OVS connection close. We are hitting
few bugs in handling re-connect of OVS. Exiting contrail-tor-agent till
the bugs are fixed
Change-Id: I662814b8b987967abb68f01c061172eb404f8977
Closes-bug: #1421115
(cherry picked from commit 179a8f694626a365b3f90bf92ab389b6e5ecca31)
Reviewed: https:/ /review. opencontrail. org/7463 github. org/Juniper/ contrail- controller/ commit/ a9f90b4857b78c1 21ffdc2592efb23 b4f78ef448
Committed: http://
Submitter: Zuul
Branch: master
commit a9f90b4857b78c1 21ffdc2592efb23 b4f78ef448
Author: Praveen K V <email address hidden>
Date: Thu Jan 29 00:43:29 2015 +0530
Merge following commits from R2.1 branch.
Dont allocate nh-index 0
nh-index 0 is reserved by vrouter. So, pre-allocate the first index so that nh
added by agent use index 1 and above
Change-Id: Ieed6d8666fc453 99a51b280f1aae0 75425cee52c cfdec9929b33b33 0ecc6ade3a)
(cherry picked from commit 3f2005b4c7be556
Problem: TOR path not deleted on VRF delete.
When VRF is deleted in TSN mode, notification is received for physical_device_vn
entry.This entry contain vn_entry which can in turn can be used to extract VRF.
Multicast handler on adding the entry puts a state where it adds the VRF
entry name so that it can be used at the time of deletion because when VRF is
deleted vn_entry from physical_device_vn may not contain any VRF.
Issue was that search for multicast object was being done using vrf from VN
at time of delete. This should be done using the vrf_name stored in state.
Fixed the same here. Along with this fix also added a check to verify VRF is
in deleted state when IsTorDeleted being calculated.
Closes-bug: #1416808
Change-Id: Ica526b736a0772 3db40c6bb31a2f9 1f756cb1373 58f37f4d12a7540 de97786dbd)
(cherry picked from commit 84347759dde36c7
Remove forwarding mode setting using IPAM gateway attributes.
Though it allows 0.0.0.0 gateway but it is not used for
forwarding mode.
Partial-Bug: #1415014
Change-Id: I72c2a3faf3eded fdd05c677d06ce6 54b8798618f 54669168478cd2c 4151955f8c)
(cherry picked from commit 78bae98b52173a7
DNS disable knob : when DNS server is given as 0.0.0.0 in the dns_servers
field for the subnet or in the DHCP options list, vrouter doesnt provide
DNS proxy function any more. Do not send DNS server or DNS domain options
in DHCP response in such a case.
When there is any DNS server specified in the DHCP options list, do not
add the vrouter DNS server address any more.
If the DNS server in IPAM subnet config comes unspecified, set it to be
the same as the GW address.
Change-Id: If3e66bcfd7c137 064de1471cc515e 4742ea14b73 8c417182eedebe1 4dc9b4848b)
Fixes-Bug: 1416711
(cherry picked from commit 2a0d85dc4cc521e
Conflicts:
src/vnsw/ agent/oper/ vn.cc
Fix the VLAN-ID comparison in logical interface
Added checks for following,
1. VLAN-ID is not reused on multiple logical-ports on a single interface_ name
physical-port
2. VLAN-ID must be set during creation of logical-interface
3. Do not allow change of vlan-id after logical-interface is
created
4. Rename interface_object to li_object to avoid confusion in
_check_
Closes-Bug: #1416323 a6848026fe3fd0b 8e23a7798f4 c94cf0a37f36ad3 0f593c4e3b)
Change-Id: I444f83d8cf8d34
(cherry picked from commit 0a778eb1dab3e94
Adding 10Sec delay for ovsdb session to start txn
Issue:
------
On reconnect TOR Agent use to start the audit process immediately
causing all the previouslt installed entries to get delete as
stale, then re-added on config availabilty
Fix:
----
For R2.1, on connection establish we will wait for 10sec before
triggering a fetch from the OVSDB, due to which any addtion of
config or audit will be delayed by 10Sec.
Change-Id: I1a11c6547be8c5 0b25fdf1e4d2a59 6d901f86882 2b311f90a57bf7e 91ee767a0b)
Closes-Bug: 1417432
(cherry picked from commit 1de41f09263dc8f
Problem: Agent crash on removing one TOR from setup of two TOR.
Fix: Multicast handler was deleting the DB state and then adds it back
on deleted physical_device_vn entry. Fix was to push the DB state add
code nder non delete check.
Closes-bug: #1418192
Change-Id: I9f5b32f409bd88 b1058f1dfdc8f45 4aff58f50a6 43bd4d74483b021 1664027d6c)
(cherry picked from commit 8e7e130c0d8336a
update the iterator in the loop in IsTorDevice.
Change-Id: Iccf3673b35c2da 1ed1011edafbcff f3420f093e4 ab68e7efa5a99ec 4b674b96e2)
Fixes-bug: 1420119
(cherry picked from commit b16540f90071f7e
NULL check for local_path.
Closes-bug: #1420034
Change-Id: I13ec142fdbb34f c046f1e72898cde e1cc2ea78ca a6642e6958bcda9 ae35708186)
(cherry picked from commit 5ee0de98ba1a172
* Enqueue traffic seen request even if IpV4 traffic is processed as
layer2 flow. Adding a test case for same
Change-Id: I38e420a28175bf 13c6591f2845bbd 5f84e4589b4 4aae7446bc7318c d9559da081)
(cherry picked from commit edf19476fa7735f
* Dont add layer 2 route for prefix lenght evaluation map
FLow entries are maintained in prefix lenght map, so that
more specific route gets used for flow processing,
we were adding layer2 route entry also in the map
resulting 48 bit comparision on ip address.
Added UT for the same
Closes-bug:1419909
Change-Id: I3da175e43f2f9c a1de5e05ee02f6e 0f9dcaa57b5 e1d8f0c8965171c 1d74572421)
(cherry picked from commit ca661d35014123a
The check for duplicate VLAN ids should be retricted to the logical
interfaces on the same physical interface. Adding this check.
Closes-bug: 1420418
Change-Id: I768c7ea89b0f46 c97d37bd9d500b3 6904b505d3b 0c234334b8fd46c 44b3842239)
(cherry picked from commit 34d1d2ddfa3120d
* If agent receives a tunneled packet whose tunnel type is neither bug:#1418948
GRE, UDP or VXLAN log a message, instead of asserting.
We still have to analyse as of which packet caused the issue
Partial-
Change-Id: Iac8364db642d53 f939f10737602be d3d37722738 e8f085e9aedabe5 3d2464b389)
(cherry picked from commit 1730b85eeb5b011
Fix SG handling for baremetals
When OVS Route is exported from Tor-Agent, pick the SG-ID from
VMINterface and add it to the route exported. If there is change in
SG-ID for interface, do a route-update with new SG-ID
Added code to manage RouteFlowInfo tree for BridgeTable entries
Add UT for the same
Change-Id: I1cb29c9e4d04c2 2b933a6cad3c99d 3586dc3e13c 0456accb459757e 5aaf364b7d)
(cherry picked from commit eb94b17d2e763c8
When agent gets interface config after route is received, the DHCP flag is not updated.
Fix by updating the paths in EVPN and Bridge tables.
Committing on behalf of Manish.
Closes-bug: 1420800
Change-Id: Ie11572f733966d 01d0ef801b892ed 3bb0f96635c e601213a2981dcb 47dead56d6)
(cherry picked from commit 178b569ff08a631
Skip EVPN route update if VRF/VN in VIF is NULL
Closes-bug: #1421115 500a41a11ba3ac5 1082eb6ad6f dd10a9e11fac921 071a4c9c27)
Change-Id: I2934351d414a07
(cherry picked from commit ec9aba8f58b6a21
Fix tor-agent-crash if Vxlan is NULL
In VMInterfaceKSyn cEntry: :Sync, its possible that Vxlan inside VN is
null. Adding check to skip route update if Vxlan is NULL
Also, exit contrail-tor-agent on OVS connection close. We are hitting
few bugs in handling re-connect of OVS. Exiting contrail-tor-agent till
the bugs are fixed
Change-Id: I662814b8b98796 7abb68f01c06117 2eb404f8977 5b3f90bf92ab389 b6e5ecca31)
Closes-bug: #1421115
(cherry picked from commit 179a8f694626a36
Conflicts:
src/vnsw/ agent/ovs_ tor_agent/ ovsdb_client/ ovsdb_client_ session. cc
A reference taken from state is used after it is deleted. Copy the value
instead of taking reference.
Change-Id: I354d403f3de0cd 1b9d9dfd83f0422 f67bce89aae 74cbcda03929c40 074bdcf1a3)
Closes-bug: 1421776
(cherry picked from commit 75b03b8e38a7df0