Jump to: navigation, search

CrossProject:Integration Group:CSIT Test Plan Cluster HA

OpenDaylight Clustering

The OpenDaylight controller supports a cluster-based high availability model. There are several instances of the OpenDaylight controller, which logically act as one logical controller.

Prerequisites

  • Read documentation here before starting the cluster.
  • Configure and start cluster
  • Start Mininet (i.e. sudo mn --controller=remote,ip=Controller1_IP --topo tree,2)
    • This generates 3 nodes: s1 (*:01), s2 (*:02), s3 (*:03)
    • At this point only the Controller1 get provisioned in OVS bridges (s1, s2, s3)
    • s1 has 2 ports: 1,2 that connects to s2 and s3
    • s2 has 3 ports: 1 to host1 (10.0.0.1), 2 to host2 (10.0.0.2) and 3 to s1
    • s3 has 3 ports: 1 to host3 (10.0.0.3), 2 to host4 (10.0.0.4) and 3 to s1
  • Now, puase the Mininet (i.e. mininet> CTRL + Z)
  • In order to get both controllers provisioned in all OVS bridges, do the following commands with administrator priviledges:
    • $ ovs-vsctl set-controller s1 tcp:Controller1_IP:6633 tcp:Controller2_IP:6633
    • $ ovs-vsctl set-controller s2 tcp:Controller1_IP:6633 tcp:Controller2_IP:6633
    • $ ovs-vsctl set-controller s3 tcp:Controller1_IP:6633 tcp:Controller2_IP:6633

Notes

  • All the following test cases are written in Gherkin style (behavior-driven), and when possible the REST requests are provided.
  • Note that OpenDaylight controller needs a couple of minutes to get all of its modules loaded. Therefore, any test that comes after restarting the controller, has to be done after a couple of minutes delay.
  • By adding the proper flows in the the flow tables of the bridges, a path will be established between hosts, and then the ping will be successfull in Mininet (i.e. mininet> h1 ping h2).
  • For example the following commands will forward every packet arriving at port 1 to port 2 and vice-versa:
    • sudo dpctl add-flow tcp:Controller_IP:6634 in_port=1,actions=output:2
    • sudo dpctl add-flow tcp:Controller_IP:6634 in_port=2,actions=output:1

Test Content

Cluster Manager

Two controllers running
Given C1 a controller in cluster of two controllers
And C2 a controller in cluster of two controllers
And both controllers get provisioned on all OVS bridges
When C1 is up and running
And C2 is up and running
Then the system is working with C1 and C2
(The following is an alternative test)
Controller1 fails
Given C1 a controller in cluster of two controllers
And C2 a controller in cluster of two controllers
And both controllers get provisioned on all OVS bridges
When C1 goes down
Then C2 takes over
And the system is working with C2
(The following is an alternative test)
Controller2 fails
Given C1 a controller in cluster of two controllers
And C2 a controller in cluster of two controllers
And both controllers get provisioned on all OVS bridges
When C2 goes down
Then C1 takes over
And the system is working with C1
  • Similar to the case when Controller1 fails.
Controller1 recovers after failure
Given C1 goses down
And C2 takes over
When C1 recovers
Then the system is working with C1 and C2
(The following is an alternative test)
Controller1 and Controller2 fail
Given C1 a controller in cluster of two controllers
And C2 a controller in cluster of two controllers
And both controllers get provisioned on all OVS bridges
When C1 goes down
And C2 goes down
Then the system does not work any more
(The following is an alternative test)

Forwarding Rules Manager in a Cluster

The installed flow can be seen in a cluster of two controllers
Given C1 a controller in cluster of two controllers
And C2 a controller in cluster of two controllers
And both controllers get provisioned on all OVS bridges
When a flow is installed in a bridge
Then C1 see the flow
And C2 see the flow
The installed flow remains in the bridge after the controller failure
Given C1 a controller in cluster of two controllers
And C2 a controller in cluster of two controllers
And both controllers get provisioned on all OVS bridges
And a flow is installed in a bridge
And C1 see the flow
And C2 see the flow
And C1 goes down
When C1 recovers
Then C1 see the flow