.. contents:: Table of Contents :depth: 3 ============================== Openflow Bundle Reconciliation ============================== `Bundle Reconciliation Review `__ This spec addresses following enhancement in Openflowplugin module: Addition of new reconciliation mechanism in openflowplugin using openflow bundles. Bundle reconciliation will be supported from OVS2.6 and above. Problem description =================== Current reconciliation mechanism exists in FRM will read the config inventory data and push all the groups and flows via group and flow add messages and this mechanism is having the following limitations, 1. Group add during reconcilation will fail with GROUP_ALREADY_EXISTS error 2. Stale flows won't be removed from openflow switch after reconciliation. This leads to stale flow aggregation after every controller version upgarde. 3. Datapath traffic will get impacted as the flows will get replaced during reconciliation window. Bundle Reconciliation --------------------- Reconciliation using openflow bundles will overcome all the above mentioned limitations. Mainly there will be minimal or no datapath traffic hit. Bundle Concepts --------------- A bundle is a sequence of OpenFlow requests from the controller that is applied as a single OpenFlow operation. The first goal of bundles is to group related state changes on a switch so that all changes are applied together or that none of them is applied. The second goal is to better synchronise changes across a set of OpenFlow switches, bundles can be prepared and pre-validated on each switch and applied at the same time. A bundle is specified as all controllers messages encoded with the same bundle_id on a specific controller connection. Messages part of the bundle are encapsulated in a Bundle Add message, the payload of the Bundle Add message is formatted like a regular OpenFlow messages and has the same semantic. The messages part of a bundle are pre-validated as they are stored in the bundle, minimising the risk of errors when the bundle is applied. The applications of the message included in the Bundle Add message is postponed to when the bundle is committed. A switch is not required to accept arbitrary messages in a bundle, a switch may not accept some message types in bundles, and a switch may not allow all combinations of message types to be bundled together. For example, a switch should not allow to embed a bundle message within a Bundle Add message. At a minimum, a switch must be able to support a bundle of multiple flow-mods and port-mods in any order. When a bundle is opened, modifications are saved into a temporary staging area without taking effect. When the bundle is committed, the changes in the staging area are applied to the state (e.g. tables) used by the switch. If an error occurs in one modification, no change is applied to the state. Use Cases --------- a. Reconciliation using openflow bundles when controller restarts b. Reconciliation using openflow bundles when openflow switch restarts Proposed change --------------- Bundle reconciliation will be supported by ovs2.6 and above version or any openflow switch with bundles support. Bundle reconciliation will be disabled by default and user has to manually enable it when needed by making a configuration change. New configuration parameter will be introduced in openflowplugin.cfg to support the same. .. code-block:: none :caption: openflowplugin.cfg # # Bundle reconciliation can be enabled by making this flag to true. # By default bundle reconciliation is disabled and reconciliation happens # via normal flow/group mods. # NOTE: This option will be effective with disable_reconciliation=false. # # bundle-based-reconciliation-enabled=false By default bundle-based-reconciliation-enabled flag will be kept as false, which means reconciliation will happen via flow/group mod commands. Following steps will be executed in order to achieve bundle reconciliation, 1. Send open bundle message to the openflow switch 2. Send delete all flows bundle message 3. Send delete all groups bundle message 4. Read flows and groups from config inventory 5. Push groups via bundle message 6. Push flows via bundle message 7. Send commit bundle message to the openflow switch Pipeline changes ---------------- None Yang changes ------------ Below yang changes will be done in order to provide configuration support for bundle-based-reconciliation-enabled field. .. code-block:: none :caption: forwardingrules-manager-config.yang leaf bundle-based-reconciliation-enabled { type boolean; default false; } Configuration impact -------------------- None Clustering considerations ------------------------- None Other Infra considerations -------------------------- None Security considerations ----------------------- None Scale and Performance Impact ---------------------------- Unknown Targeted Release ---------------- Oxygen Alternatives ------------ None Usage ===== No external rpc/api will be provided. The implementation is internal to openflowplugin. User can enable bundles reconciliation by changing the value to true in openflowplugin.cfg .. code-block:: none :caption: openflowplugin.cfg # # Bundle reconciliation can be enabled by making this flag to true. # By default bundle reconciliation is disabled and reconciliation happens # via normal flow/group mods. # NOTE: This option will be effective with disable_reconciliation=false. # bundle-based-reconciliation-enabled=true REST API -------- No new REST API is being added. CLI --- No new CLI being added. Implementation ============== Assignee(s) ----------- Primary assignee: Arunprakash D Other contributors: Sunil Kumar G Suja T Work Items ---------- * Implementation of bundle reconciliation * Addition of configuration flag to enable/disable bundle reconciliation Dependencies ============ No new dependencies. Testing ======= Unit Tests ---------- #. Verify bundle reconciliation for controller restart #. Verify bundle reconciliation for openflow switch restart CSIT ---- CSIT test cases will be added in future Documentation Impact ==================== None References ========== [1] https://wiki.opendaylight.org/view/OpenDaylight_OpenFlow_Plugin:Bundles_extension_support [2] https://wiki.opendaylight.org/view/OpenDaylight_OpenFlow_Plugin:Bundles_usage