# script.
source ${ROBOT_VENV}/bin/activate
+# TODO: remove this work to run changes.py if/when it's moved higher up to be visible at the Robot level
+echo "showing recent changes that made it in to the distribution used by this job"
+pip install --upgrade urllib3
+python ${WORKSPACE}/test/tools/distchanges/changes.py -d /tmp/distribution_folder \
+ -u ${ACTUALBUNDLEURL} \
+ -r ssh://jenkins-${SILO}@git.opendaylight.org:29418
+
echo "#################################################"
echo "## Deploy Openstack 3-node ##"
echo "#################################################"
cat >> ${local_conf_file_name} << EOF
PUBLIC_BRIDGE=${PUBLIC_BRIDGE}
PUBLIC_PHYSICAL_NETWORK=physnet1 # FIXME this should be a parameter
+ML2_VLAN_RANGES=physnet1
ODL_PROVIDER_MAPPINGS=${ODL_PROVIDER_MAPPINGS}
disable_service q-l3
[agent]
minimize_polling=True
+[ml2]
+# Needed for VLAN provider tests - because our provider networks are always encapsulated in VXLAN (br-physnet1)
+# MTU(1440) + VXLAN(50) + VLAN(4) = 1494 < MTU eth0/br-phynset1(1500)
+physical_network_mtus = physnet1:1440
+
[[post-config|/etc/neutron/dhcp_agent.ini]]
[DEFAULT]
force_metadata = True
echo "sleep for a minute and print hypervisor-list"
sleep 60
${SSH} ${OPENSTACK_CONTROL_NODE_IP} "cd /opt/stack/devstack; source openrc admin admin; nova hypervisor-list"
-expected_num_hypervisors=$((NUM_OPENSTACK_SYSTEM - 1))
+# in the case that we are doing openstack (control + compute) all in one node, then the number of hypervisors
+# will be the same as the number of openstack systems. However, if we are doing multinode openstack then the
+# assumption is we have a single control node and the rest are compute nodes, so the number of expected hypervisors
+# is one less than the total number of openstack systems
+if [ "${NUM_OPENSTACK_SYSTEM}" -eq 1 ]; then
+ expected_num_hypervisors=1
+else
+ expected_num_hypervisors=$((NUM_OPENSTACK_SYSTEM - 1))
+fi
num_hypervisors=$(${SSH} ${OPENSTACK_CONTROL_NODE_IP} "cd /opt/stack/devstack; source openrc admin admin; openstack hypervisor list -f value | wc -l" | tail -1 | tr -d "\r")
if ! [ "${num_hypervisors}" ] || ! [ ${num_hypervisors} -eq ${expected_num_hypervisors} ]; then
echo "Error: Only $num_hypervisors hypervisors detected, expected $expected_num_hypervisors"