X-Git-Url: https://git.opendaylight.org/gerrit/gitweb?a=blobdiff_plain;f=jjb%2Fintegration%2Fintegration-deploy-openstack-run-test.sh;h=7573faab0035273f152d254119105b7594c8d0cc;hb=1d9a46ea16375cd39253b4d90817b5c0ce3edc39;hp=3bb511247e0abdb540fb1d80494be4a7ba45e5b7;hpb=ccaff4b13a69a8e501cbf672f2f45241cd7ec909;p=releng%2Fbuilder.git diff --git a/jjb/integration/integration-deploy-openstack-run-test.sh b/jjb/integration/integration-deploy-openstack-run-test.sh index 3bb511247..7573faab0 100644 --- a/jjb/integration/integration-deploy-openstack-run-test.sh +++ b/jjb/integration/integration-deploy-openstack-run-test.sh @@ -62,6 +62,7 @@ PUBLIC_BRIDGE: ${PUBLIC_BRIDGE} ENABLE_HAPROXY_FOR_NEUTRON: ${ENABLE_HAPROXY_FOR_NEUTRON} ENABLE_OS_SERVICES: ${ENABLE_OS_SERVICES} ENABLE_OS_COMPUTE_SERVICES: ${ENABLE_OS_COMPUTE_SERVICES} +ENABLE_OS_NETWORK_SERVICES: ${ENABLE_OS_NETWORK_SERVICES} ENABLE_OS_PLUGINS: ${ENABLE_OS_PLUGINS} DISABLE_OS_SERVICES: ${DISABLE_OS_SERVICES} TENANT_NETWORK_TYPE: ${TENANT_NETWORK_TYPE} @@ -141,12 +142,36 @@ function csv2ssv() { echo "${ssv}" } # csv2ssv +function is_openstack_feature_enabled() { + local feature=$1 + for enabled_feature in $(csv2ssv ${ENABLE_OS_SERVICES}) + do + if [ "${enabled_feature}" == "${feature}" ]; then + echo 1 + return + fi + done + echo 0 +} + +function fix_libvirt_version_n_cpu_ocata() { + local ip=$1 + ${SSH} ${ip} " + cd /opt/stack; + git clone https://git.openstack.org/openstack/requirements; + cd requirements; + git checkout stable/ocata; + sed -i s/libvirt-python===2.5.0/libvirt-python===3.2.0/ upper-constraints.txt + " +} + # Add enable_services and disable_services to the local.conf function add_os_services() { local core_services=$1 local enable_services=$2 local disable_services=$3 local local_conf_file_name=$4 + local enable_network_services=$5 cat >> ${local_conf_file_name} << EOF enable_service $(csv2ssv "${core_services}") @@ -159,6 +184,11 @@ EOF if [ -n "${disable_services}" ]; then cat >> ${local_conf_file_name} << EOF disable_service $(csv2ssv "${disable_services}") +EOF + fi + if [ -n "${enable_network_services}" ]; then + cat >> ${local_conf_file_name} << EOF +enable_service $(csv2ssv "${enable_network_services}") EOF fi } @@ -180,7 +210,7 @@ RECLONE=${RECLONE} disable_all_services EOF - add_os_services "${CORE_OS_CONTROL_SERVICES}" "${ENABLE_OS_SERVICES}" "${DISABLE_OS_SERVICES}" "${local_conf_file_name}" + add_os_services "${CORE_OS_CONTROL_SERVICES}" "${ENABLE_OS_SERVICES}" "${DISABLE_OS_SERVICES}" "${local_conf_file_name}" "${ENABLE_OS_NETWORK_SERVICES}" cat >> ${local_conf_file_name} << EOF @@ -191,7 +221,7 @@ NEUTRON_CREATE_INITIAL_NETWORKS=${CREATE_INITIAL_NETWORKS} ODL_MODE=manual ODL_MGR_IP=${MGRIP} -ODL_PORT=8080 +ODL_PORT=${ODL_PORT} ODL_PORT_BINDING_CONTROLLER=${ODL_ML2_PORT_BINDING} ODL_OVS_MANAGERS=${ODL_OVS_MANAGERS} @@ -212,6 +242,11 @@ NEUTRON_SFC_DRIVERS=${ODL_SFC_DRIVER} # Only relevant if networking-sfc plugin i NEUTRON_FLOWCLASSIFIER_DRIVERS=${ODL_SFC_DRIVER} # Only relevant if networking-sfc plugin is enabled ETCD_PORT=2379 EOF + if [ "${TENANT_NETWORK_TYPE}" == "local" ]; then + cat >> ${local_conf_file_name} << EOF +ENABLE_TENANT_TUNNELS=false +EOF + fi if [ "${ODL_ML2_DRIVER_VERSION}" == "v2" ]; then echo "ODL_V2DRIVER=True" >> ${local_conf_file_name} @@ -285,10 +320,6 @@ minimize_polling=True physical_network_mtus = ${PUBLIC_PHYSICAL_NETWORK}:1400 path_mtu = 1458 -# workaround for port-status not working due to https://bugs.opendaylight.org/show_bug.cgi?id=9092 -[ml2_odl] -odl_features=nothing - [[post-config|/etc/neutron/dhcp_agent.ini]] [DEFAULT] force_metadata = True @@ -335,7 +366,7 @@ Q_ML2_TENANT_NETWORK_TYPE=${TENANT_NETWORK_TYPE} ODL_MODE=manual ODL_MGR_IP=${MGRIP} -ODL_PORT=8080 +ODL_PORT=${ODL_PORT} ODL_PORT_BINDING_CONTROLLER=${ODL_ML2_PORT_BINDING} ODL_OVS_MANAGERS=${ODL_OVS_MANAGERS} @@ -517,6 +548,8 @@ EOF # archives build step will essentially be a noop. mkdir -p ${WORKSPACE}/archives + mv /tmp/changes.txt ${WORKSPACE}/archives + sleep 5 # FIXME: Do not create .tar and gzip before copying. for i in `seq 1 ${NUM_ODL_SYSTEM}`; do @@ -652,7 +685,9 @@ EOF mkdir -p ${TEMPEST_LOGS_DIR} scp ${OPENSTACK_CONTROL_NODE_1_IP}:${DEVSTACK_TEMPEST_DIR}/tempest_results.html ${TEMPEST_LOGS_DIR} scp ${OPENSTACK_CONTROL_NODE_1_IP}:${DEVSTACK_TEMPEST_DIR}/tempest.log ${TEMPEST_LOGS_DIR} - mv ${WORKSPACE}/tempest_output* ${TEMPEST_LOGS_DIR} + if [ "$(echo ${OPENSTACK_BRANCH} | cut -d/ -f2)" != "master" ]; then + mv ${WORKSPACE}/tempest_output* ${TEMPEST_LOGS_DIR} + fi else echo "tempest results not found in ${DEVSTACK_TEMPEST_DIR}/${TESTREPO}/0" fi @@ -785,6 +820,7 @@ else fi RECLONE=False +ODL_PORT=8181 # Always compare the lists below against the devstack upstream ENABLED_SERVICES in # https://github.com/openstack-dev/devstack/blob/master/stackrc#L52 @@ -799,8 +835,6 @@ CORE_OS_CONTROL_SERVICES+=",key" CORE_OS_CONTROL_SERVICES+=",n-api,n-api-meta,n-cauth,n-cond,n-crt,n-obj,n-sch" # ODL - services to connect to ODL CORE_OS_CONTROL_SERVICES+=",odl-compute,odl-neutron" -# Neutron -CORE_OS_CONTROL_SERVICES+=",q-dhcp,q-meta,q-svc" # Additional services CORE_OS_CONTROL_SERVICES+=",mysql,rabbit" @@ -895,13 +929,27 @@ done for i in `seq 1 ${NUM_OPENSTACK_CONTROL_NODES}`; do CONTROLIP=OPENSTACK_CONTROL_NODE_${i}_IP - echo "Configure the stack of the control node ${i} of ${NUM_OPENSTACK_CONTROL_NODES}: ${CONTROLIP}" + echo "Configure the stack of the control node ${i} of ${NUM_OPENSTACK_CONTROL_NODES}: ${!CONTROLIP}" scp ${WORKSPACE}/disable_firewall.sh ${!CONTROLIP}:/tmp ${SSH} ${!CONTROLIP} "sudo bash /tmp/disable_firewall.sh" create_etc_hosts ${!CONTROLIP} scp ${WORKSPACE}/hosts_file ${!CONTROLIP}:/tmp/hosts 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 ${SSH} ${!CONTROLIP} "bash /tmp/get_devstack.sh > /tmp/get_devstack.sh.txt 2>&1" + if [ "${ODL_ML2_BRANCH}" == "master" ]; then + ssh ${!CONTROLIP} "sed -i 's/flat_networks public/flat_networks public,physnet1/' /opt/stack/devstack/lib/neutron" + ssh ${!CONTROLIP} "sed -i '186i iniset \$NEUTRON_CORE_PLUGIN_CONF ml2_type_vlan network_vlan_ranges public:1:4094,physnet1:1:4094' /opt/stack/devstack/lib/neutron" + fi + if [[ "${ODL_ML2_BRANCH}" == "stable/ocata" && "$(is_openstack_feature_enabled n-cpu)" == "1" ]]; then + echo "Updating requirements for ${ODL_ML2_BRANCH}" + echo "Workaround for https://review.openstack.org/#/c/491032/" + echo "Modify upper-constraints to use libvirt-python 3.2.0" + fix_libvirt_version_n_cpu_ocata ${!CONTROLIP} + fi create_control_node_local_conf ${!CONTROLIP} ${ODLMGRIP[$i]} "${ODL_OVS_MGRS[$i]}" scp ${WORKSPACE}/local.conf_control_${!CONTROLIP} ${!CONTROLIP}:/opt/stack/devstack/local.conf echo "Stack the control node ${i} of ${NUM_OPENSTACK_CONTROL_NODES}: ${CONTROLIP}" @@ -909,11 +957,6 @@ for i in `seq 1 ${NUM_OPENSTACK_CONTROL_NODES}`; do ssh ${!CONTROLIP} "ps -ef | grep stack.sh" ssh ${!CONTROLIP} "ls -lrt /opt/stack/devstack/nohup.out" os_node_list+=("${!CONTROLIP}") - # Workaround for stable/newton jobs - # TODO: can this be removed now? - if [ "${ODL_ML2_BRANCH}" == "stable/newton" ]; then - ssh ${!CONTROLIP} "cd /opt/stack; git clone https://git.openstack.org/openstack/requirements; cd requirements; git checkout stable/newton; sed -i /appdirs/d upper-constraints.txt" - fi done # This is a backup to the CELLSV2_SETUP=singleconductor workaround. Keeping it here as an easy lookup @@ -928,16 +971,18 @@ done # AccessRefused: (0, 0): (403) ACCESS_REFUSED - Login was refused using authentication mechanism AMQPLAIN. For details see the broker logfile. # Compare that timestamp to this log in the control stack.log: sudo rabbitmqctl set_permissions -p nova_cell1 stackrabbit # If the n-cpu.log is earlier than the control stack.log timestamp then the failure condition is likely hit. -WAIT_FOR_RABBITMQ_MINUTES=60 -echo "Wait a maximum of ${WAIT_FOR_RABBITMQ_MINUTES}m until rabbitmq is ready to allow the controller to create nova_cell1 before the computes need it" -retry ${WAIT_FOR_RABBITMQ_MINUTES} 60 "is_rabbitmq_ready ${OPENSTACK_CONTROL_NODE_1_IP}" -rc=$? -if ((${rc} == 0)); then - echo "rabbitmq is ready, starting ${NUM_OPENSTACK_COMPUTE_NODES} compute(s)" -else - echo "rabbitmq was not ready in ${WAIT_FOR_RABBITMQ_MINUTES}m" - collect_logs - exit 1 +if [ ${NUM_OPENSTACK_COMPUTE_NODES} -gt 0 ]; then + WAIT_FOR_RABBITMQ_MINUTES=60 + echo "Wait a maximum of ${WAIT_FOR_RABBITMQ_MINUTES}m until rabbitmq is ready to allow the controller to create nova_cell1 before the computes need it" + retry ${WAIT_FOR_RABBITMQ_MINUTES} 60 "is_rabbitmq_ready ${OPENSTACK_CONTROL_NODE_1_IP}" + rc=$? + if ((${rc} == 0)); then + echo "rabbitmq is ready, starting ${NUM_OPENSTACK_COMPUTE_NODES} compute(s)" + else + echo "rabbitmq was not ready in ${WAIT_FOR_RABBITMQ_MINUTES}m" + collect_logs + exit 1 + fi fi for i in `seq 1 ${NUM_OPENSTACK_COMPUTE_NODES}`; do @@ -945,7 +990,7 @@ for i in `seq 1 ${NUM_OPENSTACK_COMPUTE_NODES}`; do SITE_INDEX=$((((i - 1) / NUM_COMPUTES_PER_SITE) + 1)) # We need the site index to infer the control node IP for this compute COMPUTEIP=OPENSTACK_COMPUTE_NODE_${i}_IP CONTROLIP=OPENSTACK_CONTROL_NODE_${SITE_INDEX}_IP - echo "Configure the stack of the compute node ${i} of ${NUM_OPENSTACK_COMPUTE_NODES}: ${COMPUTEIP}" + echo "Configure the stack of the compute node ${i} of ${NUM_OPENSTACK_COMPUTE_NODES}: ${!COMPUTEIP}" scp ${WORKSPACE}/disable_firewall.sh "${!COMPUTEIP}:/tmp" ${SSH} "${!COMPUTEIP}" "sudo bash /tmp/disable_firewall.sh" create_etc_hosts ${!COMPUTEIP} ${!CONTROLIP} @@ -956,13 +1001,7 @@ for i in `seq 1 ${NUM_OPENSTACK_COMPUTE_NODES}`; do echo "Updating requirements for ${ODL_ML2_BRANCH}" echo "Workaround for https://review.openstack.org/#/c/491032/" echo "Modify upper-constraints to use libvirt-python 3.2.0" - ${SSH} ${!COMPUTEIP} " - cd /opt/stack; - git clone https://git.openstack.org/openstack/requirements; - cd requirements; - git checkout stable/ocata; - sed -i s/libvirt-python===2.5.0/libvirt-python===3.2.0/ upper-constraints.txt - " + fix_libvirt_version_n_cpu_ocata ${!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 @@ -1273,6 +1312,7 @@ for suite in ${SUITES}; do -v NUM_OS_SYSTEM:${NUM_OPENSTACK_SYSTEM} \ -v NUM_TOOLS_SYSTEM:${NUM_TOOLS_SYSTEM} \ -v ODL_SNAT_MODE:${ODL_SNAT_MODE} \ + -v ODL_ENABLE_L3_FWD:${ODL_ENABLE_L3_FWD} \ -v ODL_STREAM:${DISTROSTREAM} \ -v ODL_SYSTEM_IP:${ODL_SYSTEM_IP} \ -v ODL_SYSTEM_1_IP:${ODL_SYSTEM_1_IP} \