SSH="ssh -t -t"
ADMIN_PASSWORD="admin"
OPENSTACK_MASTER_CLIENTS_VERSION="queens"
+#Size of the partition to /opt/stack in control and compute nodes
+TMPFS_SIZE=2G
# TODO: remove this work to run changes.py if/when it's moved higher up to be visible at the Robot level
printf "\nshowing recent changes that made it into the distribution used by this job:\n"
physical_network_mtus = ${PUBLIC_PHYSICAL_NETWORK}:1400
path_mtu = 1458
EOF
-
+ if [ "${ENABLE_GRE_TYPE_DRIVERS}" == "yes" ]; then
+ cat >> ${local_conf_file_name} << EOF
+type_drivers = local,flat,vlan,gre,vxlan
+[ml2_type_gre]
+tunnel_id_ranges = 1:1000
+EOF
+ fi
if [ "${ENABLE_NETWORKING_L2GW}" == "yes" ]; then
cat >> ${local_conf_file_name} << EOF
} # create_compute_node_local_conf()
function configure_haproxy_for_neutron_requests() {
- MGRIP=$1
+ local -r haproxy_ip=$1
# shellcheck disable=SC2206
- ODL_IPS=(${2//,/ })
+ local -r odl_ips=(${2//,/ })
cat > ${WORKSPACE}/install_ha_proxy.sh<< EOF
sudo systemctl stop firewalld
sudo yum -y install policycoreutils-python haproxy
EOF
-cat > ${WORKSPACE}/haproxy.cfg << EOF
+ cat > ${WORKSPACE}/haproxy.cfg << EOF
global
daemon
group haproxy
timeout check 10s
listen opendaylight
- bind ${MGRIP}:8080
+ bind ${haproxy_ip}:8181 transparent
+ mode http
+ http-request set-header X-Forwarded-Proto https if { ssl_fc }
+ http-request set-header X-Forwarded-Proto http if !{ ssl_fc }
+ option httpchk GET /diagstatus
+ option httplog
balance source
+EOF
-listen opendaylight_rest
- bind ${MGRIP}:8181
- balance source
+ odlindex=1
+ for odlip in ${odl_ips[*]}; do
+ echo " server opendaylight-rest-${odlindex} ${odlip}:8181 check fall 5 inter 2000 rise 2" >> ${WORKSPACE}/haproxy.cfg
+ odlindex=$((odlindex+1))
+ done
-listen opendaylight_websocket
- bind ${MGRIP}:8185
- balance source
+ cat >> ${WORKSPACE}/haproxy.cfg << EOF
+listen opendaylight_ws
+ bind ${haproxy_ip}:8185 transparent
+ mode http
+ timeout connect 5s
+ timeout client 25s
+ timeout server 25s
+ timeout tunnel 3600s
+ balance source
EOF
odlindex=1
- for odlip in ${ODL_IPS[*]}; do
- sed -i "/listen opendaylight$/a server controller-${odlindex} ${odlip}:8080 check fall 5 inter 2000 rise 2" ${WORKSPACE}/haproxy.cfg
- sed -i "/listen opendaylight_rest$/a server controller-rest-${odlindex} ${odlip}:8181 check fall 5 inter 2000 rise 2" ${WORKSPACE}/haproxy.cfg
- sed -i "/listen opendaylight_websocket$/a server controller-websocket-${odlindex} ${odlip}:8185 check fall 5 inter 2000 rise 2" ${WORKSPACE}/haproxy.cfg
+ for odlip in ${odl_ips[*]}; do
+ echo " server opendaylight-ws-${odlindex} ${odlip}:8185 check fall 5 inter 2000 rise 2" >> ${WORKSPACE}/haproxy.cfg
odlindex=$((odlindex+1))
done
-
echo "Dump haproxy.cfg"
cat ${WORKSPACE}/haproxy.cfg
true
EOF
- scp ${WORKSPACE}/install_ha_proxy.sh ${MGRIP}:/tmp
- ${SSH} ${MGRIP} "sudo bash /tmp/install_ha_proxy.sh"
- scp ${WORKSPACE}/haproxy.cfg ${MGRIP}:/tmp
- scp ${WORKSPACE}/deploy_ha_proxy.sh ${MGRIP}:/tmp
- ${SSH} ${MGRIP} "sudo bash /tmp/deploy_ha_proxy.sh"
+ scp ${WORKSPACE}/install_ha_proxy.sh ${haproxy_ip}:/tmp
+ ${SSH} ${haproxy_ip} "sudo bash /tmp/install_ha_proxy.sh"
+ scp ${WORKSPACE}/haproxy.cfg ${haproxy_ip}:/tmp
+ scp ${WORKSPACE}/deploy_ha_proxy.sh ${haproxy_ip}:/tmp
+ ${SSH} ${haproxy_ip} "sudo bash /tmp/deploy_ha_proxy.sh"
} # configure_haproxy_for_neutron_requests()
# Following three functions are debugging helpers when debugging devstack changes.
true
EOF
+#For SFC Tests a larger partition is required for creating instances with Ubuntu
+if [[ "${ENABLE_OS_PLUGINS}" =~ networking-sfc ]]; then
+ TMPFS_SIZE=12G
+fi
cat > ${WORKSPACE}/get_devstack.sh << EOF
sudo systemctl stop firewalld
sudo yum install bridge-utils python-pip -y
sudo mv /tmp/hosts /etc/hosts
sudo mkdir /opt/stack
echo "Create RAM disk for /opt/stack"
-sudo mount -t tmpfs -o size=2G tmpfs /opt/stack
+sudo mount -t tmpfs -o size=${TMPFS_SIZE} tmpfs /opt/stack
sudo chmod 777 /opt/stack
cd /opt/stack
echo "git clone https://git.openstack.org/openstack-dev/devstack --branch ${OPENSTACK_BRANCH}"
echo "git checkout ${DEVSTACK_HASH}"
git checkout ${DEVSTACK_HASH}
fi
+wget https://raw.githubusercontent.com/shague/odl_tools/master/fix-logging.patch.txt -O /tmp/fix-logging.patch.txt
+patch --verbose -p1 -i /tmp/fix-logging.patch.txt
git --no-pager log --pretty=format:'%h %<(13)%ar%<(13)%cr %<(20,trunc)%an%d %s%b' -n20
echo
sudo nova-manage cell_v2 discover_hosts
EOF
+cat > "${WORKSPACE}/workaround_networking_sfc.sh" << EOF
+cd /opt/stack
+git clone https://git.openstack.org/openstack/networking-sfc
+cd networking-sfc
+git checkout ${OPENSTACK_BRANCH}
+git checkout master -- devstack/plugin.sh
+EOF
+
+NUM_OPENSTACK_SITES=${NUM_OPENSTACK_SITES:-1}
+compute_index=1
os_node_list=()
if [ "${ENABLE_HAPROXY_FOR_NEUTRON}" == "yes" ]; then
if [ "${ODL_ML2_BRANCH}" == "stable/queens" ]; 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"
+ #Workaround for networking-sfc to configure the paramaters in neutron.conf if the
+ # services used are neutron-api, neutron-dhcp etc instead of q-agt.
+ # Can be removed if the patch https://review.openstack.org/#/c/596287/ gets merged
+ if [[ "${ENABLE_OS_PLUGINS}" =~ networking-sfc ]]; then
+ scp ${WORKSPACE}/workaround_networking_sfc.sh ${!CONTROLIP}:/tmp/
+ ssh ${!CONTROLIP} "bash -x /tmp/workaround_networking_sfc.sh"
+ fi
fi
create_control_node_local_conf ${!CONTROLIP} ${ODLMGRIP} "${ODL_OVS_MGRS}"
scp ${WORKSPACE}/local.conf_control_${!CONTROLIP} ${!CONTROLIP}:/opt/stack/devstack/local.conf