Remove OVSDB disconnect from the cluster test 52/34652/5
authorLuis Gomez <ecelgp@gmail.com>
Mon, 15 Feb 2016 02:24:57 +0000 (18:24 -0800)
committerGerrit Code Review <gerrit@opendaylight.org>
Tue, 16 Feb 2016 00:54:12 +0000 (00:54 +0000)
Current Get Cluster Entity Owner For Ovsdb keyword does not work
when there is more than one ovs instance connected or the same
instance reconnects (ovs uses a different uuid).

This is a short term fix, real fix is to get the ovs uuid
just after ovs connects to controller and use this uuid to
interrogate a new implementation of the entity owner keyword.

Also changing Connect Remote System -> Connet Mininet when applies.

Change-Id: I39fcfc062e4135afd821e56a40c142c6b2f61542
Signed-off-by: Luis Gomez <ecelgp@gmail.com>
csit/libraries/ClusterOvsdb.robot
csit/libraries/OVSDB.robot
csit/suites/ovsdb/Southbound_Cluster/020__Southbound_Cluster_Extension.robot

index 7544ed69c8c408f4f05348f0057f09b2343fb012..77c39cebca3eb1fa826908dbacdc3a96d98d4552 100644 (file)
@@ -90,7 +90,7 @@ Create Bridge And Verify
 Create Bridge Manually And Verify
     [Arguments]    ${controller_index_list}    ${controller_index}
     [Documentation]    Create bridge in ${controller_index} and verify it gets applied in all instances in ${controller_index_list}.
-    Run Command On Remote System    ${TOOLS_SYSTEM_IP}    sudo ovs-vsctl add-br br-s1
+    Run Command On Mininet    ${TOOLS_SYSTEM_IP}    sudo ovs-vsctl add-br br-s1
     ${dictionary_operational}=    Create Dictionary    br-s1=5
     ${dictionary_config}=    Create Dictionary    br-s1=0
     Wait Until Keyword Succeeds    5s    1s    Check Item Occurrence At URI In Cluster    ${controller_index_list}    ${dictionary_config}    ${CONFIG_TOPO_API}
@@ -99,7 +99,7 @@ Create Bridge Manually And Verify
 Delete Bridge Manually And Verify
     [Arguments]    ${controller_index_list}    ${controller_index}
     [Documentation]    Delete bridge in ${controller_index} and verify it gets applied in all instances in ${controller_index_list}.
-    Run Command On Remote System    ${TOOLS_SYSTEM_IP}    sudo ovs-vsctl del-br br-s1
+    Run Command On Mininet    ${TOOLS_SYSTEM_IP}    sudo ovs-vsctl del-br br-s1
     ${dictionary}=    Create Dictionary    br-s1=0
     Wait Until Keyword Succeeds    5s    1s    Check Item Occurrence At URI In Cluster    ${controller_index_list}    ${dictionary}    ${OPERATIONAL_TOPO_API}
 
@@ -146,7 +146,7 @@ Delete Port And Verify
 Add Port To The Manual Bridge And Verify
     [Arguments]    ${controller_index_list}    ${controller_index}
     [Documentation]    Add Port in ${controller_index} and verify it gets applied in all instances in ${controller_index_list}.
-    Run Command On Remote System    ${TOOLS_SYSTEM_IP}    sudo ovs-vsctl add-port br-s1 vx1 -- set Interface vx1 type=vxlan
+    Run Command On Mininet    ${TOOLS_SYSTEM_IP}    sudo ovs-vsctl add-port br-s1 vx1 -- set Interface vx1 type=vxlan
     ${dictionary_operational}=    Create Dictionary    vx1=2
     ${dictionary_config}=    Create Dictionary    vx1=0
     Wait Until Keyword Succeeds    5s    1s    Check Item Occurrence At URI In Cluster    ${controller_index_list}    ${dictionary_config}    ${CONFIG_TOPO_API}
@@ -193,7 +193,8 @@ Create Bridge In Candidate
     Log    ${body}
     ${TOOLS_SYSTEM_IP1}    Replace String    ${TOOLS_SYSTEM_IP}    ${TOOLS_SYSTEM_IP}    "${TOOLS_SYSTEM_IP}"
     ${dictionary}=    Create Dictionary    ${TOOLS_SYSTEM_IP1}=1    ${OVSDBPORT}=4    ${BRIDGE}=1
-    Wait Until Keyword Succeeds    20s    1s    Put And Check At URI In Cluster    ${controller_index_list}    ${controller_index}    ${CONFIG_TOPO_API}/topology/ovsdb:1/node/ovsdb:%2F%2Fuuid%2F${ovsdb_uuid}%2Fbridge%2F${BRIDGE}    ${body}
+    Wait Until Keyword Succeeds    20s    1s    Put And Check At URI In Cluster    ${controller_index_list}    ${controller_index}    ${CONFIG_TOPO_API}/topology/ovsdb:1/node/ovsdb:%2F%2Fuuid%2F${ovsdb_uuid}%2Fbridge%2F${BRIDGE}
+    ...    ${body}
     Wait Until Keyword Succeeds    5s    1s    Check Item Occurrence At URI In Cluster    ${controller_index_list}    ${dictionary}    ${OPERATIONAL_TOPO_API}/topology/ovsdb:1/node/ovsdb:%2F%2Fuuid%2F${ovsdb_uuid}
 
 Create Port Vxlan in Candidate
index 8174fb97f03935eca68c4b5e9d0b818733b3600f..fd97261a7df42f5b07252357ed6062a54ab3dc5b 100644 (file)
@@ -84,8 +84,8 @@ Get OVSDB UUID
     : FOR    ${node}    IN    @{node_list}
     \    ${node_id}=    Get From Dictionary    ${node}    node-id
     \    ${node_uuid}=    Replace String    ${node_id}    ovsdb://uuid/    ${EMPTY}
-    \    # Since    bridges are also listed as nodes, but will not have the extra "ovsdb:connection-info data, we need to
-    \    # use "Run Keyword And Ignore Error" below.
+    # Since bridges are also listed as nodes, but will not have the extra "ovsdb:connection-info data, we need to
+    # use "Run Keyword And Ignore Error" below.
     \    ${status}    ${connection_info}    Run Keyword And Ignore Error    Get From Dictionary    ${node}    ovsdb:connection-info
     \    ${status}    ${remote_ip}    Run Keyword And Ignore Error    Get From Dictionary    ${connection_info}    remote-ip
     \    ${uuid}=    Set Variable If    '${remote_ip}' == '${ovs_system_ip}'    ${node_uuid}    ${uuid}
@@ -94,9 +94,9 @@ Get OVSDB UUID
 Collect OVSDB Debugs
     [Arguments]    ${switch}=br-int
     [Documentation]    Used to log useful test debugs for OVSDB related system tests.
-    ${output}=    Run Command On Remote System    ${TOOLS_SYSTEM_IP}    sudo ovs-vsctl show
+    ${output}=    Run Command On Mininet    ${TOOLS_SYSTEM_IP}    sudo ovs-vsctl show
     Log    ${output}
-    ${output}=    Run Command On Remote System    ${TOOLS_SYSTEM_IP}    sudo ovs-ofctl -O OpenFlow13 dump-flows ${switch} | cut -d',' -f3-
+    ${output}=    Run Command On Mininet    ${TOOLS_SYSTEM_IP}    sudo ovs-ofctl -O OpenFlow13 dump-flows ${switch} | cut -d',' -f3-
     Log    ${output}
 
 Clean OVSDB Test Environment
@@ -105,7 +105,7 @@ Clean OVSDB Test Environment
     ...    tests. Not every step will always be neccessary, but should not cause any problems for
     ...    any new ovsdb test suites.
     Clean Mininet System    ${tools_system}
-    Run Command On Remote System    ${tools_system}    sudo ovs-vsctl del-manager
-    Run Command On Remote System    ${tools_system}    sudo /usr/share/openvswitch/scripts/ovs-ctl stop
-    Run Command On Remote System    ${tools_system}    sudo rm -rf /etc/openvswitch/conf.db
-    Run Command On Remote System    ${tools_system}    sudo /usr/share/openvswitch/scripts/ovs-ctl start
+    Run Command On Mininet    ${tools_system}    sudo ovs-vsctl del-manager
+    Run Command On Mininet    ${tools_system}    sudo /usr/share/openvswitch/scripts/ovs-ctl stop
+    Run Command On Mininet    ${tools_system}    sudo rm -rf /etc/openvswitch/conf.db
+    Run Command On Mininet    ${tools_system}    sudo /usr/share/openvswitch/scripts/ovs-ctl start
index 4c11c47aaf6c77b56f5f8a92a871e2b4b2a34140..4932d682adf149292b9b37b1308c9f6b1611233e 100644 (file)
@@ -100,5 +100,7 @@ Delete Bridge Via Rest Call And Verify In Owner After Recover
     Delete Bridge In Candidate    ${original_cluster_list}    ${new_owner}
 
 Cleans Up Test Environment For Next Suite
-    [Documentation]    Cleans up test environment, close existing sessions in teardown.
+    [Documentation]    Cleans up test environment, close existing sessions in teardown. This step needs to be excluded
+    ...    until the keyword "Get Cluster Entity Owner For Ovsdb" is fixed to search using ovs uuid as argument.
+    [Tags]    exclude
     Configure Exit OVSDB Connection    ${original_cluster_list}    ${new_owner}