Uploaded image for project: 'OpenFlowPlugin'
  1. OpenFlowPlugin
  2. OPNFLWPLUG-1114

Incorrect controller role after multiple connections from a single switch

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: High High
    • Phosphorus
    • Phosphorus
    • clustering
    • None

      In Phosphorus the controller in a single controller cluster does not become master when there are multiple OpenFlow channel connections from a single switch, even after controller settings on the switch is reset and then a single OpenFlow channel connection is established. This does not always happen but it happens more often than not.

      Steps to reproduce:

      1. Start the controller
      2. In the Karaf console enable odl-openflowplugin-flow-services-rest feature

      feature:install odl-openflowplugin-flow-services-rest
      

      3. Create a Open vSwitch switch

      sudo ovs-vsctl add-br s1
      

      4. Watch the controller connection status

      watch 'sudo ovs-vsctl --columns=target,role,status list controller'
      

      5. Open another terminal & run the following commands - replace <CONTROLLER_IP> with the IP address of the controller

      CONTROLLER_IP="<CONTROLLER_IP>"
      sudo ovs-vsctl set-controller s1 "tcp:$CONTROLLER_IP:6633" "tcp:$CONTROLLER_IP:6653"
      sleep 30
      sudo ovs-vsctl del-controller s1
      sudo ovs-vsctl set-controller s1 "tcp:$CONTROLLER_IP:6633"
      

      During step 5 controller's role does not become master (just other or slave).

      Normally, the following get-entities RPC returns the owner of each switch when a switch is connected to the controller.

      curl --location --request POST 'http://<CONTROLLER_IP>:8181/rests/operations/odl-entity-owners:get-entities' \
                              --header 'Accept: application/yang-data+json' \
                              --header 'Content-Type: application/yang-data+json' \
                              --header 'Authorization: Basic YWRtaW46YWRtaW4='
      

      For example,

      {
        "odl-entity-owners:output": {
          "entities": [
            {
              "type": "org.opendaylight.mdsal.AsyncServiceCloseEntityType",
              "name": "ofp-topology-manager",
              "candidate-nodes": [
                "member-1"
              ],
              "owner-node": "member-1"
            },
            {
              "type": "org.opendaylight.mdsal.ServiceEntityType",
              "name": "openflow:81985529216486895",
              "candidate-nodes": [
                "member-1"
              ],
              "owner-node": "member-1"
            },
            {
              "type": "org.opendaylight.mdsal.AsyncServiceCloseEntityType",
              "name": "openflow:81985529216486895",
              "candidate-nodes": [
                "member-1"
              ],
              "owner-node": "member-1"
            },
            {
              "type": "org.opendaylight.mdsal.ServiceEntityType",
              "name": "ofp-topology-manager",
              "candidate-nodes": [
                "member-1"
              ],
              "owner-node": "member-1"
            }
          ]
        }
      }
      

      However, after step 5 the RPC shows that the switch is not registered in EOS even though the switch is connected to the controller.

      {
        "odl-entity-owners:output": {
          "entities": [
            {
              "type": "org.opendaylight.mdsal.ServiceEntityType",
              "name": "ofp-topology-manager",
              "candidate-nodes": [
                "member-1"
              ],
              "owner-node": "member-1"
            },
            {
              "type": "org.opendaylight.mdsal.AsyncServiceCloseEntityType",
              "name": "ofp-topology-manager",
              "candidate-nodes": [
                "member-1"
              ],
              "owner-node": "member-1"
            }
          ]
        }
      }
      

      This is a regression causing CSIT test Bug_Validation/8723.robot to fail.

            sangwookha Sangwook Ha
            sangwookha Sangwook Ha
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: