Use os-std-topo option in hwvtep jobs
[releng/builder.git] / jjb / integration / integration-deploy-openstack-run-test.sh
index 275e6c9c4a2613e88917aa4daafb5b694ca97e85..fbc577c2c7b6e8c4812bd628d5f16873bfa15029 100644 (file)
@@ -11,6 +11,9 @@ SSH="ssh -t -t"
 ADMIN_PASSWORD="admin"
 OPENSTACK_MASTER_CLIENTS_VERSION="queens"
 
+pip install odltools
+odltools -V
+
 # TODO: remove this work to run changes.py if/when it's moved higher up to be visible at the Robot level
 printf "\nshowing recent changes that made it into the distribution used by this job:\n"
 $PYTHON -m pip install --upgrade urllib3
@@ -54,6 +57,9 @@ DISTROSTREAM: ${DISTROSTREAM}
 BUNDLE_URL: ${BUNDLE_URL}
 CONTROLLERFEATURES: ${CONTROLLERFEATURES}
 CONTROLLERDEBUGMAP: ${CONTROLLERDEBUGMAP}
+SCRIPTPLAN: ${SCRIPTPLAN}
+CONFIGPLAN: ${CONFIGPLAN}
+STREAMTESTPLAN: ${STREAMTESTPLAN}
 TESTPLAN: ${TESTPLAN}
 SUITES: ${SUITES}
 PATCHREFSPEC: ${PATCHREFSPEC}
@@ -138,7 +144,7 @@ function install_openstack_clients_in_robot_vm() {
     done
 
     if [ "${ENABLE_NETWORKING_L2GW}" == "yes" ]; then
-        #networking-l2gw is not officially available in any release yet. Gettting the latest stable version.
+        #networking-l2gw is not officially available in any release yet. Getting the latest stable version.
         $PYTHON -m pip install networking-l2gw==11.0.0
     fi
 }
@@ -155,17 +161,6 @@ function is_openstack_feature_enabled() {
     echo 0
 }
 
-function fix_libvirt_version_n_cpu_pike() {
-    local ip=$1
-    ${SSH} ${ip} "
-        cd /opt/stack;
-        git clone https://git.openstack.org/openstack/requirements;
-        cd requirements;
-        git checkout stable/pike;
-        sed -i s/libvirt-python===3.5.0/libvirt-python===4.2.0/ upper-constraints.txt
-   "
-}
-
 #Function to install rdo release
 # This will help avoiding installing wrong version of packages which causes
 # functionality failures
@@ -384,6 +379,17 @@ minimize_polling=True
 # MTU(1400) + VXLAN(50) + VLAN(4) = 1454 < MTU eth0/br-physnet1(1458)
 physical_network_mtus = ${PUBLIC_PHYSICAL_NETWORK}:1400
 path_mtu = 1458
+EOF
+
+    if [ "${ENABLE_NETWORKING_L2GW}" == "yes" ]; then
+        cat >> ${local_conf_file_name} << EOF
+
+[ml2_odl]
+enable_dhcp_service = True
+EOF
+    fi
+
+    cat >> ${local_conf_file_name} << EOF
 
 [ml2_odl]
 # Trigger n-odl full sync every 30 secs.
@@ -672,25 +678,8 @@ function retry() {
     return ${rc}
 }
 
-# if we are using the new netvirt impl, as determined by the feature name
-# odl-netvirt-openstack (note: old impl is odl-ovsdb-openstack) then we
-# want PROVIDER_MAPPINGS to be used -- this should be fixed if we want to support
-# external networks in legacy netvirt
-if [[ ${CONTROLLERFEATURES} == *"odl-netvirt-openstack"* ]]; then
-  ODL_PROVIDER_MAPPINGS="\${PUBLIC_PHYSICAL_NETWORK}:${PUBLIC_BRIDGE}"
-else
-  ODL_PROVIDER_MAPPINGS=
-fi
-
-# if we are using the old netvirt impl, as determined by the feature name
-# odl-ovsdb-openstack (note: new impl is odl-netvirt-openstack) then we
-# want ODL_L3 to be True.  New impl wants it False
-if [[ ${CONTROLLERFEATURES} == *"odl-ovsdb-openstack"* ]]; then
-    ODL_L3=True
-else
-    ODL_L3=False
-fi
-
+ODL_PROVIDER_MAPPINGS="\${PUBLIC_PHYSICAL_NETWORK}:${PUBLIC_BRIDGE}"
+ODL_L3=False
 RECLONE=False
 ODL_PORT=8181
 
@@ -812,8 +801,10 @@ for i in `seq 1 ${NUM_OPENSTACK_CONTROL_NODES}`; do
     scp ${WORKSPACE}/get_devstack.sh ${!CONTROLIP}:/tmp
     # devstack Master is yet to migrate fully to lib/neutron, there are some ugly hacks that is
     # affecting the stacking.
-    #Workaround For Queens, Make the physical Network as physnet1 in lib/neutron
-    #Workaround Comment out creating initial Networks in lib/neutron
+    # Workaround For Queens, Make the physical Network as physnet1 in lib/neutron
+    # In Queens the neutron new libs are used and do not have the following options from Pike and earlier:
+    # Q_ML2_PLUGIN_FLAT_TYPE_OPTIONS could be used for the flat_networks
+    # and Q_ML2_PLUGIN_VLAN_TYPE_OPTIONS could be used for the ml2_type_vlan
     ${SSH} ${!CONTROLIP} "bash /tmp/get_devstack.sh > /tmp/get_devstack.sh.txt 2>&1"
     if [ "${ODL_ML2_BRANCH}" == "stable/queens" ]; then
        ssh ${!CONTROLIP} "sed -i 's/flat_networks public/flat_networks public,physnet1/' /opt/stack/devstack/lib/neutron"
@@ -870,12 +861,6 @@ for i in `seq 1 ${NUM_OPENSTACK_COMPUTE_NODES}`; do
     scp ${WORKSPACE}/hosts_file ${!COMPUTEIP}:/tmp/hosts
     scp ${WORKSPACE}/get_devstack.sh  ${!COMPUTEIP}:/tmp
     ${SSH} ${!COMPUTEIP} "bash /tmp/get_devstack.sh > /tmp/get_devstack.sh.txt 2>&1"
-    if [ "${ODL_ML2_BRANCH}" == "stable/pike" ]; then
-        echo "Updating requirements for ${ODL_ML2_BRANCH}"
-        echo "Workaround for libvirt-python failing installation"
-        echo "Modify upper-constraints to use libvirt-python 4.2.0"
-        fix_libvirt_version_n_cpu_pike ${!COMPUTEIP}
-    fi
     create_compute_node_local_conf ${!COMPUTEIP} ${!CONTROLIP} ${ODLMGRIP[$SITE_INDEX]} "${ODL_OVS_MGRS[$SITE_INDEX]}"
     scp ${WORKSPACE}/local.conf_compute_${!COMPUTEIP} ${!COMPUTEIP}:/opt/stack/devstack/local.conf
     echo "Install rdo release to avoid incompatible Package versions"