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
This prevents loading potentially large amount of data in memory when
doing pipeconf reconciliation, as well as unregistering a pipeconf while
devices are using it (since we no longer need to access the
target-specific extensions to generate the device data blob)
Change-Id: Ib54123ce49a931ff88d93c991244d4086e5d7de0
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
Force reset of gRPC connection backoff when probing for reachability.
This allows provider to attempt reconnection when needed, instead of
depending on the channel backoff timer.
Improved checkup task in GDP to better handle mastership
flapping observed when reconnecting devices.
Change-Id: I473fb14160b2eb744a483de431b91f9f6bcdab95
- Push ports before device is marked online
- Do not notify role NONE on device disconnection (otherwise the
DeviceManager won't mark the device as offline if there's not a master)
- Detect changes in the pipeconf extensions when reloading a pipeconf
Change-Id: I1779987da1269ec98c71b2ccda7bb579be5bf3f0
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
The P4RuntimeClient implements a deferring mechanism to avoid becoming
master when it shouldn't, i.e. when the requested election ID is bigger
than the master one on the device, but it was not asked to be master.
We rely on a distributed primitive to make sure all nodes are aware of
the latest master election ID on the device. In case we lose primitive
update events, this patch adds a maximum timeout after which the
MasterArbitrationUpdate message is always sent.
Change-Id: I98669dac3fc79173b9e98f41e11a4d08901c6cb1
- Do not read counters with table entries for Barefoot drivers
- If driver behavior setup fails, log which operation we are aborting
- Remove unnecessary setup steps in Stratum-related drivers
- Always get clients by their key in gRPC-based drivers
- Log when P4Runtime group operation fails because of missing group in
store
- Fix polling of table entry counters for P4Runtime driver
Change-Id: Ic9bf19b76d8cb5a191aec24852af4410fea8b998
This is a temporary workaround to the inability of p4c to
correctly interpret P4Runtime-defined @max_group_size annotations.
Change-Id: If2799786c135b2eb5b6a3b4c6d6022350d37237e
- 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
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
This is achieved by optimistically updating the P4Runtime mirror using
the write request (instead of waiting for a response) and by serializing
building write requests for the same device.
This change requires updating the P4Runtime protocol classes to expose
the content of the write request.
It also includes:
- force member weight to 1 when reading groups (some server
implementation still fails to be compliant to the spec)
- remove unused operation timeout handling in GDP (now all RPCz have a
timeout)
Change-Id: Ib4f99a6085c1283f46a2797e0c883d96954e02e9
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
Unproprer issuing of Device_UNREGISTERED event was causing incorrect device
removal during session re-establishment.
Unconsistent state in ports and links resulted.
Change-Id: Ie07d9077ff0b197a1cb8936b1f307807fae34aeb
Includes also various improvements to the p4vm scripts, such as:
- Choose to build VM with Ubuntu 16.04 or 18.04 (experimental)
- Allow users to specify version of protobuf and grpc to use
- Avoid building protobuf and grpc if already installed in the system
- Install Bazel 0.22
Also:
- Remove check for invalid group member weights (now PI always returns
members with weight 1)
- Re-compiled all P4 programs and fixed missing padding in controller
packet headers
Change-Id: I0e672fcebbaba63354c749f0c774af251f3cbc6c
Requires bumping other dependencies in deps.json such as Netty (4.1.32)
and error_prone_annotations. Includes also fixes detected by updated
errorprone.
Change-Id: Ic2bd86931cc89bfb2cf1a4cb11a4586bc8cac608
- Write calls to file, one file for each channel
- Log started, inbound msg, outbound msg, and closed events, for each RPC
- Distinguish between different RPCs by assigning an ID to each one
Also, removed redundant DeviceId attribute from GrpcChannelId, as all
channel IDs were already created using a client key that contains the
DeviceID. It seems a better approach to not restrict the definition of a
channel ID and have that defined simply as a string.
Change-Id: I9d88e528218a5689d6835c9b48022119976b6c5a
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
- Bumped version of protobuf to 3.6.1.3 (includes fix for Bazel 0.22)
- Removed all protobuf and grpc dependencies from deps.json. Instead,
depends solely on what's provided by the external grpc and protobuf
workspaces.
- Use OSGi-wrapped protobuf and grpc JARs built with Bazel for runtime
- Add missing netty-related bundles to onos-thirdparty-base (required
by grpc)
Note, build with Bazel 0.22 is still broken because of
osgi_java_library.bzl, unless the following build arg is used:
build --incompatible_string_is_not_iterable=false
It seems the error is caused by dead code in osgi_java_library.bzl
that should be removed.
Change-Id: I749f1de25902bf9df5242444380f7224bc99b4b5
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
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
Includes also other minor changes to gRPC channel creation/connection
process, such as:
- More compact logs showing the gRPC client key
- GrpcChannelController.connectChannel() now returns the same
StatusRuntime exception, no need to wrap it in an IOException
- Wait for channel shutdown after initial connection error
Change-Id: Ib7d2b728b8c82d9f9b2097cffcebd31cac891b27
created netty specific feature separate from third-party-base
refactored boot features to ensure proper boot sequence for netty, sshd, and core-net
moved http codec to netty feature
Change-Id: Ie6e0ce14fba71603086b7cfe62e1c90a77fd18f2
Co-authored-by: Ray Milkey <ray@opennetworking.org>