2434 Commits

Author SHA1 Message Date
Ray Milkey
db57f1c326 Merge branch 'master' into dev-karaf-4.2.1
Change-Id: I86b9d80581cd76a7c20e05201023090f9692d1ab
2018-10-09 11:26:45 -07:00
Ray Milkey
14a6c506e4 Fix NPE when trying to reference delta port statistics via REST API
Change-Id: Ic195d06e55bd4d8379ac28938e93105d6d181bf6
2018-10-09 16:44:53 +00:00
Carmelo Cascone
e44592f246 More robust P4Runtime group handling
This patch solves the PENDING_UPDATE and PENDING_ADD_RETRY issue
observed on the ONS EU topology.

The P4Runtime action profile group handling has been re-implemented to
be robust against inconsistencies of the device mirror, which is now
periodically synchronized with the device state. Similarly, we implement
a routine in the P4RuntimeClient to cleanup unused action profile
members.

This patch includes also:
-  Refactor PI handle classes to allow creating handles without the
entity instance
- Use list instead of collections in P4RuntimeClient methods, as order
of updates sent and/or entities received from the device is important

Change-Id: I2e7964ce90f43d66680131b47ab52aca32ab55d2
2018-10-05 23:45:29 +00:00
Carmelo Cascone
50d195ffb3 Do not insert or delete default action entries in P4Runtime
Spec says:
the default entry for a table is always set. It can be set at
compile-time by the P4 programmer - or defaults to NoAction (which is a
no-op) otherwise - and assuming it is not declared as const, can be
modified by the P4Runtime client. Because the default entry is always
set, we do not allow INSERT and DELETE updates on the default entry and
the P4Runtime server must return an INVALID_ARGUMENT error code if the
client attempts one.

With this patch we convert insert or delete operations into modify ones
(unless specified by a driver property, to support non-compliant devices).
For delete, we use the interpreter to suggest a default action that is
the same as the one when the pipeline was originally deployed.

Also, we introduce the capability of synchronizing the device mirror
with the device state.

Change-Id: I3758fc11780eb0f1cf4ed5a295bd98b54b182e29
2018-10-05 23:45:18 +00:00
Carmelo Cascone
6880ba619a Get CPU port dynamically in fabric interpreter
Different HW platforms have different CPU ports, here we allow using
the same interpreter with multiple platform.

Change-Id: I0895d4d3e11560c75aca3fa908ca38759b597d67
2018-10-05 23:39:16 +00:00
Carmelo Cascone
da0b559e91 Recover missing pipeconf-merged driver at component activation
needed to support rebooting ONOS nodes

Change-Id: I44d34c649750ffc3d6b0205ee02c8c88391f1f8a
(cherry picked from commit ccee77a024c14c3cef68457028ea71edc0555f54)
2018-10-05 20:55:58 +00:00
Ray Milkey
86ad7bb5e7 [WIP] apps CLI changes for karaf upgrade
Change-Id: I283efc39c7d4f4b31344f1d2d0cdd2b98a60932d
2018-09-28 11:21:43 -07:00
Ray Milkey
d84f89ba3d [WIP] Upgrade ONOS to karaf version 4.2.1
Change-Id: I7cd40c995bdf1c80f94b1895fb3344e32404c7fa
2018-09-28 11:20:57 -07:00
Jordan Halterman
e458f00453 Support hostname resolution for cluster configuration
Change-Id: I9afb97bfba05366fa63dc7b9022b914bd2d1cce0
(cherry picked from commit 97cd95d5a2a7a1bf1f3bfd3091f2d66f747eee33)
2018-09-25 16:04:28 +00:00
Ray Milkey
cc0012423b Remove some calls to the deprecated Path.cost() API
Change-Id: I71d01fdf35d8a06639e6422b4c8d5998b14e319d
2018-09-24 17:28:38 +00:00
Ray Milkey
6e7843d5a3 Remove deprecated non-filtered ingress and egress connect point APIs
Change-Id: Ie360dfc2288b27587ffcdb23bc29f266df1a8d73
2018-09-24 17:28:05 +00:00
Ray Milkey
7908ced318 Remove deprecated mplsLabel() method
Change-Id: I65db8d93185034a9f125456f5510a7dc66008dd6
2018-09-24 17:27:48 +00:00
Ray Milkey
6837293e1b Remove deprecated DistributedPrimitiveCreator APIs
Change-Id: I4a338159558827298d7bd85e3bed0d688f84d596
2018-09-21 11:00:46 -07:00
Andrea Campanella
80b296d9c7 Notifying the delegate about the RESTORED event on the mastership of a given device.
In turn the DeviceManager checks the role and sends the proper one down to the provider to be applied.

Change-Id: Icab9ac30b6e269d8acf9d14896c9858beaedb6da
2018-09-19 13:14:33 +00:00
Ray Milkey
66bf3824ea Remove deprecated Host Provider APIs
Change-Id: Ie6b2d2e38160a015df97337c06101e9156c8ab83
2018-09-18 16:55:56 -07:00
Ray Milkey
1f8fcc3c6b Fix problems detected by the latest version of errorprone
Change-Id: I532d3627fa232e93ee6860bd10db64c99e78f915
2018-09-17 22:48:13 +00:00
Ray Milkey
f031e308fd Remove deprecated constructors and change usges to builder pattern
Change-Id: I4d3b756268db233debdcb0782f738d38c77a50ac
2018-09-11 16:43:21 +00:00
Carmelo Cascone
33b27bc190 Ignore entries from constant tables in P4Runtime
Change-Id: I6ba8591a9674287832a18e258c5dd3801c588a32
(cherry picked from commit ba73da5bd09a6b40ab5727ef4a03767d437687e8)
2018-09-10 08:33:35 +00:00
Carmelo Cascone
de3b6843ca Relinquish mastership when device reports "permission" denied event
Also reduces default pipeconf watchdog probe interval
Also fixes NPE on GDP when device is unreachable

Change-Id: Ie2fe1874b0883a037596d9a555a2f8cc030a55a6
(cherry picked from commit d797e2c28505fbdbb8597038ebcf977a053bae72)
2018-09-10 08:33:22 +00:00
Ray Milkey
3bceb01c23 Remove deprecated getLeaderBoard() API from LeadershipService
Change-Id: I009e1ae26faef3950a7a5e997376783895f575f2
2018-09-07 13:42:46 -07:00
Carmelo Cascone
9e4972c5d8 Refactor P4Runtime subsystem to implement async connection procedure
This patch is an attempt to solve issues observed when restarting both
switches and ONOS nodes. Most of the issues seemed to depend on a
brittle mastership handling when deploying the pipeline.

With this patch, GDP registers devices to the core with available=false
(i.e. offline) and marks them online only when the P4 pipeline has been
deployed to the device. A new PiPipeconfWatchdogService takes care of
deploying pipelines and producing event when devices are ready.

Moreover, we fix a race condition where pipeconf-related behaviors
were not found. This was caused by GDP enforcing the merged
driver name in the network config, while external entities (e.g.
Mininet) were pushing a JSON blob with the base driver name. This patch
removes the need to rely on such a trick and instead uses
pipeconf-aware logic directly in the driver manager (change #19622).

Finally, we fix issues in P4RuntimeClientImpl that were causing the
stream channel not detecting unreachable devices. The solution is to
follow gRPC APIs and re-instantiate a new channel once the first fails.

Change-Id: I6fbc91859c0fb58a6db3bc197b7081a8fe9f97f7
2018-09-06 03:08:09 +00:00
Carmelo Cascone
0761cd3cc0 Few core changes in preparation of P4Runtime subsystem refactoring
Refactoring aims at providing a more robust connection procedure of
P4Runtime-based devices.

Refactoring requires devices to be registered to the core with
available=false (i.e. offline), and marked online only when the P4
pipeline has been deployed to the device. Also, it leaves the duty of
handling pipeconf-specific drivers to the driver subsystem, instead of
having the GeneralDeviceProvider take care of it, which resulted to be
brittle.

Changes include:
- Choose not to mark device online when re-asserting mastership role by
declaring special device annotation.
- Lookup drivers in device projectable model unsing driver service
device-based method, which is consistent with the way other subsystems
look for device drivers.
- In DriverManager, when looking for device drivers, consider the case
of pipeconf-programmable devices, in which case a special "merged"
driver needs to instantiated at runtime.
- In PacketManager, push flow objectives only if device is available
(i.e. after pipeline has been deployed).

Change-Id: I80f78a4f40730a06cb82fa55fefab08a91a89268
2018-09-06 03:07:44 +00:00
Charles Chan
dc579c580a Implement compareTo for TableId to avoid IllegalArgumentException
java.lang.IllegalArgumentException: Comparison method violates its general contract!

Change-Id: I4033e9a6743f134583eab936de2b960d76274919
2018-08-29 19:07:02 +00:00
Ray Milkey
761e80a427 Remove pom files from ONOS
Change-Id: I53e2395466cba10222d638736635b11380421d98
2018-08-21 18:11:58 +00:00
psneha
f31ac6ff9f Added one more Component Config REST API; for specified component and variable.
Change-Id: I810aa90636c55c8b05c146780ad28c307cefff33
2018-08-21 12:17:32 +00:00
Ray Milkey
312d987732 Starting snapshot 1.15.0-SNAPSHOT
Change-Id: I9239c7695f7faf6dc184a0ff54a34dedf4761b2d
2018-08-20 16:09:54 -07:00
Saurav Das
09c2c4d19b Changing the default pw transport vlan to 4090 instead of 4093.
Also adding component config options for pw transport vlan and default internal vlan.

Change-Id: I8bb48530e46db8534b825eecd9aea781fe3f0de1
2018-08-16 05:00:04 +00:00
Thomas Vachuska
6ac9035267 [ONOS-7162] Forcing provider scheme to always be in lowercase.
Change-Id: I27fa58b044da7a4f6d447082ecb92c8f448152fe
2018-08-14 23:19:54 +00:00
ONOS Jenkins User
03e5521fba Starting snapshot 1.14.0-SNAPSHOT 2018-08-14 22:13:58 +00:00
ONOS Jenkins User
3594c24cb2 Tagging 1.14.0-rc2 2018-08-14 22:13:02 +00:00
ONOS Jenkins User
4e5f2d67ac Starting snapshot 1.14.0-SNAPSHOT 2018-08-13 23:16:37 +00:00
ONOS Jenkins User
cff0bd8922 Tagging 1.14.0-rc1 2018-08-13 23:15:43 +00:00
Ray Milkey
4867af2f9c Revert "Tagging 1.14.0-b1"
This reverts commit 78ce40093ac008fd6d169ab83d2d5961f91f6e31.

Change-Id: I8482f550c30f75d65333f6be9c9115a930abc56f
2018-08-10 16:53:10 -07:00
Carmelo Cascone
4164436785 More p4runtime-related bazel build files
Change-Id: Icdd02a06d7905e4cd0a6c61d282fd522c7b75fe7
2018-08-10 18:42:44 +00:00
Ray Milkey
78ce40093a Tagging 1.14.0-b1 2018-08-10 11:16:44 -07:00
Carmelo Cascone
72893b7755 [WIP] Attempt at building grpc and p4runtime protocols with Bazel
STILL NOT WORKING AT RUNTIME

Change-Id: I1f9e60b12a12e09edad2a714ec2921a4f71c6d35
2018-08-09 20:33:39 +00:00
Jordan Halterman
19c123a77b [ONOS-7757] Support onos-local and embedded cluster configurations
- Refactor cluster.json to support internal/external nodes ('controller' and 'storage')
- Bootstrap embedded partitions when 'storage' nodes not present
- Update onos-gen-config script to generate cluster.json based on environment variables
- Update setup scenario to ignore missing $OCC# environment variables

Change-Id: Ia93b64e13d7a7c35ed712da4c681425e3ccf9fe9
2018-07-31 00:03:48 +00:00
Jordan Halterman
00e92da455 Upgrade to Atomix 3.0-rc5
* Upgrade Raft primitives to Atomix 3.0
* Replace cluster store and messaging implementations with Atomix cluster management/messaging
* Add test scripts for installing/starting Atomix cluster
* Replace core primitives with Atomix primitives.

Change-Id: I7623653c81292a34f21b01f5f38ca11b5ef15cad
2018-07-27 15:40:26 +00:00
Carmelo Cascone
1e8843f8e3 ONOS-7251 ONOS-7264 Support for clone to CPU action in fabric.p4
Clone to CPU is available only for packets processed via multicast
groups. Can be changed in the future when implementation for clone
session APIs is available in PI and P4 targets.

Also:
- compile "fabric-full" profile and generate constants from it
- use interpreter to map logical ports to data plane port IDs

Change-Id: I7db30c08dcf69ed9c870748cce8a797bbd5d6f78
2018-07-25 14:44:32 +00:00
Carmelo Cascone
58136816ab ONOS-7739 Support for P4Runtime multicast programming
Design doc: https://docs.google.com/document/d/13rkQlwr49M-uxQQEuxCMP7BFEPY2gtQ850Hn3gUfesU/edit#heading=h.lzdayib259sq

Change-Id: Ief00bec89fe5a9784b0ee13fdaafa3ae58ab654f
2018-07-20 18:16:17 +00:00
jaegonkim
cbe1c5ed4b [ONOS-7681] IntentCleanup.resubmitPendingRequest() can not generate pendingMap PUT event, and IntentData processing does not happen.
Change-Id: I4bcaf21581d72e9715443f9089a2940bffdc6df0
2018-07-10 23:09:22 +00:00
Jordan Halterman
dae1160e3c Implement lazy iterators/streams for ConsistentMap
Change-Id: Id643726441c99186667c104cfdd1dab95b06cf87
2018-07-09 22:04:41 +00:00
Jordan Halterman
d04e344cd5 Implement service for mastership-based remote Java proxies
Change-Id: I36228fcc79b73550fbf5d6cbbc8b24e01d869957
2018-07-09 18:27:10 +00:00
Jordan Halterman
b8cace7ec9 Implement service for registering, managing, and operating on remote Java proxies over the cluster communication service
Change-Id: I4576e3554cfad08747eed847b73fe695e219f3b8
2018-07-09 17:25:11 +00:00
Charles Chan
eded688740 Set R-bit in neighbor advertisement if replying as a router
Change-Id: Ic51140cf7ab88064df0bc87fb4d1fbc976ce7bc7
2018-07-06 11:19:50 -07:00
Georgios Katsikas
40ecef3be0 New Device type for commodity servers
This device type is now advertized by the server
device driver. Also, the ONOS UI maps this new device
type to a glyph.

Change-Id: Ib4147676474b43202bbdff595a0fa0520b70fe91
Signed-off-by: Georgios Katsikas <katsikas.gp@gmail.com>
2018-07-06 17:38:42 +00:00
Carmelo Cascone
158b8c4f6b More improvements and bugfixes in P4Runtime subsystem
Most notably, we fix a bug in which some nodes were not able to find
pipeconf-specific behaviors for a given device. The problem is not
completelly solved but it's mitigated.

There's a race condition caused by the fact that the GDP updates the cfg
with the merged driver name before advertising the device to the core.
Some nodes might receive the cfg update after the device has been
advertised. We mitigate the problem by performing the pipeline deploy
(slow operation) after the cfg update, giving more time for nodes
to catch up. Perhaps we should listen for cfg update events before
advertising the device to the core?

Also:
- NPE when getting P4Runtime client
- Detect if a base driver is already merged in pipeconf manager
- Longer timeouts in P4Runtime driver and protocol (for slow networks)
- Configurable timeout in P4Runtime driver and GDP
- NPE when adding/removing device agent listeners in P4Rtunime handshaker
- Various exceptions due to race conditions in GDP when disconnecting
devices (by serializing disconnect tasks per device)
- NPE when cancelling polling tasks in GDP
- Refactored PipeconfService to distinguish between driver merge,
pipeconf map update, and cfg update (now performed in the GDP)
- Fixed PipeconfManagerTest, not testing driver behaviours
- Use Guava striped locks when possible (more memory-efficient than maps,
and with strict atomicity guarantees w.r.t. to caches).

Change-Id: I30f3887541ba0fd44439a86885e9821ac565b64c
2018-07-06 08:13:44 +00:00
Laszlo Papp
f50057c986 Add a device upgrade behaviour interface
Change-Id: I43c362a302d3517dda8990e40214ce048b813412
2018-07-02 18:04:00 +00:00
Jordan Halterman
0a2bd45ad2 Add atomic mastership/term/backups method to MastershipService
Change-Id: I18c3aeaa5101c9ce08ff38fffd70eaec903a0f3e
2018-06-29 19:45:22 +00:00
Carmelo Cascone
e5b2872eb6 Improve scalability of P4Runtime subsystem
The P4Runtime client was hanging (deadlock) on a master arbitration
request. As such, all other requests (e.g. table write) were waiting
for the client's request lock to become available.

Apart from fixing those deadlocks, this patch brings a number of
improvements that all together allow to run networks of 100+ P4Runtime
devices on a single ONOS instance (before only ~20 devices)

Includes:
- Asynchrounous mastership handling in DevicHandshaker (as defined in
the P4Runtime and OpenFlow spec)
- Refactored arbitration handling in the P4RuntimeClient
to be consistent with the P4Runtime spec
- Report suspect deadlocks in P4RuntimeClientImpl
- Exploit write errors in P4RuntimeClient to quickly report
channel/mastership errors to upper layers
- Complete all futures with deadlines in P4Runtime driver
- Dump all tables in one request
- Re-purposed ChannelEvent to DeviceAgentEvent to carry also mastership
response events
- Fixed IntelliJ warnings
- Various code and log clean-ups

Change-Id: I9376793a9fe69d8eddf7e8ac2ef0ee4c14fbd198
2018-06-29 13:59:27 +00:00