mirror of
https://github.com/opennetworkinglab/onos.git
synced 2025-10-17 10:21:52 +02:00
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