- 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}"
# retry the given command ($3) until success for a number of iterations ($1)
# sleeping ($2) between tries.
function retry() {
# retry the given command ($3) until success for a number of iterations ($1)
# sleeping ($2) between tries.
function retry() {
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"
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}"
fi
if [[ "${ODL_ML2_BRANCH}" == "stable/ocata" && "$(is_openstack_feature_enabled n-cpu)" == "1" ]]; then
echo "Updating requirements for ${ODL_ML2_BRANCH}"
# 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
# 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 "Modify upper-constraints to use libvirt-python 3.2.0"
fix_libvirt_version_n_cpu_ocata ${!COMPUTEIP}
fi
echo "Modify upper-constraints to use libvirt-python 3.2.0"
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
echo "Stack the compute node ${i} of ${NUM_OPENSTACK_COMPUTE_NODES}: ${COMPUTEIP}"
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}"