1809 Commits

Author SHA1 Message Date
Carmelo Cascone
75a9a8958e Trigger pipeconf deploy right after registration
Without waiting for the next pipeconf watchdog periodic probe.
To support this, this patch extends the PiPipeconfService to advertise
pipeconf registration events.

Change-Id: Ib44f1813bd37083c666a5e7980de320ce469c2d2
2019-04-23 19:39:56 +00:00
Gamze Abaka
6c8a71b086 In order to complete https://jira.opencord.org/browse/VOL-1093 and https://jira.opencord.org/browse/VOL-1401, OltPipeline must support meter and write metadata instructions for authentication trap flows. Additionally, all flows must include write metadata instruction instead of transition. This change will be done for 1.13 branch.
Change-Id: I98d0bde9dc854bd3bf55a9df3b1dea9442bcfa19
2019-04-22 17:33:51 -07:00
Gamze Abaka
dadae72079 In order to implement VOLTHA VOL-949 task (https://jira.opencord.org/browse/VOL-949) , OltPipeline (pmc-olt driver) must support meter, transition and also QinQ vlan push instructions.
Change-Id: Ie027469fa190a78b0c8366da55431ebc62e699ef
2019-04-22 17:11:38 -07:00
Gamze Abaka
65f27f1aae ONOS-7733 Meter Creation Fails :
When we want to create a meter, MeterManager & DefaultMeter.Builder gives the following error:
java.lang.IllegalArgumentException: Must specify a cell id.
at com.google.common.base.Preconditions.checkArgument(Preconditions.java:134)
at org.onosproject.net.meter.DefaultMeter$Builder.build(DefaultMeter.java:241)
at org.onosproject.net.meter.DefaultMeter$Builder.build(DefaultMeter.java:184)
at org.onosproject.net.meter.impl.MeterManager.submit(MeterManager.java:204)

It seems that MeterManager still uses meter id instead of meter cell id. It must be changed with the proper value.

Change-Id: I623746b38af1148ca7f33efe5e48d6590a11051a
Note: Cord OLT application must create meters for the technology profile implementation and it uses 1.13.1 version.
2019-04-22 16:45:40 -07:00
Ray Milkey
722f74c3fd Starting snapshot 2.2.0-SNAPSHOT
Change-Id: Ib48a5308969c82999396bab1941e6e44c8f54b1a
2019-04-22 10:48:14 -07:00
ONOS Jenkins User
2d77c1a049 Starting snapshot 2.1.0-SNAPSHOT 2019-04-19 17:24:24 +00:00
ONOS Jenkins User
0dd5085e8f Tagging 2.1.0-rc2 2019-04-19 17:24:15 +00:00
Carmelo Cascone
bc7eb85a88 Filter groups by application ID, for real
Change-Id: Ia5fb6b2a2dc0e41b9de83066aeb61f7da20d87cd
2019-04-18 16:05:46 +00:00
Carmelo Cascone
3b4baa07e4 Improve fingerprint computation for pipeconf
Do not read extensions in memory and consider pipeline model.

Change-Id: I3e077fbcd9ed0a2dba78b4e1c87e95ecb7287be6
2019-04-18 05:57:49 +00:00
Carmelo Cascone
33f36a0ec7 Clean up PipelineInterpreter API by removing ambiguous methods
Such as mapping from PiMatchFieldId to Criterion.Type. This should not
be required since the only translation happening is from north
(Criterion.Type) to south (PiMatchFieldId).

Change-Id: I204e0bd66b3996fd60bc11d4241e8a0408e11582
2019-04-18 05:55:06 +00:00
Carmelo Cascone
9db4d5c644 Add support for P4Runtime clone sessions via Group API
Clone sessions can now be created by defining groups with new type CLONE

The PI framework has been refactored to abstract commonality between
multicast groups and clone sessions as both are managed as part of the
P4Runtime packet replication engine (PRE).

Change-Id: I2f23c629b7de1931d5cab96ec76aef26130ce418
2019-04-17 21:55:13 +00:00
pier
ed2a0a49c6 Move modified after registerProperties in FlowRuleManager
Change-Id: Ic5826cb55df384eec4d710e8a2b826387ac5f3ab
2019-04-17 22:24:46 +02:00
pier
8b3aef446d Implements accumulation of the fwdobjectives in ofdpa pipelines
Change-Id: I95cbdd9b3fb8d439003a103111a01dc3aee2072b
2019-04-17 15:26:58 +00:00
Charles Chan
8b488de794 Allowed apps to specify whether the existing component config value should be overridden
Change-Id: Ic0992adb49cbcce17e17a71af954fbeeafde97d3
2019-04-12 22:28:23 +00:00
ONOS Jenkins User
961dbde9bb Starting snapshot 2.1.0-SNAPSHOT 2019-04-12 21:52:16 +00:00
ONOS Jenkins User
2fca16ba88 Tagging 2.1.0-rc1 2019-04-12 21:52:06 +00:00
Carmelo Cascone
c2be50a804 Allow sharing the same gRPC channel between clients
This change introduces a refactoring of the gRPC protocol subsystem that
allows the creation of a gRPC chanel independently of the client, while
allowing multiple clients to share the same channel (e.g. as in Stratum
where we use 3 clients).

Moreover, we refactor the P4RuntimeClient API to support multiple
P4Runtime-internal device ID using the same client. While before the
client was associated to one of such ID.

Finally, we provide an abstract implementation for gRPC-based driver
behaviors, reducing code duplication in P4Runtime, gNMI and gNOI drivers.

Change-Id: I1a46352bbbef1e0d24042f169ae8ba580202944f
2019-04-11 23:14:41 +00:00
Ray Milkey
8a06403af8 Fix typo - componenService -> componentService
Change-Id: Ibcabc473c00ea8081ab0fe6cce29cb0d83441a29
2019-04-11 22:41:33 +00:00
Ray Milkey
397caca173 Fix ONOS-7958 - problems that were causing failures when onos-core restarts
Change-Id: I186107a386827d66f017182a573377a6a7bb7b00
2019-04-02 00:07:14 +00:00
Harshada Chaundkar
dcd1b14987 Packet throttle support
Change-Id: I6f2da5ed25f794561349013bfcbf9afa85d5e190
2019-03-28 18:36:17 +00:00
Ray Milkey
69ca82acc5 Don't assume that there is a device id in the event message
Change-Id: Ibf77ea7c8fec1a7baff5fa6e0aca50bb7cb3425b
2019-03-28 10:06:15 -07:00
debmaiti
9553ed76ef Port Annotation bug fix
1. Handled the case when InternalNetworkConfigListener in DeviceManager recieves an event associated with PortAnotationConfig class.
2. Added CONFIG_REMOVED event type in InternalNetworkConfigListener in DeviceManager.
3. Changed comine function in PortAnnotationOperator to take care of removing old annotations from PortDescription which are not in current
PortAnnotationConfig.

Tested using 'annotate-ports' command and 'ports' command

Change-Id: Ie4d2b529c2f559a40a296d916193318e0ccc7b93
2019-03-28 16:44:21 +05:30
pier
5e3afe560d Fix NPE when pending operations are not present
(due to possible race condition)

2019-02-15 11:18:45,407 | WARN  | -event-barrier-1 | LocalCache                       | 94 | Exception thrown by removal listener
java.lang.NullPointerException
	at org.onosproject.net.flow.impl.FlowRuleManager$InternalStoreDelegate.notify(FlowRuleManager.java:639)
	at org.onosproject.net.flow.impl.FlowRuleManager$InternalStoreDelegate.notify(FlowRuleManager.java:591)
	at org.onosproject.store.AbstractStore.notifyDelegate(AbstractStore.java:58)
	at org.onosproject.store.flow.impl.ECFlowRuleStore.batchOperationComplete(ECFlowRuleStore.java:638)
	at org.onosproject.net.flow.impl.FlowRuleManager$InternalFlowRuleProviderService.batchOperationCompleted(FlowRuleManager.java:577)
	at org.onosproject.provider.of.flow.impl.OpenFlowRuleProvider.lambda$createBatchCache$0(OpenFlowRuleProvider.java:231)
	at com.google.common.cache.LocalCache.processPendingNotifications(LocalCache.java:1967)[94:com.google.guava:22.0.0]
	at com.google.common.cache.LocalCache$Segment.runUnlockedCleanup(LocalCache.java:3642)[94:com.google.guava:22.0.0]
	at com.google.common.cache.LocalCache$Segment.postWriteCleanup(LocalCache.java:3618)[94:com.google.guava:22.0.0]
	at com.google.common.cache.LocalCache$Segment.remove(LocalCache.java:3246)[94:com.google.guava:22.0.0]
	at com.google.common.cache.LocalCache.remove(LocalCache.java:4413)[94:com.google.guava:22.0.0]
	at com.google.common.cache.LocalCache$LocalManualCache.invalidate(LocalCache.java:5081)[94:com.google.guava:22.0.0]
	at org.onosproject.provider.of.flow.impl.OpenFlowRuleProvider$InternalFlowProvider.handleMessage(OpenFlowRuleProvider.java:466)[170:org.onosproject.onos-providers-openflow-flow:1.12.2.SNAPSHOT]
	at org.onosproject.openflow.controller.impl.OpenFlowControllerImpl$OFMessageHandler.run(OpenFlowControllerImpl.java:773)[167:org.onosproject.onos-protocols-openflow-ctl:1.12.2.SNAPSHOT]
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)[:1.8.0_192]
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)[:1.8.0_192]
	at java.lang.Thread.run(Thread.java:748)[:1.8.0_192]

Change-Id: I6eb64524c5e209c4a6d6a6f147d7ab0c86137246
2019-03-26 01:03:34 +00:00
Carmelo Cascone
a7e60c65c8 Various fixes for P4Runtime group handling
- Workaround for PI bug that ignores max_group_size
- Use max_group_size and not buckets size when translating groups

Change-Id: Id12a12311b20ca8fb4e785e1c5a4f0f4215d1bbf
2019-03-23 01:04:10 +00:00
Carmelo Cascone
4f73fac78a Use max_group_size 1 for INDIRECT groups
Change-Id: I8db03a88af06b373d615e05c4b01e47579df2398
2019-03-22 05:00:52 +00:00
Ray Milkey
bd508ede5c cfgdef tool modifications to catch variable names that don't match properties
- catch errors in the cfgdef tool and abort compilation if a mismatch
  is seen
- Fix mismatches in the code discovered by the tool

Change-Id: Icd9a15eb9312bba6c2208b0b2a684062fcdc19c3
2019-03-21 19:07:31 +00:00
Carmelo Cascone
95308287cf Fix pipeline not marked as READY after device reboot
Since Stratum persists pipeline config across reboots, the
GeneralDeviceProvider was marking the device available as the device
had a pipeline config set right after the connection open event, but we
had to wait for the periodic PipeconfWatchdog check to mark the pipeline
as READY. Now we trigger a PipeconfWatchdog check after every device
availability change event.

Change-Id: I11a6f52ff5ea5304aa26dbe39786a25055b828aa
2019-03-19 19:51:43 +00:00
Carmelo Cascone
ab5d41e8ab Add support for enabling/disabling ports for gNMI devices
This change also includes:
- Refactoring of gNMI protocol+driver to take advantage of the recent
changes to the gRPC protocol subsystem (e.g. no more locking, start RPC
with timeouts, etc.).
- Fixed Stratum driver to work after GeneralDeviceProvider refactoring
- Updated bmv2.py to generate ChassisConfig for stratum_bmv2
- Fixed portstate command to use the same port name as in the store

Change-Id: I0dad3bc73e4b6d907b5cf6b7b9a2852943226be7
2019-03-07 07:45:32 +00:00
Ruchi Sahota
e4934e16fd Moving the device event handling to separate thread
Change-Id: Idfffee1ef46fda4248839854fa2d87f3db6008bb
2019-03-07 04:14:26 +00:00
Jordan Halterman
b81fdc1168 Optimize filtering flow rule counts by state
Change-Id: I1e1d80b8e618743ee449162a081cf42e71c99abf
2019-03-06 17:59:20 -08:00
Carmelo Cascone
3977ea4d9e Refactor channel and mastership handling in P4Runtime
This (big) change aims at solving the issue observed with mastership flapping
and device connection/disconnection with P4Runtime.

Channel handling is now based on the underlying gRPC channel state. Before,
channel events (open/close/error) were generated as a consequence of P4Runtime
StreamChannel events, making device availability dependent on mastership. Now
Stream Channel events only affect mastership (MASTER/STANDBY or NONE when the
SteamChannel RPC is not active).

Mastership handling has been refactored to generate P4Runtime election IDs that
are compatible with the mastership preference decided by the MastershipService.

GeneralDeviceProvider has been re-implemented to support in-order
device event processing and to reduce implementation complexity. Stats polling
has been moved to a separate component, and netcfg handling updated to only
depend on BasicDeviceConfig, augmented with a pipeconf field, and re-using the
managementAddress field to set the gRPC server endpoints (e.g.
grpc://myswitch.local:50051). Before it was depending on 3 different config
classes, making hard to detect changes.

Finally, this change affects some core interfaces:
- Adds a method to DeviceProvider and DeviceHandshaker to check for device
availability, making the meaning of availability device-specific. This is needed
in cases where the device manager needs to change the availability state of a
device (as in change #20842)
- Support device providers not capable of reconciling mastership role responses
with requests (like P4Runtime).
- Clarify the meaning of "connection" in the DeviceConnect behavior.
- Allows driver-based providers to check devices for reachability and
availability without probing the device via the network.

Change-Id: I7ff30d29f5d02ad938e3171536e54ae2916629a2
2019-03-06 19:28:42 +00:00
Jordan Halterman
2ef1cf725e Support DNS storage discovery via cluster metadata
Change-Id: I62499cb8d6bff57d780e7aaaf07eaa84ec332192
2019-03-05 00:08:10 +00:00
Ray Milkey
1f0764a43f Remove soft fail for registering an empty property set
- removed soft fail
- fixed property reference in DriverRegistryManager that had been refactored out
- fixed property references in FlowObjectiveManager so that property name and
  variable name match

Change-Id: I1324c0553e0f6945087b29794f0a06ae6dd8ab10
2019-03-01 13:58:56 -08:00
Jordan Halterman
368bd3d646 Ensure devices are marked online during mastership check
Change-Id: I421739d14d7fe71821ac3c0c6c3002d93ee58527
(cherry picked from commit 8ac0247267b705340f4110b5853d2fbac6a010d6)
2019-02-26 23:03:16 +00:00
Ray Milkey
17801b4fca remove deprecated removeRulesById() method
Change-Id: I9aef85eb8a9146e11e800cb3e524fb2b4e19d4f9
2019-02-26 21:26:02 +00:00
Ray Milkey
4f7e3631d2 Removal of deprecated APIs
- OchSignal constructor
- unfiltered connect point methods in single point to multi point intents
- useBackup() method from disjoint paths
- ChannelAdapter class
- getLastUpdatedInstant() method from cluster store
- switchWorkingPath() method from protection config behaviour
- getVersion() method from partition
- getFlowRulesById() method from flow rule service

Change-Id: I5c6c2f31725f7e7e44ac2abb18ce3fb96b09d93e
2019-02-22 18:01:45 +00:00
Ray Milkey
887c1cad50 Update apache karaf to version 4.2.3
Change-Id: If9aadfa2715a3f100df6e34e25789e74399759a0
2019-02-20 21:32:08 +00:00
Ray Milkey
e453edccc5 Export the ResourceQueryService, needed by the linkprops app
Change-Id: Ie9c85398c344b00397d5c357441d730264db27bb
2019-02-20 20:54:06 +00:00
Ray Milkey
f632826bc2 Remove deprecated Node APIs
Change-Id: I3e235ff213fc376c02ac01eb43f72d72ab4d17f4
2019-02-20 20:53:18 +00:00
Ray Milkey
e1077f8ed7 Remove calls to deprecated public intent data constructor
Change-Id: Ic77c1d2cfb3e954bc0b7ee6a8a66d9c4b8167872
2019-02-20 20:52:38 +00:00
Ray Milkey
a90d9749cf remove useless trace statement
Change-Id: If29a03b7db60cb3bb6598e47a7dc6d81342d71dc
2019-02-14 22:51:23 +00:00
Ray Milkey
5ec42085af Remove deprecated Port Statistics APIs
- Builder set of port number as an integer
- Query port number as an integer

Change-Id: Id4b4380c75237f293d2cc28a102748d416cf5c01
2019-02-14 17:43:07 +00:00
Ray Milkey
11ce930557 Fix a few more app startup/shutdown problems
Change-Id: Ideb48a1e845ae345306fa10ec55499c471566ce7
2019-02-09 20:24:12 +00:00
Ray Milkey
31b0048a78 Suppress exception stack traces on warning conditions to prevent STC faiures for non-fatal situations
Change-Id: I10d4945e92b3674f00725597d00fc13cc140c943
2019-02-07 18:15:23 +00:00
Carmelo Cascone
4c289b731d New P4RuntimeClient implementation that supports batching and error reporting
The new client API supports batching and provides detailed response for
write requests (e.g. if entity already exists when inserting), which was
not possible with the old one.

This patch includes:
- New more efficient implementation of P4RuntimeClient (no more locking,
use native gRPC executor, use stub deadlines)
- Ported all codecs to new AbstractCodec-based implementation (needed to
implement codec cache in the future)
- Uses batching in P4RuntimeFlowRuleProgrammable and
P4RuntimeGroupActionProgrammable
- Minor changes to PI framework runtime classes

Change-Id: I3fac42057bb4e1389d761006a32600c786598683
2019-02-04 23:12:46 -08:00
Ray Milkey
4972416f9d Remove deprecated APIs from packet classes
Change-Id: Id02d759077e19e84ed290994ca53b2a0593de223
2019-01-28 09:11:35 -08:00
Carmelo Cascone
99c59dbb03 ONOS-7898 Action profile group/member refactoring
Also includes:
- New abstract P4Runtime codec implementation. Currently used for action
profile members/groups encoding/deconding, the plan is to handle all
other codecs via this.
- Improved read requests in P4RuntimeClientImpl
- Removed handling of max group size in P4Runtime driver. Instead, added
modified group translator to specify a max group size by using
information from the pipeline model.

Change-Id: I684bae0184d683bb448ba19863c561f9848479d2
2019-01-17 18:11:43 -08:00
Charles Chan
0a6330f33f ONOS-7896 Fix a bug that results in flow obj queue not being dequeued properly
The bug is introduced in 20858

Change-Id: I601aa5b2cfecb61064204b1d071e5e052d4f0410
2019-01-16 22:03:47 +00:00
Carmelo Cascone
cb4327a09e ONOS-7887 Rename action profile-related entities
Members can exist outside of a group. Previous naming was ambiguous
about this.

Action group -> action profile group
Action group member -> action profile member

Change-Id: I5097e92253353d355b864e689f9653df2d318230
2019-01-10 13:52:52 -08:00
Andrea Campanella
1c24fb9689 [ONOS-7885] Adding Terminal_device device Type
Change-Id: I42a8f8aeef73e1d51d4b5128b9eb7e8879d0418c
2019-01-10 08:44:26 +00:00