Job to test conntrack based SNAT
[releng/builder.git] / jjb / integration / include-raw-integration-deploy-openstack-run-test.sh
1 #@IgnoreInspection BashAddShebang
2 # Activate robotframework virtualenv
3 # ${ROBOT_VENV} comes from the include-raw-integration-install-robotframework.sh
4 # script.
5 source ${ROBOT_VENV}/bin/activate
6
7 # TODO: remove this work to run changes.py if/when it's moved higher up to be visible at the Robot level
8 echo "showing recent changes that made it in to the distribution used by this job"
9 pip install --upgrade urllib3
10 python ${WORKSPACE}/test/tools/distchanges/changes.py -d /tmp/distribution_folder \
11                   -u ${ACTUALBUNDLEURL} -b ${DISTROBRANCH} \
12                   -r ssh://jenkins-${SILO}@git.opendaylight.org:29418 || true
13
14 echo "#################################################"
15 echo "##         Deploy Openstack 3-node             ##"
16 echo "#################################################"
17
18
19 SSH="ssh -t -t"
20
21 function create_control_node_local_conf {
22 HOSTIP=$1
23 MGRIP=$2
24 ODL_OVS_MANAGERS="$3"
25 #Needs to be removed
26 if [ "${ODL_ML2_BRANCH}" != "stable/ocata" ]; then
27    RECLONE=no
28 else
29    RECLONE=yes
30 fi
31 local_conf_file_name=${WORKSPACE}/local.conf_control_${HOSTIP}
32 cat > ${local_conf_file_name} << EOF
33 [[local|localrc]]
34 LOGFILE=stack.sh.log
35 SCREEN_LOGDIR=/opt/stack/data/log
36 LOG_COLOR=False
37 RECLONE=${RECLONE}
38 EOF
39
40 IFS=,
41 for service_name in ${DISABLE_OS_SERVICES}
42 do
43 cat >> ${local_conf_file_name} << EOF
44 disable_service ${service_name}
45 EOF
46 done
47 for service_name in ${ENABLE_OS_SERVICES}
48 do
49 cat >> ${local_conf_file_name} << EOF
50 enable_service ${service_name}
51 EOF
52 done
53 for plugin_name in ${ENABLE_OS_PLUGINS}
54 do
55 if [ "$plugin_name" == "networking-odl" ]; then
56     ENABLE_PLUGIN_ARGS="${ODL_ML2_DRIVER_REPO} ${ODL_ML2_BRANCH}"
57 elif [ "$plugin_name" == "kuryr-kubernetes" ]; then
58     ENABLE_PLUGIN_ARGS="${DEVSTACK_KUBERNETES_PLUGIN_REPO} master" # note: kuryr-kubernetes only exists in master at the moment
59 elif [ "$plugin_name" == "neutron-lbaas" ]; then
60     ENABLE_PLUGIN_ARGS="${DEVSTACK_LBAAS_PLUGIN_REPO} ${OPENSTACK_BRANCH}"
61 elif [ "$plugin_name" == "networking-sfc" ]; then
62     ENABLE_PLUGIN_ARGS="${DEVSTACK_NETWORKING_SFC_PLUGIN_REPO} ${OPENSTACK_BRANCH}"
63 else
64     echo "Error: Invalid plugin $plugin_name, unsupported"
65     continue
66 fi
67 cat >> ${local_conf_file_name} << EOF
68 enable_plugin ${plugin_name} ${ENABLE_PLUGIN_ARGS}
69 EOF
70 done
71 unset IFS
72 if [ "${OPENSTACK_BRANCH}" == "master" ] || [ "${OPENSTACK_BRANCH}" == "stable/ocata" ]; then # Ocata+
73     # placement is mandatory for nova since Ocata, note that this requires computes to enable placement-client
74     # this should be moved into enabled_services for each job (but only for Ocata)
75     echo "enable_service placement-api" >> ${local_conf_file_name}
76 fi
77 cat >> ${local_conf_file_name} << EOF
78 HOST_IP=${HOSTIP}
79 SERVICE_HOST=\$HOST_IP
80
81 NEUTRON_CREATE_INITIAL_NETWORKS=${CREATE_INITIAL_NETWORKS}
82 Q_PLUGIN=ml2
83 Q_ML2_TENANT_NETWORK_TYPE=${TENANT_NETWORK_TYPE}
84 Q_OVS_USE_VETH=True
85
86 ENABLE_TENANT_TUNNELS=True
87
88 MYSQL_HOST=\$SERVICE_HOST
89 RABBIT_HOST=\$SERVICE_HOST
90 GLANCE_HOSTPORT=\$SERVICE_HOST:9292
91 KEYSTONE_AUTH_HOST=\$SERVICE_HOST
92 KEYSTONE_SERVICE_HOST=\$SERVICE_HOST
93
94 MYSQL_PASSWORD=mysql
95 RABBIT_PASSWORD=rabbit
96 SERVICE_TOKEN=service
97 SERVICE_PASSWORD=admin
98 ADMIN_PASSWORD=admin
99
100 ODL_PORT=8080
101 ODL_MODE=externalodl
102 ODL_PORT_BINDING_CONTROLLER=${ODL_ML2_PORT_BINDING}
103
104 LIBVIRT_TYPE=qemu
105 ODL_MGR_IP=${MGRIP}
106
107 NEUTRON_LBAAS_SERVICE_PROVIDERV2=${LBAAS_SERVICE_PROVIDER} # Only relevant if neutron-lbaas plugin is enabled
108 NEUTRON_SFC_DRIVERS=${ODL_SFC_DRIVER} # Only relevant if networking-sfc plugin is enabled
109 NEUTRON_FLOWCLASSIFIER_DRIVERS=${ODL_SFC_DRIVER} # Only relevant if networking-sfc plugin is enabled
110 EOF
111
112 if [ "${ENABLE_NETWORKING_L2GW}" == "yes" ]; then
113 cat >> ${local_conf_file_name} << EOF
114
115 enable_plugin networking-l2gw ${NETWORKING_L2GW_DRIVER} ${ODL_ML2_BRANCH}
116 NETWORKING_L2GW_SERVICE_DRIVER=L2GW:OpenDaylight:networking_odl.l2gateway.driver.OpenDaylightL2gwDriver:default
117 ENABLED_SERVICES+=,neutron,q-svc,nova,q-meta
118
119 EOF
120 fi
121
122 if [ "${ODL_ML2_DRIVER_VERSION}" == "v2" ]; then
123     echo "ODL_V2DRIVER=True" >> ${local_conf_file_name}
124 fi
125
126 echo "ODL_OVS_MANAGERS=${ODL_OVS_MANAGERS}" >> ${local_conf_file_name}
127
128 # if we are using the old netvirt impl, as determined by the feature name
129 # odl-ovsdb-openstack (note: new impl is odl-netvirt-openstack) then we
130 # want ODL_L3 to be True.  New impl wants it False
131 if [[ ${CONTROLLERFEATURES} == *"odl-ovsdb-openstack"* ]]; then
132     ODL_L3=True
133 else
134     ODL_L3=False
135 fi
136
137 # if we are using the new netvirt impl, as determined by the feature name
138 # odl-netvirt-openstack (note: old impl is odl-ovsdb-openstack) then we
139 # want PROVIDER_MAPPINGS to be used -- this should be fixed if we want to support
140 # external networks in legacy netvirt
141 if [[ ${CONTROLLERFEATURES} == *"odl-netvirt-openstack"* ]]; then
142   ODL_PROVIDER_MAPPINGS="\${PUBLIC_PHYSICAL_NETWORK}:${PUBLIC_BRIDGE}"
143 else
144   ODL_PROVIDER_MAPPINGS=
145 fi
146
147 if [ "${ODL_ENABLE_L3_FWD}" == "yes" ]; then
148 cat >> ${local_conf_file_name} << EOF
149 PUBLIC_BRIDGE=${PUBLIC_BRIDGE}
150 PUBLIC_PHYSICAL_NETWORK=${PUBLIC_PHYSICAL_NETWORK}
151 ML2_VLAN_RANGES=${PUBLIC_PHYSICAL_NETWORK}
152 ODL_PROVIDER_MAPPINGS=${ODL_PROVIDER_MAPPINGS}
153
154 disable_service q-l3
155 PUBLIC_INTERFACE=br100
156 EOF
157
158 if [ "${ODL_ML2_BRANCH}" == "stable/mitaka" ]; then
159 cat >> ${local_conf_file_name} << EOF
160 Q_L3_ENABLED=True
161 ODL_L3=${ODL_L3}
162
163 EOF
164 if [ "${ENABLE_NETWORKING_L2GW}" == "yes" ]; then
165 cat >> ${local_conf_file_name} << EOF
166 [[post-config|\$NEUTRON_CONF]]
167 [DEFAULT]
168 service_plugins = networking_odl.l3.l3_odl.OpenDaylightL3RouterPlugin, networking_l2gw.services.l2gateway.plugin.L2GatewayPlugin
169
170 EOF
171 else
172 cat >> ${local_conf_file_name} << EOF
173 [[post-config|\$NEUTRON_CONF]]
174 [DEFAULT]
175 service_plugins = networking_odl.l3.l3_odl.OpenDaylightL3RouterPlugin
176 EOF
177 fi #check for ENABLE_NETWORKING_L2GW
178
179 fi #check for ODL_ML2_BRANCH
180
181 fi #ODL_ENABLE_L3_FWD check
182
183 cat >> ${local_conf_file_name} << EOF
184 [[post-config|/etc/neutron/plugins/ml2/ml2_conf.ini]]
185 [agent]
186 minimize_polling=True
187
188 [ml2]
189 # Needed for VLAN provider tests - because our provider networks are always encapsulated in VXLAN (br-phys1)
190 # MTU(1440) + VXLAN(50) + VLAN(4) = 1494 < MTU eth0/br-phys1(1500)
191 physical_network_mtus = ${PUBLIC_PHYSICAL_NETWORK}:1440
192 path_mtu = 1490
193
194 [[post-config|/etc/neutron/dhcp_agent.ini]]
195 [DEFAULT]
196 force_metadata = True
197 enable_isolated_metadata = True
198
199 [[post-config|/etc/nova/nova.conf]]
200 [DEFAULT]
201 force_config_drive = False
202
203 EOF
204
205 echo "local.conf Created...."
206 cat ${local_conf_file_name}
207 }
208
209 function create_compute_node_local_conf {
210 HOSTIP=$1
211 SERVICEHOST=$2
212 MGRIP=$3
213 ODL_OVS_MANAGERS="$4"
214 #Needs to be removed
215 if [ "${ODL_ML2_BRANCH}" != "stable/ocata" ]; then
216    RECLONE=no
217 else
218    RECLONE=yes
219 fi
220 if [ "${OPENSTACK_BRANCH}" == "master" ] || [ "${OPENSTACK_BRANCH}" == "stable/ocata" ]; then # Ocata+
221     # placement is mandatory for nova since Ocata, note that this requires controller to enable placement-api
222     ENABLED_SERVICES="n-cpu,placement-client"
223 else
224     ENABLED_SERVICES="n-cpu"
225 fi
226
227 local_conf_file_name=${WORKSPACE}/local.conf_compute_${HOSTIP}
228 cat > ${local_conf_file_name} << EOF
229 [[local|localrc]]
230 LOGFILE=stack.sh.log
231 LOG_COLOR=False
232 SCREEN_LOGDIR=/opt/stack/data/log
233 RECLONE=${RECLONE}
234
235 NOVA_VNC_ENABLED=True
236 MULTI_HOST=1
237 ENABLED_SERVICES=${ENABLED_SERVICES}
238 HOST_IP=${HOSTIP}
239 SERVICE_HOST=${SERVICEHOST}
240
241 Q_PLUGIN=ml2
242 ENABLE_TENANT_TUNNELS=True
243 Q_ML2_TENANT_NETWORK_TYPE=vxlan
244
245 Q_HOST=\$SERVICE_HOST
246 MYSQL_HOST=\$SERVICE_HOST
247 RABBIT_HOST=\$SERVICE_HOST
248 GLANCE_HOSTPORT=\$SERVICE_HOST:9292
249 KEYSTONE_AUTH_HOST=\$SERVICE_HOST
250 KEYSTONE_SERVICE_HOST=\$SERVICE_HOST
251
252 MYSQL_PASSWORD=mysql
253 RABBIT_PASSWORD=rabbit
254 SERVICE_TOKEN=service
255 SERVICE_PASSWORD=admin
256 ADMIN_PASSWORD=admin
257
258 ODL_MODE=compute
259 ODL_PORT_BINDING_CONTROLLER=${ODL_ML2_PORT_BINDING}
260 LIBVIRT_TYPE=qemu
261 ODL_MGR_IP=${MGRIP}
262 EOF
263
264 if [[ "${ENABLE_OS_PLUGINS}" =~ networking-odl ]]; then
265 cat >> ${local_conf_file_name} << EOF
266 enable_plugin networking-odl ${ODL_ML2_DRIVER_REPO} ${ODL_ML2_BRANCH}
267 EOF
268 fi
269
270 echo "ODL_OVS_MANAGERS=${ODL_OVS_MANAGERS}" >> ${local_conf_file_name}
271
272 # if we are using the new netvirt impl, as determined by the feature name
273 # odl-netvirt-openstack (note: old impl is odl-ovsdb-openstack) then we
274 # want PROVIDER_MAPPINGS to be used -- this should be fixed if we want to support
275 # external networks in legacy netvirt
276 if [[ ${CONTROLLERFEATURES} == *"odl-netvirt-openstack"* ]]; then
277   ODL_PROVIDER_MAPPINGS="\${PUBLIC_PHYSICAL_NETWORK}:${PUBLIC_BRIDGE}"
278 else
279   ODL_PROVIDER_MAPPINGS=
280 fi
281
282 if [ "${ODL_ENABLE_L3_FWD}" == "yes" ]; then
283 cat >> ${local_conf_file_name} << EOF
284 # Uncomment lines below if odl-compute is to be used for l3 forwarding
285 Q_L3_ENABLED=True
286 ODL_L3=${ODL_L3}
287 PUBLIC_INTERFACE=br100 # FIXME do we use br100 at all?
288 PUBLIC_BRIDGE=${PUBLIC_BRIDGE}
289 PUBLIC_PHYSICAL_NETWORK=${PUBLIC_PHYSICAL_NETWORK}
290 ODL_PROVIDER_MAPPINGS=${ODL_PROVIDER_MAPPINGS}
291 EOF
292 fi
293 echo "local.conf Created...."
294 cat ${local_conf_file_name}
295 }
296
297 function configure_haproxy_for_neutron_requests () {
298 MGRIP=$1
299 ODL_IPS=(${2//,/ })
300
301 cat > ${WORKSPACE}/install_ha_proxy.sh<< EOF
302 sudo systemctl stop firewalld
303 sudo yum -y install policycoreutils-python haproxy
304 EOF
305
306 cat > ${WORKSPACE}/haproxy.cfg << EOF
307 global
308   daemon
309   group  haproxy
310   log  /dev/log local0
311   maxconn  20480
312   pidfile  /tmp/haproxy.pid
313   user  haproxy
314
315 defaults
316   log  global
317   maxconn  4096
318   mode  tcp
319   retries  3
320   timeout  http-request 10s
321   timeout  queue 1m
322   timeout  connect 10s
323   timeout  client 1m
324   timeout  server 1m
325   timeout  check 10s
326
327 listen opendaylight
328   bind ${MGRIP}:8080
329   balance source
330 EOF
331
332 odlindex=1
333 for odlip in ${ODL_IPS[*]}
334 do
335 cat >> ${WORKSPACE}/haproxy.cfg << EOF
336   server controller-${odlindex} ${odlip}:8080 check fall 5 inter 2000 rise 2
337 EOF
338 odlindex=$((odlindex+1))
339 done
340
341 cat >> ${WORKSPACE}/haproxy.cfg << EOF
342 listen opendaylight_rest
343   bind ${MGRIP}:8181
344   balance source
345 EOF
346
347 odlindex=1
348 for odlip in ${ODL_IPS[*]}
349 do
350 cat >> ${WORKSPACE}/haproxy.cfg << EOF
351   server controller-rest-${odlindex} ${odlip}:8181 check fall 5 inter 2000 rise 2
352 EOF
353 odlindex=$((odlindex+1))
354 done
355
356 echo "Dump haproxy.cfg"
357 cat ${WORKSPACE}/haproxy.cfg
358
359 cat > ${WORKSPACE}/deploy_ha_proxy.sh<< EOF
360 sudo chown haproxy:haproxy /tmp/haproxy.cfg
361 sudo sed -i 's/\\/etc\\/haproxy\\/haproxy.cfg/\\/tmp\\/haproxy.cfg/g' /usr/lib/systemd/system/haproxy.service
362 sudo /usr/sbin/semanage permissive -a haproxy_t
363 sudo systemctl restart haproxy
364 sleep 3
365 sudo netstat -tunpl
366 sudo systemctl status haproxy
367 true
368 EOF
369 scp ${WORKSPACE}/install_ha_proxy.sh ${MGRIP}:/tmp
370 ${SSH} ${MGRIP} "sudo bash /tmp/install_ha_proxy.sh"
371 scp ${WORKSPACE}/haproxy.cfg ${MGRIP}:/tmp
372 scp ${WORKSPACE}/deploy_ha_proxy.sh ${MGRIP}:/tmp
373 ${SSH} ${MGRIP} "sudo bash /tmp/deploy_ha_proxy.sh"
374 }
375
376 function collect_logs_and_exit () {
377 set +e  # We do not want to create red dot just because something went wrong while fetching logs.
378 for i in `seq 1 ${NUM_ODL_SYSTEM}`
379 do
380     CONTROLLERIP=ODL_SYSTEM_${i}_IP
381     echo "killing karaf process..."
382     ${SSH} "${!CONTROLLERIP}" bash -c 'ps axf | grep karaf | grep -v grep | awk '"'"'{print "kill -9 " $1}'"'"' | sh'
383 done
384
385 cat > extra_debug.sh << EOF
386 echo -e "/usr/sbin/lsmod | /usr/bin/grep openvswitch\n"
387 /usr/sbin/lsmod | /usr/bin/grep openvswitch
388 echo -e "\ngrep ct_ /var/log/openvswitch/ovs-vswitchd.log\n"
389 grep ct_ /var/log/openvswitch/ovs-vswitchd.log
390 EOF
391
392 sleep 5
393 # FIXME: Do not create .tar and gzip before copying.
394 for i in `seq 1 ${NUM_ODL_SYSTEM}`
395 do
396     CONTROLLERIP=ODL_SYSTEM_${i}_IP
397     ${SSH} "${!CONTROLLERIP}"  "cp -r /tmp/${BUNDLEFOLDER}/data/log /tmp/odl_log"
398     ${SSH} "${!CONTROLLERIP}"  "tar -cf /tmp/odl${i}_karaf.log.tar /tmp/odl_log/*"
399     scp "${!CONTROLLERIP}:/tmp/odl${i}_karaf.log.tar" "${WORKSPACE}/odl${i}_karaf.log.tar"
400     tar -xvf ${WORKSPACE}/odl${i}_karaf.log.tar -C . --strip-components 2 --transform s/karaf/odl${i}_karaf/g
401     grep "ROBOT MESSAGE\| ERROR " odl${i}_karaf.log > odl${i}_err.log
402     grep "ROBOT MESSAGE\|Exception" odl${i}_karaf.log > odl${i}_exception.log
403     grep "ROBOT MESSAGE\| ERROR \| WARN \|Exception" odl${i}_karaf.log > odl${i}_err_warn_exception.log
404     rm ${WORKSPACE}/odl${i}_karaf.log.tar
405 done
406
407 # Since this log collection work is happening before the archive build macro which also
408 # creates the ${WORKSPACE}/archives dir, we have to do it here first.  The mkdir in the
409 # archives build step will essentially be a noop.
410 mkdir -p ${WORKSPACE}/archives
411
412 # Control Node
413 for i in `seq 1 ${NUM_OPENSTACK_CONTROL_NODES}`
414 do
415     OS_CTRL_IP=OPENSTACK_CONTROL_NODE_${i}_IP
416     OS_CTRL_FOLDER="control_${i}"
417     mkdir -p ${OS_CTRL_FOLDER}
418     scp ${!OS_CTRL_IP}:/opt/stack/devstack/nohup.out ${OS_CTRL_FOLDER}/stack.log
419     scp ${!OS_CTRL_IP}:/var/log/openvswitch/ovs-vswitchd.log ${OS_CTRL_FOLDER}/ovs-vswitchd.log
420     scp ${!OS_CTRL_IP}:/etc/neutron/neutron.conf ${OS_CTRL_FOLDER}/neutron.conf
421     scp ${!OS_CTRL_IP}:/etc/nova/nova.conf ${OS_CTRL_FOLDER}/nova.conf
422     rsync -avhe ssh ${!OS_CTRL_IP}:/opt/stack/logs/* ${OS_CTRL_FOLDER} # rsync to prevent copying of symbolic links
423     scp extra_debug.sh ${!OS_CTRL_IP}:/tmp
424     ${SSH} ${!OS_CTRL_IP} "bash /tmp/extra_debug.sh > /tmp/extra_debug.log"
425     scp ${!OS_CTRL_IP}:/tmp/extra_debug.log ${OS_CTRL_FOLDER}/extra_debug.log
426     scp ${!OS_CTRL_IP}:/tmp/*.xz ${OS_CTRL_FOLDER}/
427     mv local.conf_control_${!OS_CTRL_IP} ${OS_CTRL_FOLDER}/local.conf
428     mv ${OS_CTRL_FOLDER} ${WORKSPACE}/archives/
429 done
430
431 # Compute Nodes
432 for i in `seq 1 ${NUM_OPENSTACK_COMPUTE_NODES}`
433 do
434     OSIP=OPENSTACK_COMPUTE_NODE_${i}_IP
435     OS_COMPUTE_FOLDER="compute_${i}"
436     mkdir -p ${OS_COMPUTE_FOLDER}
437     scp ${!OSIP}:/opt/stack/devstack/nohup.out ${OS_COMPUTE_FOLDER}/stack.log
438     scp ${!OSIP}:/var/log/openvswitch/ovs-vswitchd.log ${OS_COMPUTE_FOLDER}/ovs-vswitchd.log
439     scp ${!OSIP}:/etc/nova/nova.conf ${OS_COMPUTE_FOLDER}/nova.conf
440     rsync -avhe ssh ${!OSIP}:/opt/stack/logs/* ${OS_COMPUTE_FOLDER} # rsync to prevent copying of symbolic links
441     scp extra_debug.sh ${!OSIP}:/tmp
442     ${SSH} ${!OSIP} "bash /tmp/extra_debug.sh > /tmp/extra_debug.log"
443     scp ${!OSIP}:/tmp/extra_debug.log ${OS_COMPUTE_FOLDER}/extra_debug.log
444     scp ${!OSIP}:/tmp/*.xz ${OS_COMPUTE_FOLDER}/
445     mv local.conf_compute_${!OSIP} ${OS_COMPUTE_FOLDER}/local.conf
446     mv ${OS_COMPUTE_FOLDER} ${WORKSPACE}/archives/
447 done
448
449 ls local.conf* | xargs -I % mv % %.log
450
451 # Tempest
452 DEVSTACK_TEMPEST_DIR="/opt/stack/tempest"
453 if $(ssh ${OPENSTACK_CONTROL_NODE_1_IP} "sudo sh -c '[ -f ${DEVSTACK_TEMPEST_DIR}/.testrepository/0 ]'"); then # if Tempest results exist
454     ssh ${OPENSTACK_CONTROL_NODE_1_IP} "for I in \$(sudo ls ${DEVSTACK_TEMPEST_DIR}/.testrepository/ | grep -E '^[0-9]+$'); do sudo sh -c \"${DEVSTACK_TEMPEST_DIR}/.tox/tempest/bin/subunit-1to2 < ${DEVSTACK_TEMPEST_DIR}/.testrepository/\${I} >> ${DEVSTACK_TEMPEST_DIR}/subunit_log.txt\"; done"
455     ssh ${OPENSTACK_CONTROL_NODE_1_IP} "sudo sh -c '${DEVSTACK_TEMPEST_DIR}/.tox/tempest/bin/python ${DEVSTACK_TEMPEST_DIR}/.tox/tempest/lib/python2.7/site-packages/os_testr/subunit2html.py ${DEVSTACK_TEMPEST_DIR}/subunit_log.txt ${DEVSTACK_TEMPEST_DIR}/tempest_results.html'"
456     TEMPEST_LOGS_DIR=${WORKSPACE}/archives/tempest
457     mkdir -p ${TEMPEST_LOGS_DIR}
458     scp ${OPENSTACK_CONTROL_NODE_1_IP}:${DEVSTACK_TEMPEST_DIR}/tempest_results.html ${TEMPEST_LOGS_DIR}
459     scp ${OPENSTACK_CONTROL_NODE_1_IP}:${DEVSTACK_TEMPEST_DIR}/tempest.log ${TEMPEST_LOGS_DIR}
460     mv ${WORKSPACE}/tempest_output* ${TEMPEST_LOGS_DIR}
461 fi
462 }
463
464 cat > ${WORKSPACE}/disable_firewall.sh << EOF
465 sudo systemctl stop firewalld
466 sudo systemctl stop iptables
467 true
468 EOF
469
470 cat > ${WORKSPACE}/get_devstack.sh << EOF
471 sudo systemctl stop firewalld
472 sudo yum install bridge-utils -y
473 sudo systemctl stop  NetworkManager
474 #Disable NetworkManager and kill dhclient and dnsmasq
475 sudo systemctl stop NetworkManager
476 sudo killall dhclient
477 sudo killall dnsmasq
478 #Workaround for mysql failure
479 echo "127.0.0.1    localhost \${HOSTNAME}" > /tmp/hosts
480 echo "::1   localhost  \${HOSTNAME}" >> /tmp/hosts
481 sudo mv /tmp/hosts /etc/hosts
482 sudo /usr/sbin/brctl addbr br100
483 #sudo ifconfig eth0 mtu 2000
484 sudo mkdir /opt/stack
485 sudo chmod 777 /opt/stack
486 cd /opt/stack
487 git clone https://git.openstack.org/openstack-dev/devstack
488 cd devstack
489 git checkout $OPENSTACK_BRANCH
490 EOF
491
492 [ "$NUM_OPENSTACK_SITES" ] || NUM_OPENSTACK_SITES=1
493 compute_index=1
494 odl_index=1
495 os_node_list=()
496 os_interval=$(( ${NUM_OPENSTACK_SYSTEM} / ${NUM_OPENSTACK_SITES} ))
497 ha_proxy_index=${os_interval}
498
499 cat > "${WORKSPACE}/manual_install_package.sh" << EOF
500 cd /opt/stack
501 git clone "\$1"
502 cd "\$2"
503 git checkout "\$3"
504 sudo python setup.py install
505 EOF
506
507 for i in `seq 1 ${NUM_OPENSTACK_SITES}`
508 do
509     if [ "${ENABLE_HAPROXY_FOR_NEUTRON}" == "yes" ]; then
510         echo "Configure HAProxy"
511         ODL_HAPROXYIP_PARAM=OPENSTACK_HAPROXY_${i}_IP
512         ha_proxy_index=$(( $ha_proxy_index + $os_interval ))
513         odl_index=$(((i - 1) * 3 + 1))
514         ODL_IP_PARAM1=ODL_SYSTEM_$((odl_index++))_IP
515         ODL_IP_PARAM2=ODL_SYSTEM_$((odl_index++))_IP
516         ODL_IP_PARAM3=ODL_SYSTEM_$((odl_index++))_IP
517         ODLMGRIP[$i]=${!ODL_HAPROXYIP_PARAM} # ODL Northbound uses HAProxy VIP
518         ODL_OVS_MGRS[$i]="${!ODL_IP_PARAM1},${!ODL_IP_PARAM2},${!ODL_IP_PARAM3}" # OVSDB connects to all ODL IPs
519
520         configure_haproxy_for_neutron_requests ${!ODL_HAPROXYIP_PARAM} "${ODL_OVS_MGRS[$i]}"
521     else
522         ODL_IP_PARAM=ODL_SYSTEM_${i}_IP
523         ODL_OVS_MGRS[$i]="${!ODL_IP_PARAM}" # ODL Northbound uses ODL IP
524         ODLMGRIP[$i]=${!ODL_IP_PARAM} # OVSDB connects to ODL IP
525     fi
526 done
527
528 for i in `seq 1 ${NUM_OPENSTACK_CONTROL_NODES}`
529 do
530     echo "Stack the Control Node"
531     CONTROLIP=OPENSTACK_CONTROL_NODE_${i}_IP
532     scp ${WORKSPACE}/get_devstack.sh ${!CONTROLIP}:/tmp
533     ${SSH} ${!CONTROLIP} "bash /tmp/get_devstack.sh"
534     create_control_node_local_conf ${!CONTROLIP} ${ODLMGRIP[$i]} "${ODL_OVS_MGRS[$i]}"
535     scp ${WORKSPACE}/local.conf_control_${!CONTROLIP} ${!CONTROLIP}:/opt/stack/devstack/local.conf
536     if [ "${ODL_ML2_BRANCH}" == "stable/mitaka" ]; then
537         # Workaround for problems with latest versions/specified versions in requirements of openstack
538         # Openstacksdk,libvirt-python -> the current version does not work with  Mitaka diue to some requirements
539         # conflict and breaks when trying to stack
540         # paramiko -> Problems with tempest tests due to paramiko incompatibility with pycrypto.
541         # the problem has been solved with  version 1.17. If the latest version of paramiko is used, it causes
542         # other timeout problems
543         ssh ${!CONTROLIP} "cd /opt/stack; git clone https://git.openstack.org/openstack/requirements; cd requirements; git checkout stable/mitaka; sed -i /openstacksdk/d upper-constraints.txt; sed -i /libvirt-python/d upper-constraints.txt; sed -i /paramiko/d upper-constraints.txt"
544         scp "${WORKSPACE}/manual_install_package.sh"  "${!CONTROLIP}:/tmp"
545         ssh ${!CONTROLIP} "sudo pip install deprecation"
546         # Fix for recent requirements update  in the  master branch of the sdk.The section must be replaced with a better fix.
547         ssh "${!CONTROLIP}" "sh /tmp/manual_install_package.sh https://github.com/openstack/python-openstacksdk python-openstacksdk 0.9.14"
548         ssh "${!CONTROLIP}" "sh /tmp/manual_install_package.sh https://github.com/paramiko/paramiko paramiko 1.17"
549     fi
550     ssh ${!CONTROLIP} "cd /opt/stack/devstack; nohup ./stack.sh > /opt/stack/devstack/nohup.out 2>&1 &"
551     ssh ${!CONTROLIP} "ps -ef | grep stack.sh"
552     ssh ${!CONTROLIP} "ls -lrt /opt/stack/devstack/nohup.out"
553     os_node_list+=(${!CONTROLIP})
554
555     #Workaround for stable/newton jobs
556     if [ "${ODL_ML2_BRANCH}" == "stable/newton" ]; then
557         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"
558     fi
559 done
560
561 for i in `seq 1 ${NUM_OPENSTACK_COMPUTE_NODES}`
562 do
563     echo "Stack the Compute Node"
564     NUM_COMPUTES_PER_SITE=$((NUM_OPENSTACK_COMPUTE_NODES / NUM_OPENSTACK_SITES))
565     SITE_INDEX=$((((i - 1) / NUM_COMPUTES_PER_SITE) + 1)) # We need the site index to infer the control node IP for this compute
566     COMPUTEIP=OPENSTACK_COMPUTE_NODE_${i}_IP
567     CONTROLIP=OPENSTACK_CONTROL_NODE_${SITE_INDEX}_IP
568     scp ${WORKSPACE}/get_devstack.sh  ${!COMPUTEIP}:/tmp
569     ${SSH} ${!COMPUTEIP} "bash /tmp/get_devstack.sh"
570     create_compute_node_local_conf ${!COMPUTEIP} ${!CONTROLIP} ${ODLMGRIP[$SITE_INDEX]} "${ODL_OVS_MGRS[$SITE_INDEX]}"
571     scp ${WORKSPACE}/local.conf_compute_${!COMPUTEIP} ${!COMPUTEIP}:/opt/stack/devstack/local.conf
572     if [ "${ODL_ML2_BRANCH}" == "stable/mitaka" ]; then
573         ssh ${!COMPUTEIP} "cd /opt/stack; git clone https://git.openstack.org/openstack/requirements; cd requirements; git checkout stable/mitaka; sed -i /libvirt-python/d upper-constraints.txt"
574     fi
575     ssh ${!COMPUTEIP} "cd /opt/stack/devstack; nohup ./stack.sh > /opt/stack/devstack/nohup.out 2>&1 &"
576     ssh ${!COMPUTEIP} "ps -ef | grep stack.sh"
577     os_node_list+=(${!COMPUTEIP})
578 done
579
580 echo ${os_node_list[*]}
581
582 cat > ${WORKSPACE}/check_stacking.sh << EOF
583 > /tmp/stack_progress
584 ps -ef | grep "stack.sh" | grep -v grep
585 ret=\$?
586 if [ \${ret} -eq 1 ]; then
587   grep "This is your host IP address:" /opt/stack/devstack/nohup.out
588   if [ \$? -eq 0 ]; then
589      echo "Stacking Complete" > /tmp/stack_progress
590   else
591      echo "Stacking Failed" > /tmp/stack_progress
592   fi
593 elif [ \${ret} -eq 0 ]; then
594   echo "Still Stacking" > /tmp/stack_progress
595 fi
596 EOF
597
598 #the checking is repeated for an hour
599 iteration=0
600 in_progress=1
601 while [ ${in_progress} -eq 1 ]; do
602 iteration=$(($iteration + 1))
603 for index in ${!os_node_list[@]}
604 do
605 echo "Check the status of stacking in ${os_node_list[index]}"
606 scp ${WORKSPACE}/check_stacking.sh  ${os_node_list[index]}:/tmp
607 ${SSH} ${os_node_list[index]} "bash /tmp/check_stacking.sh"
608 scp ${os_node_list[index]}:/tmp/stack_progress .
609 #debug
610 cat stack_progress
611 stacking_status=`cat stack_progress`
612 if [ "$stacking_status" == "Still Stacking" ]; then
613   continue
614 elif [ "$stacking_status" == "Stacking Failed" ]; then
615   collect_logs_and_exit
616   exit 1
617 elif [ "$stacking_status" == "Stacking Complete" ]; then
618   unset os_node_list[index]
619   if  [ ${#os_node_list[@]} -eq 0 ]; then
620      in_progress=0
621   fi
622 fi
623 done
624  echo "sleep for a minute before the next check"
625  sleep 60
626  if [ ${iteration} -eq 60 ]; then
627   collect_logs_and_exit
628   exit 1
629  fi
630 done
631
632 NUM_COMPUTES_PER_SITE=$((NUM_OPENSTACK_COMPUTE_NODES / NUM_OPENSTACK_SITES))
633 for i in `seq 1 ${NUM_OPENSTACK_SITES}`
634 do
635     echo "Configure the Control Node"
636     CONTROLIP=OPENSTACK_CONTROL_NODE_${i}_IP
637
638     #Need to disable firewalld and iptables in control node
639     echo "Stop Firewall in Control Node for compute nodes to be able to reach the ports and add to hypervisor-list"
640     scp ${WORKSPACE}/disable_firewall.sh ${!CONTROLIP}:/tmp
641     ${SSH} ${!CONTROLIP} "sudo bash /tmp/disable_firewall.sh"
642
643     echo "sleep for 60s and print hypervisor-list"
644     sleep 60
645     ${SSH} ${!CONTROLIP} "cd /opt/stack/devstack; source openrc admin admin; nova hypervisor-list"
646     # in the case that we are doing openstack (control + compute) all in one node, then the number of hypervisors
647     # will be the same as the number of openstack systems. However, if we are doing multinode openstack then the
648     # assumption is we have a single control node and the rest are compute nodes, so the number of expected hypervisors
649     # is one less than the total number of openstack systems
650     if [ $((NUM_OPENSTACK_SYSTEM / NUM_OPENSTACK_SITES)) -eq 1 ]; then
651         expected_num_hypervisors=1
652     else
653         expected_num_hypervisors=${NUM_COMPUTES_PER_SITE}
654     fi
655     num_hypervisors=$(${SSH} ${!CONTROLIP} "cd /opt/stack/devstack; source openrc admin admin; openstack hypervisor list -f value | wc -l" | tail -1 | tr -d "\r")
656     if ! [ "${num_hypervisors}" ] || ! [ ${num_hypervisors} -eq ${expected_num_hypervisors} ]; then
657         echo "Error: Only $num_hypervisors hypervisors detected, expected $expected_num_hypervisors"
658         collect_logs_and_exit
659         exit 1
660     fi
661
662     # upgrading pip, urllib3 and httplib2 so that tempest tests can be run on openstack control node
663     # this needs to happen after devstack runs because it seems devstack is pulling in specific versions
664     # of these libs that are not working for tempest.
665     ${SSH} ${!CONTROLIP} "sudo pip install --upgrade pip"
666     ${SSH} ${!CONTROLIP} "sudo pip install urllib3 --upgrade"
667     ${SSH} ${!CONTROLIP} "sudo pip install httplib2 --upgrade"
668
669     # Gather Compute IPs for the site
670     for j in `seq 1 ${NUM_COMPUTES_PER_SITE}`
671     do
672         COMPUTE_INDEX=$(((i-1) * NUM_COMPUTES_PER_SITE + j))
673         IP_VAR=OPENSTACK_COMPUTE_NODE_${COMPUTE_INDEX}_IP
674         COMPUTE_IPS[$((j-1))]=${!IP_VAR}
675     done
676
677     # Need to disable firewalld and iptables in compute nodes as well
678     for ip in ${COMPUTE_IPS[*]}
679     do
680         scp ${WORKSPACE}/disable_firewall.sh "${ip}:/tmp"
681         ${SSH} "${ip}" "sudo bash /tmp/disable_firewall.sh"
682     done
683
684     # External Network
685     echo "prepare external networks by adding vxlan tunnels between all nodes on a separate bridge..."
686     # FIXME Should there be a unique gateway IP and devstack index for each site?
687     devstack_index=1
688     for ip in ${!CONTROLIP} ${COMPUTE_IPS[*]}
689     do
690         # FIXME - Workaround, ODL (new netvirt) currently adds PUBLIC_BRIDGE as a port in br-int since it doesn't see such a bridge existing when we stack
691         ${SSH} $ip "sudo ovs-vsctl --if-exists del-port br-int $PUBLIC_BRIDGE"
692         ${SSH} $ip "sudo ovs-vsctl --may-exist add-br $PUBLIC_BRIDGE -- set bridge $PUBLIC_BRIDGE other-config:disable-in-band=true other_config:hwaddr=f6:00:00:ff:01:0$((devstack_index++))"
693     done
694
695     # ipsec support
696     if [ "${IPSEC_VXLAN_TUNNELS_ENABLED}" == "yes" ]; then
697         ALL_NODES=(${!CONTROLIP} ${COMPUTE_IPS[*]})
698         for ((inx_ip1=0; inx_ip1<$((${#ALL_NODES[@]} - 1)); inx_ip1++))
699         do
700             for ((inx_ip2=$((inx_ip1 + 1)); inx_ip2<${#ALL_NODES[@]}; inx_ip2++))
701             do
702                 KEY1=0x$(dd if=/dev/urandom count=32 bs=1 2> /dev/null| xxd -p -c 64)
703                 KEY2=0x$(dd if=/dev/urandom count=32 bs=1 2> /dev/null| xxd -p -c 64)
704                 ID=0x$(dd if=/dev/urandom count=4 bs=1 2> /dev/null| xxd -p -c 8)
705                 ip1=${ALL_NODES[$inx_ip1]}
706                 ip2=${ALL_NODES[$inx_ip2]}
707                 ${SSH} $ip1 "sudo ip xfrm state add src $ip1 dst $ip2 proto esp spi $ID reqid $ID mode transport auth sha256 $KEY1 enc aes $KEY2"
708                 ${SSH} $ip1 "sudo ip xfrm state add src $ip2 dst $ip1 proto esp spi $ID reqid $ID mode transport auth sha256 $KEY1 enc aes $KEY2"
709                 ${SSH} $ip1 "sudo ip xfrm policy add src $ip1 dst $ip2 proto udp dir out tmpl src $ip1 dst $ip2 proto esp reqid $ID mode transport"
710                 ${SSH} $ip1 "sudo ip xfrm policy add src $ip2 dst $ip1 proto udp dir in tmpl src $ip2 dst $ip1 proto esp reqid $ID mode transport"
711
712                 ${SSH} $ip2 "sudo ip xfrm state add src $ip2 dst $ip1 proto esp spi $ID reqid $ID mode transport auth sha256 $KEY1 enc aes $KEY2"
713                 ${SSH} $ip2 "sudo ip xfrm state add src $ip1 dst $ip2 proto esp spi $ID reqid $ID mode transport auth sha256 $KEY1 enc aes $KEY2"
714                 ${SSH} $ip2 "sudo ip xfrm policy add src $ip2 dst $ip1 proto udp dir out tmpl src $ip2 dst $ip1 proto esp reqid $ID mode transport"
715                 ${SSH} $ip2 "sudo ip xfrm policy add src $ip1 dst $ip2 proto udp dir in tmpl src $ip1 dst $ip2 proto esp reqid $ID mode transport"
716             done
717         done
718
719         for ip in ${!CONTROLIP} ${COMPUTE_IPS[*]}
720         do
721             echo "ip xfrm configuration for node $ip:"
722             ${SSH} $ip "sudo ip xfrm policy list"
723             ${SSH} $ip "sudo ip xfrm state list"
724         done
725     fi
726
727     # Control Node - PUBLIC_BRIDGE will act as the external router
728     # Parameter values below are used in integration/test - changing them requires updates in intergration/test as well
729     EXTNET_GATEWAY_IP="10.10.10.250"
730     EXTNET_VLAN_ID=167
731     EXTNET_INTERNET_IP="10.9.9.9"
732     EXTNET_PNF_IP="10.10.10.253"
733     if [[ ${CONTROLLERFEATURES} == *"odl-ovsdb-openstack"* ]]; then
734         ${SSH} ${!CONTROLIP} "sudo ifconfig ${PUBLIC_BRIDGE} up ${EXTNET_GATEWAY_IP}/24"
735     else
736         ${SSH} ${!CONTROLIP} "sudo ip link add link ${PUBLIC_BRIDGE} name ${PUBLIC_BRIDGE}.${EXTNET_VLAN_ID} type vlan id ${EXTNET_VLAN_ID}"
737         ${SSH} ${!CONTROLIP} "sudo ifconfig ${PUBLIC_BRIDGE} up"
738         ${SSH} ${!CONTROLIP} "sudo ifconfig ${PUBLIC_BRIDGE}.${EXTNET_VLAN_ID} up ${EXTNET_GATEWAY_IP}/24"
739
740         # Control Node - external net PNF simulation
741         ${SSH} ${!CONTROLIP} "
742             sudo ip netns add pnf_ns;
743             sudo ip link add pnf_veth0 type veth peer name pnf_veth1;
744             sudo ip link set pnf_veth1 netns pnf_ns;
745             sudo ip link set pnf_veth0 up;
746             sudo ip netns exec pnf_ns ifconfig pnf_veth1 up;
747             sudo ip netns exec pnf_ns ip link add link pnf_veth1 name pnf_veth1.${EXTNET_VLAN_ID} type vlan id ${EXTNET_VLAN_ID};
748             sudo ip netns exec pnf_ns ifconfig pnf_veth1.${EXTNET_VLAN_ID} up ${EXTNET_PNF_IP}/24;
749             sudo ovs-vsctl add-port ${PUBLIC_BRIDGE} pnf_veth0;
750         "
751
752         # Control Node - external net internet address simulation
753         ${SSH} ${!CONTROLIP} "
754             sudo ip tuntap add dev internet_tap mode tap;
755             sudo ifconfig internet_tap up ${EXTNET_INTERNET_IP}/24;
756         "
757     fi
758
759     # Computes
760     compute_index=1
761     for compute_ip in ${COMPUTE_IPS[*]}
762     do
763         # Tunnel from controller to compute
764         COMPUTEPORT=compute$(( compute_index++ ))_vxlan
765         ${SSH} ${!CONTROLIP} "sudo ovs-vsctl add-port $PUBLIC_BRIDGE $COMPUTEPORT -- set interface $COMPUTEPORT type=vxlan options:local_ip="${!CONTROLIP}" options:remote_ip="$compute_ip" options:dst_port=9876 options:key=flow"
766         # Tunnel from compute to controller
767         CONTROLPORT="control_vxlan"
768         ${SSH} $compute_ip "sudo ovs-vsctl add-port $PUBLIC_BRIDGE $CONTROLPORT -- set interface $CONTROLPORT type=vxlan options:local_ip="$compute_ip" options:remote_ip="${!CONTROLIP}" options:dst_port=9876 options:key=flow"
769     done
770 done
771
772 if [ "${ENABLE_HAPROXY_FOR_NEUTRON}" == "yes" ]; then
773     odlmgrip=OPENSTACK_HAPROXY_1_IP
774     HA_PROXY_IP=${!odlmgrip}
775     HA_PROXY_1_IP=${!odlmgrip}
776     odlmgrip2=OPENSTACK_HAPROXY_2_IP
777     HA_PROXY_2_IP=${!odlmgrip2}
778     odlmgrip3=OPENSTACK_HAPROXY_1_IP
779     HA_PROXY_3_IP=${!odlmgrip3}
780 else
781     HA_PROXY_IP=${ODL_SYSTEM_IP}
782     HA_PROXY_1_IP=${ODL_SYSTEM_1_IP}
783     HA_PROXY_2_IP=${ODL_SYSTEM_2_IP}
784     HA_PROXY_3_IP=${ODL_SYSTEM_3_IP}
785 fi
786
787 echo "Locating test plan to use..."
788 testplan_filepath="${WORKSPACE}/test/csit/testplans/${STREAMTESTPLAN}"
789 if [ ! -f "${testplan_filepath}" ]; then
790     testplan_filepath="${WORKSPACE}/test/csit/testplans/${TESTPLAN}"
791 fi
792
793 echo "Changing the testplan path..."
794 cat "${testplan_filepath}" | sed "s:integration:${WORKSPACE}:" > testplan.txt
795 cat testplan.txt
796
797 SUITES=`egrep -v '(^[[:space:]]*#|^[[:space:]]*$)' testplan.txt | tr '\012' ' '`
798
799 #FIXME currently support only 1 site
800 echo "Starting Robot test suites ${SUITES} ..."
801 # please add pybot -v arguments on a single line and alphabetized
802 pybot -N ${TESTPLAN} --removekeywords wuks -c critical -e exclude \
803     -v BUNDLEFOLDER:${BUNDLEFOLDER} \
804     -v BUNDLE_URL:${ACTUALBUNDLEURL} \
805     -v CONTROLLER_USER:${USER} \
806     -v DEVSTACK_DEPLOY_PATH:/opt/stack/devstack \
807     -v HA_PROXY_IP:${HA_PROXY_IP} \
808     -v HA_PROXY_1_IP:${HA_PROXY_1_IP} \
809     -v HA_PROXY_2_IP:${HA_PROXY_2_IP} \
810     -v HA_PROXY_3_IP:${HA_PROXY_3_IP} \
811     -v JDKVERSION:${JDKVERSION} \
812     -v NEXUSURL_PREFIX:${NEXUSURL_PREFIX} \
813     -v NUM_ODL_SYSTEM:${NUM_ODL_SYSTEM} \
814     -v NUM_OPENSTACK_SITES:${NUM_OPENSTACK_SITES} \
815     -v NUM_OS_SYSTEM:${NUM_OPENSTACK_SYSTEM} \
816     -v NUM_TOOLS_SYSTEM:${NUM_TOOLS_SYSTEM} \
817     -v ODL_SNAT_MODE:${ODL_SNAT_MODE} \
818     -v ODL_STREAM:${DISTROSTREAM} \
819     -v ODL_SYSTEM_IP:${ODL_SYSTEM_IP} \
820     -v ODL_SYSTEM_1_IP:${ODL_SYSTEM_1_IP} \
821     -v ODL_SYSTEM_2_IP:${ODL_SYSTEM_2_IP} \
822     -v ODL_SYSTEM_3_IP:${ODL_SYSTEM_3_IP} \
823     -v ODL_SYSTEM_4_IP:${ODL_SYSTEM_4_IP} \
824     -v ODL_SYSTEM_5_IP:${ODL_SYSTEM_5_IP} \
825     -v ODL_SYSTEM_6_IP:${ODL_SYSTEM_6_IP} \
826     -v ODL_SYSTEM_7_IP:${ODL_SYSTEM_7_IP} \
827     -v ODL_SYSTEM_8_IP:${ODL_SYSTEM_8_IP} \
828     -v ODL_SYSTEM_9_IP:${ODL_SYSTEM_9_IP} \
829     -v OS_CONTROL_NODE_IP:${OPENSTACK_CONTROL_NODE_1_IP} \
830     -v OS_CONTROL_NODE_1_IP:${OPENSTACK_CONTROL_NODE_1_IP} \
831     -v OS_CONTROL_NODE_2_IP:${OPENSTACK_CONTROL_NODE_2_IP} \
832     -v OS_CONTROL_NODE_3_IP:${OPENSTACK_CONTROL_NODE_3_IP} \
833     -v OPENSTACK_BRANCH:${OPENSTACK_BRANCH} \
834     -v OS_COMPUTE_1_IP:${OPENSTACK_COMPUTE_NODE_1_IP} \
835     -v OS_COMPUTE_2_IP:${OPENSTACK_COMPUTE_NODE_2_IP} \
836     -v OS_COMPUTE_3_IP:${OPENSTACK_COMPUTE_NODE_3_IP} \
837     -v OS_COMPUTE_4_IP:${OPENSTACK_COMPUTE_NODE_4_IP} \
838     -v OS_COMPUTE_5_IP:${OPENSTACK_COMPUTE_NODE_5_IP} \
839     -v OS_COMPUTE_6_IP:${OPENSTACK_COMPUTE_NODE_6_IP} \
840     -v OS_USER:${USER} \
841     -v PUBLIC_PHYSICAL_NETWORK:${PUBLIC_PHYSICAL_NETWORK} \
842     -v SECURITY_GROUP_MODE:${SECURITY_GROUP_MODE} \
843     -v TOOLS_SYSTEM_IP:${TOOLS_SYSTEM_1_IP} \
844     -v TOOLS_SYSTEM_1_IP:${TOOLS_SYSTEM_1_IP} \
845     -v TOOLS_SYSTEM_2_IP:${TOOLS_SYSTEM_2_IP} \
846     -v USER_HOME:${HOME} \
847     -v WORKSPACE:/tmp \
848     ${TESTOPTIONS} ${SUITES} || true
849
850 echo "Examining the files in data/log and checking filesize"
851 ssh ${ODL_SYSTEM_IP} "ls -altr /tmp/${BUNDLEFOLDER}/data/log/"
852 ssh ${ODL_SYSTEM_IP} "du -hs /tmp/${BUNDLEFOLDER}/data/log/*"
853
854 echo "Tests Executed"
855 collect_logs_and_exit
856
857 true  # perhaps Jenkins is testing last exit code
858 # vim: ts=4 sw=4 sts=4 et ft=sh :