Add doc for bundle reconciliation usage 26/70326/3
authorD Arunprakash <d.arunprakash@ericsson.com>
Wed, 4 Apr 2018 08:36:46 +0000 (14:06 +0530)
committerD Arunprakash <d.arunprakash@ericsson.com>
Wed, 4 Apr 2018 09:51:50 +0000 (15:21 +0530)
Add documentation for bundle reconciliation usage

Change-Id: Idfb1828015335bdd39df9796f48c6878e76aa6fc
Signed-off-by: D Arunprakash <d.arunprakash@ericsson.com>
docs/specs/bundle-reconciliation.rst [new file with mode: 0644]
docs/specs/group-add-mod.rst
docs/specs/index.rst
docs/specs/reconciliation-framework.rst
openflowplugin-blueprint-config/src/main/resources/initial/openflowplugin.cfg

diff --git a/docs/specs/bundle-reconciliation.rst b/docs/specs/bundle-reconciliation.rst
new file mode 100644 (file)
index 0000000..d6659f3
--- /dev/null
@@ -0,0 +1,204 @@
+.. contents:: Table of Contents
+   :depth: 3
+
+==============================
+Openflow Bundle Reconciliation
+==============================
+
+`Bundle Reconciliation Review <https://git.opendaylight.org/gerrit/#/c/60520/>`__
+
+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 <d.arunprakash@ericsson.com>
+
+Other contributors:
+  Sunil Kumar G <sunil.g.kumar@ericsson.com>
+
+  Suja T <suja.t@ericsson.com>
+
+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
index 7c81ba39a656278692c66b45a30c76a0d3d04b4e..aec60949116ea7be7c28a90efabae80a90025848 100644 (file)
@@ -83,11 +83,11 @@ Below yang changes will be done in order to provide configuration support for gr
 .. code-block:: none
    :caption: openflow-switch-connection-config.yang
 
-       leaf group-add-mod-enabled {
-            description "Group Add Mod Enabled";
-            type boolean;
-            default false;
-       }
+   leaf group-add-mod-enabled {
+        description "Group Add Mod Enabled";
+        type boolean;
+        default false;
+   }
 
 Configuration impact
 --------------------
@@ -126,8 +126,8 @@ User can enable OFPGC_ADD_OR_MOD by changing the value to true in below files,
 .. code-block:: none
    :caption: default(legacy)-openflow-connection-config.xml
 
-        default-openflow-connection-config.xml  <group-add-mod-enabled>false</group-add-mod-enabled>
-        legacy-openflow-connection-config.xml   <group-add-mod-enabled>false</group-add-mod-enabled>
+   default-openflow-connection-config.xml  <group-add-mod-enabled>false</group-add-mod-enabled>
+   legacy-openflow-connection-config.xml   <group-add-mod-enabled>false</group-add-mod-enabled>
 
 REST API
 --------
@@ -142,10 +142,10 @@ Implementation
 Assignee(s)
 -----------
 Primary assignee:
-  D Arunprakash <d.arunprakash@ericsson.com>
+  Arunprakash D <d.arunprakash@ericsson.com>
 
 Other contributors:
-  Gobinath Suganthan <gobinath@ericsson.com
+  Gobinath Suganthan <gobinath@ericsson.com>
 
 Work Items
 ----------
index 23ec40fba96d80418535d61fc144789be699a9d6..771fda4c04261aff81644f15298463d803e7de0c 100644 (file)
@@ -1,9 +1,8 @@
 Openflowplugin Design Specifications
 ====================================
 
-Starting from Nitrogen, Openflowplugin uses RST format Design Specification document for
-all new features. These specifications are perfect way to understand various
-Openflowplugin features.
+Starting from Nitrogen, Openflowplugin uses RST format Design Specification document for all new features.
+These specifications are perfect way to understand various Openflowplugin features.
 
 Contents:
 
@@ -12,3 +11,4 @@ Contents:
 
    reconciliation-framework
    group-add-mod
+   bundle-reconciliation
index cc453a29ecc16329ec84d0aceb75ffbfad84e874..4bb0c7068f44511fe39e0cd05b7a7f29e6437892 100644 (file)
@@ -227,9 +227,9 @@ Implementation
 Assignee(s)
 -----------
 Primary assignee:
- - Prasanna Huddar(prasanna.k.huddar@ericsson.com)
- - Arunprakash D (d.arunprakash@ericsson.com)
- - Gobinath Suganthan (gobinath@ericsson.com)
+ - Prasanna Huddar <prasanna.k.huddar@ericsson.com>
+ - Arunprakash D <d.arunprakash@ericsson.com>
+ - Gobinath Suganthan <gobinath@ericsson.com>
 
 Other contributors:
 
index defc24f9148d20edd30afaf30ca8070dd45c4bdd..1d04928e10bc8ea39e573d8b5f5c3d4cde38a0da 100644 (file)
 # reconciliation-retry-count=5
 
 #
-# To Enable bundle based reconciliation change the configuration value to true.
-# By default it will be false which means bundle based reconciliation will be disabled
-# and normal reconciliation will be enabled.
-# NOTE: This option will be effective only if disable_reconciliation=false.
+# 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
 
 #############################################################################