477 Commits

Author SHA1 Message Date
Charles Chan
f2f8ef043b Fix ConcurrentModificationException
Change-Id: Ie4c3a56312156ded1cbc2fd8a0e4da822ff57205
2018-06-21 00:20:25 +00:00
Saurav Das
137f27f0e7 Bugfix in routing logic to avoid null groups; Improvement in group handling.
Two main changes for the bug-fix:
    - avoid doing a full-reroute in the event of link failure as this will leave behind stale state in stores
      if event has been preceded by mastership change leading to the nuking of the ecmpSpg for one of the
      link's devices; instead do a rehash
    - when full-reroute is attempted, do it only once, with a complete nuke of the next-obj store

Improvement in group handling allows for a max number of retries for a group that failed to be added.
Earlier behavior was to try only once, and if it fails, it gets removed from the group-store. Now it
is removed after a couple of retries - so total 3 attempts to program the group.

Change-Id: I54ca8203cef779463522b01353540d12f8be3c91
2018-06-20 17:48:32 +00:00
Charles Chan
5adc628bd3 Refactor DefaultRoutingHandler to avoid hitting 2000 lines limit
Change-Id: I426e7fc70dcc063bd5742f86ba1141adf6d1d94e
2018-06-20 17:48:03 +00:00
Andreas Pantelopoulos
b251801737 Configuration option respondToUnknownHosts.
Set this option to true to respond to arp requests
for unknown hosts [Default Value = True].

Change-Id: Ia2f10b2fae22b65cd2ec12a04accd9ad0ec15109
(cherry picked from commit 7bf9e441bdc4c7ac420f2a59e4d176005a40d020)
2018-06-18 20:48:05 +00:00
Ray Milkey
15053f0fca buildifier formatting of bazel files
Change-Id: I8196aa52ee640d1c500307a50a0ab4921138b69b
2018-06-13 17:57:14 +00:00
Ray Milkey
02a658bb4a Build segment routing app with bazel
- add support for apps depending on other apps
- build files for route-service and segment routing

Change-Id: I4850aacfe050f802072e2d59a6a21bcefd784e67
2018-06-13 16:23:14 +00:00
Andreas Pantelopoulos
7fba877401 Made the l2 handler use the new logic for pw trans.
- refactored l2 handler to *only* program initiation and termination
  points and nothing else.
- all pseudowires are set to be carried wiht PSEUDOWIRE_VLAN fetched
  from srManager.

Change-Id: I811370f21156a9ca4d42becb1f9401dbeb4fdc33
2018-06-12 19:42:27 -07:00
Andreas Pantelopoulos
5bf1366410 Various pseudowire fixes and improvements.
- Co-ordination when creating - removing pseudowires from
  different instances with a use of a DistributedLock.
- Fixed REST API To return json with specific error for
  the single pw instantiation.
- Fixed REST API to return specific error also for pseudowires
  that could not be decoded.
- Minor bug fix to return appropriate error when instantiating
  a pw from the command line that could not be decoded.
- Fixed bug when creating spine-leaf-leaf pseudowire where we observed flows in pending state.
- Improved logging.

Change-Id: I60dd0ebf8af63ca74d18cfe4801d01846641fb7b
2018-06-13 02:22:58 +00:00
Sangyeok Sim
7ff935ec7c remove extra semicolons
Change-Id: I28a033c97970cccfad10cfa68d4a7737f8d0d674
2018-06-11 04:42:19 +00:00
Charles Chan
ff79dd9169 Implement host probing retry with major refactoring
- Implement probe retry
- Switch to typical core/provider design pattern for HostProbingService
  and as a result decoupling the dependency between SR and HostLocationProvider

Change-Id: I33a15af580677ea376b421ac3e26f9821dcca844
2018-06-06 16:57:33 -07:00
Andrea Campanella
fbcd55e7d8 sr-mcast NPE fix on vlan change
Change-Id: I9523e750fdb5fd76cf120ee2e64f3c63471c8132
(cherry picked from commit f053484c4a3310d93bbddfb4c8872cacebeb33c6)
2018-06-05 16:33:21 +00:00
Andreas Pantelopoulos
67e09aee0e Bug fix for refactored DestinationSet.
The issue was in the serialization. Since we enhanced DestinationSet
to use an Enumeration class, this class should also be registered
with KryoNamespace. Without registering the Enum class
DestinationSetType, the next hops were remaining local to the instance
which has inserted them into the Map and they did not propagate to
other instances.

Change-Id: I4e21481a5fe232892319232b8675cb083593f8f1
2018-05-29 23:17:14 +00:00
Andreas Pantelopoulos
192284c433 Refactored DestinationSet and nextobj for pws.
- Removed the booleans in destination test set and refactored
  it to use a proper enumeration.
- Create a special next objective for pseudowire transport that
  does not pop the tag.
- Install special filtering rules for receiving trafffic for
  pseudowires in all devices.

Change-Id: I665a00d9a766e026d35799fe2f12d56419cb55cd
2018-05-24 16:02:49 -07:00
Yuta HIGUCHI
e7e71a8f9f Update checkstyle to 8.10
- fix issues detected
  - YANG custom registrator should be subject to checkstyle
  - fix Java 8 syntax related violations

Change-Id: I0fc52c6612a40d851fd9bc3bf019621776b1f92a
2018-05-21 16:00:21 +00:00
Ray Milkey
749996b0a6 Fix event handling race condition ONOS-7673
Events could be processed after the component was deactivated
and the executors were shut down.

Change-Id: I53f065e59638293b035278ed1a7736e4d7a817ca
2018-05-14 18:02:23 +00:00
Charles Chan
056e0c144c Revert "Adding Multisct traffic drop for un-programmed trees"
This patch also redirects IPv6 NDP, which is also a multicast packet, to table 40. The IPv6 bridging and BGP peering break as a result. I am reverting this for now and we will need to find another way around.

This reverts commit b955fec073cd90b3b1ac4cbab51e82d110ca43d1.

Change-Id: Ie2bca5c0c0edf170bcdb8f50821271585b275cb1
2018-05-10 22:42:11 +00:00
Andrea Campanella
1487decc73 Fixing NPE for absent blackhole config
Change-Id: I9e558a3182d82d49746f4202468fdb6edab012ff
2018-05-10 17:43:06 +00:00
Andrea Campanella
b955fec073 Adding Multisct traffic drop for un-programmed trees
Change-Id: If9615db254f69141d8d6f0da3e0b7ce7d154bd6b
2018-05-10 19:07:06 +02:00
Daniel Ginsburg
c1d47e9bfa Avoid programming TMAC entries for BSOD vlans
When an interfaces is defined with tagged VLAN(s) and no IP addresses, do not install TMAC entries for that VLAN(s).

Change-Id: I5beeb38c0b21cdd69a0da90943f768c3aeddb720
2018-05-09 21:49:51 +00:00
Andrea Campanella
d980c6db30 Adding route blackhole
Change-Id: I70212b0ab91e628e8528bca896c3aecc499e31b1
2018-05-09 21:43:17 +00:00
Charles Chan
07f15f2cad Fix ConsistentMapException.Interrupted and NullPointerException
- Moving time-consuming packet processing to a separate thread
- Re-use the group information when dealing groupMissing instead of query again

Change-Id: I01f1b43260f22dcb969a105f16d04d79c722146e
2018-05-09 13:28:13 -07:00
Pier
3e793750d4 [CORD-2839] Handling multiple sources
Change-Id: I77bd98e8a12e5044421ef5e0b048833dd688cb2e
2018-05-09 19:22:13 +02:00
Andrea Campanella
0ddf9b8776 Moving Source from connect point to HostId in MulticastHandling
Change-Id: Ie8f678e150b7ee388680b8d8f27df0bce60ec01f
2018-05-09 19:17:47 +02:00
Charles Chan
9bd0e5a1e2 Send probes when host moves
Majorly for the 2nd step of [1A/x, 1B/x] -> [1A/x, 1B/y] -> [1A/y, 1B/y]
But will also cover [1A/x] -> [1A/y] -> [1A/y, 1B/y]

When receiving probe for 1A/y in [1A/x, 1B/y] state, simply replace 1A/x with 1A/y instead of creating a transient 3rd locaiton

Change-Id: I058a265bbe5019d4305aa09d70e095fec0d7e429
2018-05-02 20:00:44 +00:00
Charles Chan
94549653ae Host pointing to the pair port after its pair device is brought down and up
Host-related programming should be done in the same thread to guarantee the order

Change-Id: I07f6e60f4d9ea4392295a7f7ec21b3e2c96aca45
2018-05-02 20:00:44 +00:00
Saurav Das
9a55429ae1 Adding a component config to take down single homed host ports when all uplinks are lost.
In addition:
   - handle port updates that may be lost if mastership changes at same time
   - fix javadoc in DeviceService

Change-Id: I032909e8ab9564cf9c978b1d66abd3ab32c814d7
2018-05-01 15:49:55 -07:00
Charles Chan
971d7ba29e Move some functions from segment routing manager to interface service/manager
Change-Id: I7185cf70f7e5d723a63ac35296b8916558560c35
2018-05-01 15:41:49 -07:00
Jonghwan Hyun
5efd768b57 Bug fix in SegmentRouting
- Correctly program filtering objective for spine-facing ports in leaf switches.

Change-Id: I07ad3980b2e66cecf4c2dd5cfbf70243c7ad4f39
2018-05-01 05:56:09 +00:00
Jonghwan Hyun
800d9d0770 [ONOS-7624] Implement egress pipeline programming
- Implemented logic to handle double-tagged host in segmentrouting application.
- Added 'DummyVlanId' to segmentrouting application to keep track of dummy vlan for L3L2Unfiltered group chain and egress tables.
- Implemented L2Unfiltered group and Egress pipeline programming support in OFDPA pipeline.
- Added EGRESS flag to the forwardingObjective to program Egress tables.
- Fixed bugs when handling double-tagged ARP request, to get correct vlan id and reply with double-tagged packet.
- Fixed bugs in BasicHostConfig, to set the value of 'outerTpid' to 0x8100 if it is not specified.
- Fixed build(ARP/ICMP/ICMP6)reply to build double-tagged reply if corresponding request is double-tagged.

Change-Id: I1fdc30b55827c3f73fad9e854bcaa5fb23f7bcd0
2018-04-26 15:32:17 +00:00
Saurav Das
c6ff8f0d2e Bug fixes for route-path programming
- Leaves should avoid going through other leaves to reach destination
 - dsNextObjective store should only be purged by new master before a full reroute
 - move full reroute for master change to a different threadpool from retry filters

Change-Id: I33be83bfb90d5848cfe94ed0fcdc17f2cca6d73f
2018-04-24 13:07:35 -07:00
Saurav Das
201762d377 Handling mastership changes during route-path programming
Change-Id: I2467d68c29d03cdd96044f23fcf14b6b53c9f9be
2018-04-23 14:29:12 -07:00
Pier
477e0066c3 Improve Mcast termination
Change-Id: I2855d28b374af821667e08bb3baec01f5cfd8100
(cherry picked from commit 173204690b035f1b9be36022c9dfd64f1f264123)
2018-04-23 09:10:01 +00:00
Charles Chan
10b2fee6ea Minor improvements
- Fix typo
- Remove unnecessary warnings
    - Ignore dhcp config register/unregister event
    - Ignore interface IP update when there is no host discovered on that interface

Change-Id: I530fe36eb063ac8b3397c86e888c0a6c2ab8984b
2018-04-21 16:36:19 -07:00
Andrea Campanella
6468e1f700 Fix for routingHandler NPE.
Adding initial delay in handing network config to buffer event and handle async behaviours.

Change-Id: Id6f296f79b74d0386ea4dcb50e7701a672ef51d6
(cherry picked from commit 15fcbba61dbf79836c7f3088bfd257347d0dd2de)
2018-04-20 09:10:49 +00:00
Charles Chan
6577f61496 Fix a thread leak
Change-Id: I6a39abd634c2be684cf567c1f2b2e43d17f46fc3
2018-04-19 22:55:16 +00:00
Charles Chan
8bc75ee52b Implement sr-should-program command
Change-Id: Ie7da6c83b1f432c5f84a13712d0a1be106733c6a
2018-04-19 22:31:33 +00:00
Charles Chan
50bb6efb2f Performance improvement when handling host move events
- Avoid querying shouldProgram every time
- Override flows directly instead of remove and add
- Remove unnecessary event handling delay since we have in-order execution now
- Avoid re-initiation of shouldProgram
- Make sure executors are shut down during SR deactivation

Change-Id: I28e383ed2dcb66d503da25934456008e83683b78
2018-04-19 21:53:04 +00:00
Pier
06d0a77f3b Fix npe when adding a null element in a collection
Change-Id: I946e0c911e100ffcbf123eb6bef44c26c31a46cc
(cherry picked from commit 4bcc32231a6ad94d6f3ea43180b0b5d1e92dbd4e)
2018-04-19 14:57:22 +00:00
Pier
b1fe738936 [CORD-2903] Improve SR/Multicast APIs
Change-Id: Id44af87569e0a83129c96504b21c69e1d455f785
(cherry picked from commit a2858a34a26e02e9d2dd66dc562d0f6fb2c4bdd1)
2018-04-19 06:41:40 +00:00
Pier
96f63cb638 [CORD-2937] Improve work partition on Multicast
Change-Id: Ia8761245e7f199721c1228bfd500e0392a20de05
(cherry picked from commit 901851ef9f2a53d6fdd08d0cc1232b125f1e35bf)
2018-04-19 06:37:00 +00:00
Charles Chan
2690face00 Correctly initialize routes with multiple next hops
- Solve an issue where next hops are available on both leaf switch but one still pointing to its pair through the spines
- Improve unit tests

Change-Id: I94fe79bd9289efe544d82b858928d65201a0b0b2
2018-04-18 19:59:56 +00:00
Pier
3bb1f3f22b Optimize Multicast sinks processing
Change-Id: I5e4c48076edbadc38943d9ee05359341ef55aaca
(cherry picked from commit a17ad9e3f8fe1d2925e6d9fd84d3d96ef79cc78d)
2018-04-18 16:59:03 +00:00
Ray Milkey
bca9049101 Starting snapshot 1.14.0-SNAPSHOT
Change-Id: I97bab4e31d2b701f015289eae29d0c58a4937685
2018-04-13 12:47:31 -07:00
Ray Milkey
6fc64c1e0c Sonar fixes
Change-Id: Id9209ef62897df0f70f0409053ed3ef90e5f18df
2018-04-12 18:07:31 +00:00
Charles Chan
e7c7d0586f Ignore more than two next hops
Change-Id: Ie42365a3a8b9e7f763c21e3f9be9e9abfc35dbf7
(cherry picked from commit e800860179913ce9c37bb378ff27ecb1c68d81dd)
2018-04-11 17:55:20 +00:00
Charles Chan
4e49df8c7d Remove event handling delay
Change-Id: I890ac8643c6b331f6d1f660ef634801c305be55a
2018-04-08 01:03:14 +00:00
Saurav Das
2f2c9d035a Enhancing GroupChecker for faster processing of group updates
Change-Id: I9344ccf0ffbc9cff206318a627f5d97df1091677
2018-04-08 01:00:15 +00:00
Saurav Das
5a35604349 Fixes for CORD-2910, 2920, 2915
- When dealing with possible fake links which tend to be unidirectional, do not
   update internal stores until bidirectionality is verified
 - When figuring out ECMPspg, do not use LinkService to figure out bidi egress
   links. Instead use linkHandlers seen-links
 - Prevent NPE in updatedEcmpSpg
 - Improve logic for bringing up downed dual-home host ports: any active uplink,
   not just the first one should re-enable ports

Change-Id: I4412578e72a6d441cacfa2e023870ceb7c7eab04
2018-04-07 12:58:59 -07:00
Charles Chan
9b7217c560 Handle host, route and mcast events in separate executors
Change-Id: Ic9c4964533354e965691e6db5fa323df91cb4124
2018-04-07 00:05:03 +00:00
Charles Chan
2ff1bac305 Routing/bridging rules on the same leaf pair should always be programmed by the same ONOS instance
Main change:
- Implement new logic for shouldHandleRouting, along with corresponding unit tests. Also rename it to shouldProgram

Side changes:
- Refactor revokeSubnet such that it is only invoked on the instance that should handle routing change
- Move the following methods to RoutingRulePopulator and follow the same design pattern as populate/revoke subnet/route
    - populateBridging, revokeBridging, updateBridging
    - updateFwdObj
- Make sure the following methods in RoutingRulePopulator are always invoked by DefaultRoutingHandler with shouldProgram check
    - populateRoute, revokeRoute
    - populateSubnet, revokeSubnet
    - populateBridging, revokeBridging, updateBridging
    - updateFwdObj

Change-Id: I903129271ede91c45ebf0d973e06faeae46c157a
2018-04-06 23:24:36 +00:00