X-Git-Url: https://git.opendaylight.org/gerrit/gitweb?a=blobdiff_plain;f=jjb%2Fintegration%2Fintegration-deploy-openstack-run-test.sh;h=7159def61a756a6421520d6e3036c61b5f674a31;hb=42d5aa6b322bb400d0e284ee472d8105f4409584;hp=e8dc87b6b938605306fbca842b47fc7b687dde42;hpb=fafc613b71acb996cd3340e42e401ce8382491a6;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 e8dc87b6b..7159def61 100644 --- a/jjb/integration/integration-deploy-openstack-run-test.sh +++ b/jjb/integration/integration-deploy-openstack-run-test.sh @@ -27,8 +27,8 @@ function trap_handler() { local prog="$0" local lastline="$1" local lasterr="$2" - echo "${prog}: line ${lastline}: exit status of last command: ${lasterr}" - echo "command: ${BASH_COMMAND}" + echo "trap_hanlder: ${prog}: line ${lastline}: exit status of last command: ${lasterr}" + echo "trap_handler: command: ${BASH_COMMAND}" collect_logs exit 1 } # trap_handler() @@ -165,16 +165,6 @@ function fix_libvirt_version_n_cpu_ocata() { " } -function fix_tinyrpc_version() { - local ip=$1 - ${SSH} ${ip} " - cd /opt/stack; - git clone https://git.openstack.org/openstack/requirements; - cd requirements; - sed -i s/tinyrpc===0.7/tinyrpc===0.6/ upper-constraints.txt - " -} - # Add enable_services and disable_services to the local.conf function add_os_services() { local core_services=$1 @@ -369,7 +359,8 @@ EOF add_os_services "${CORE_OS_COMPUTE_SERVICES}" "${ENABLE_OS_COMPUTE_SERVICES}" "${DISABLE_OS_SERVICES}" "${local_conf_file_name}" cat >> ${local_conf_file_name} << EOF - +#Added to make Nova wait until nova in control node is ready. +NOVA_READY_TIMEOUT=900 HOST_IP=${HOSTIP} SERVICE_HOST=${SERVICEHOST} Q_ML2_TENANT_NETWORK_TYPE=${TENANT_NETWORK_TYPE} @@ -793,7 +784,6 @@ function is_rabbitmq_ready() { # retry the given command ($3) until success for a number of iterations ($1) # sleeping ($2) between tries. function retry() { - set +e local -r -i max_tries=${1} local -r -i sleep_time=${2} local -r cmd=${3} @@ -814,7 +804,6 @@ function retry() { fi fi done - set -e return ${rc} } @@ -856,8 +845,10 @@ CORE_OS_CONTROL_SERVICES+=",odl-compute,odl-neutron" # Additional services CORE_OS_CONTROL_SERVICES+=",mysql,rabbit" +# collect performance stats +CORE_OS_COMPUTE_SERVICES="dstat" # computes only need nova and odl -CORE_OS_COMPUTE_SERVICES="n-cpu,odl-compute" +CORE_OS_COMPUTE_SERVICES+=",n-cpu,odl-compute" cat > ${WORKSPACE}/disable_firewall.sh << EOF sudo systemctl stop firewalld @@ -961,8 +952,6 @@ for i in `seq 1 ${NUM_OPENSTACK_CONTROL_NODES}`; do 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" - echo "Modify uppper-constraints to use tinyrpc 0.6" - fix_tinyrpc_version ${!CONTROLIP} fi if [[ "${ODL_ML2_BRANCH}" == "stable/ocata" && "$(is_openstack_feature_enabled n-cpu)" == "1" ]]; then echo "Updating requirements for ${ODL_ML2_BRANCH}" @@ -992,17 +981,19 @@ done # 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. 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 + 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" + set +e + retry ${WAIT_FOR_RABBITMQ_MINUTES} 60 "is_rabbitmq_ready ${OPENSTACK_CONTROL_NODE_1_IP}" + rc=$? + set -e + if ((${rc} == 0)); then echo "rabbitmq is ready, starting ${NUM_OPENSTACK_COMPUTE_NODES} compute(s)" - else + else echo "rabbitmq was not ready in ${WAIT_FOR_RABBITMQ_MINUTES}m" collect_logs exit 1 - fi + fi fi for i in `seq 1 ${NUM_OPENSTACK_COMPUTE_NODES}`; do @@ -1023,10 +1014,6 @@ for i in `seq 1 ${NUM_OPENSTACK_COMPUTE_NODES}`; do echo "Modify upper-constraints to use libvirt-python 3.2.0" fix_libvirt_version_n_cpu_ocata ${!COMPUTEIP} fi - if [ "${ODL_ML2_BRANCH}" == "master" ]; then - echo "Modify uppper-constraints to use tinyrpc 0.6" - fix_tinyrpc_version ${!CONTROLIP} - 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 "Stack the compute node ${i} of ${NUM_OPENSTACK_COMPUTE_NODES}: ${COMPUTEIP}"