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