SSH="ssh -t -t"
-function create_control_node_local_conf {
-HOSTIP=$1
-MGRIP=$2
-ODL_OVS_MANAGERS="$3"
-#Needs to be removed
+function create_etc_hosts {
+NODE_IP=$1
+CTRL_IP=$2
+: > ${WORKSPACE}/hosts_file
+for iter in `seq 1 ${NUM_OPENSTACK_COMPUTE_NODES}`
+do
+ COMPUTE_IP=OPENSTACK_COMPUTE_NODE_${iter}_IP
+ if [ "${!COMPUTE_IP}" == "${NODE_IP}" ]; then
+ CONTROL_HNAME=$(${SSH} ${CTRL_IP} "hostname")
+ echo "${CTRL_IP} ${CONTROL_HNAME}" >> ${WORKSPACE}/hosts_file
+ else
+ COMPUTE_HNAME=$(${SSH} ${!COMPUTE_IP} "hostname")
+ echo "${!COMPUTE_IP} ${COMPUTE_HNAME}" >> ${WORKSPACE}/hosts_file
+ fi
+done
+
+cat ${WORKSPACE}/hosts_file
+echo "Created the hosts file for ${NODE_IP}"
+}
+
if [ "${ODL_ML2_BRANCH}" != "stable/ocata" ]; then
RECLONE=no
else
RECLONE=yes
fi
+function create_control_node_local_conf {
+HOSTIP=$1
+MGRIP=$2
+ODL_OVS_MANAGERS="$3"
+#Needs to be removed
local_conf_file_name=${WORKSPACE}/local.conf_control_${HOSTIP}
cat > ${local_conf_file_name} << EOF
[[local|localrc]]
EOF
done
unset IFS
-if [ "${OPENSTACK_BRANCH}" == "master" ] || [ "${OPENSTACK_BRANCH}" == "stable/ocata" ]; then # Ocata+
+if [ "${OPENSTACK_BRANCH}" == "stable/pike" ] || [ "${OPENSTACK_BRANCH}" == "stable/ocata" ]; then # Ocata+
# placement is mandatory for nova since Ocata, note that this requires computes to enable placement-client
# this should be moved into enabled_services for each job (but only for Ocata)
echo "enable_service placement-api" >> ${local_conf_file_name}
NEUTRON_CREATE_INITIAL_NETWORKS=${CREATE_INITIAL_NETWORKS}
Q_PLUGIN=ml2
Q_ML2_TENANT_NETWORK_TYPE=${TENANT_NETWORK_TYPE}
-Q_OVS_USE_VETH=True
ENABLE_TENANT_TUNNELS=True
ODL_PROVIDER_MAPPINGS=${ODL_PROVIDER_MAPPINGS}
disable_service q-l3
-PUBLIC_INTERFACE=br100
EOF
-SERVICE_PLUGINS="networking_odl.l3.l3_odl.OpenDaylightL3RouterPlugin"
+if [ "${ODL_ML2_DRIVER_VERSION}" == "v2" ]; then
+ SERVICE_PLUGINS="odl-router_v2"
+else
+ SERVICE_PLUGINS="odl-router"
+fi
+
if [ "${ENABLE_NETWORKING_L2GW}" == "yes" ]; then
SERVICE_PLUGINS+=", networking_l2gw.services.l2gateway.plugin.L2GatewayPlugin"
fi #check for ENABLE_NETWORKING_L2GW
[DEFAULT]
force_config_drive = False
+[scheduler]
+discover_hosts_in_cells_interval = 30
+
EOF
echo "local.conf Created...."
MGRIP=$3
ODL_OVS_MANAGERS="$4"
#Needs to be removed
-if [ "${ODL_ML2_BRANCH}" != "stable/ocata" ]; then
- RECLONE=no
-else
- RECLONE=yes
-fi
-if [ "${OPENSTACK_BRANCH}" == "master" ] || [ "${OPENSTACK_BRANCH}" == "stable/ocata" ]; then # Ocata+
+if [ "${OPENSTACK_BRANCH}" == "stable/pike" ] || [ "${OPENSTACK_BRANCH}" == "stable/ocata" ]; then # Ocata+
# placement is mandatory for nova since Ocata, note that this requires controller to enable placement-api
ENABLED_SERVICES="n-cpu,placement-client"
else
# Uncomment lines below if odl-compute is to be used for l3 forwarding
Q_L3_ENABLED=True
ODL_L3=${ODL_L3}
-PUBLIC_INTERFACE=br100 # FIXME do we use br100 at all?
PUBLIC_BRIDGE=${PUBLIC_BRIDGE}
PUBLIC_PHYSICAL_NETWORK=${PUBLIC_PHYSICAL_NETWORK}
ODL_PROVIDER_MAPPINGS=${ODL_PROVIDER_MAPPINGS}
EOF
fi
+cat >> ${local_conf_file_name} << EOF
+
+[[post-config|/etc/nova/nova.conf]]
+[api]
+auth_strategy = keystone
+[DEFAULT]
+use_neutron = True
+EOF
+
+# Keep this block after the nova.conf above to ensure it goes in the DEFAULT section
+# Ignore not receiving the vif plugging event by setting the vif_plugging_is_fatal ot false.
+# Due to https://bugs.opendaylight.org/show_bug.cgi?id=9092, the event is not sent.
+# This allows the instance to spawn and neutron and nove to continue processing the vm creation.
+if [ "${OPENSTACK_BRANCH}" == "stable/pike" ]; then
+cat >> ${local_conf_file_name} << EOF
+vif_plugging_timeout = 300
+vif_plugging_is_fatal = false
+EOF
+fi
+
echo "local.conf Created...."
cat ${local_conf_file_name}
}
mkdir -p ${OS_CTRL_FOLDER}
scp ${!OS_CTRL_IP}:/opt/stack/devstack/nohup.out ${OS_CTRL_FOLDER}/stack.log
scp ${!OS_CTRL_IP}:/var/log/openvswitch/ovs-vswitchd.log ${OS_CTRL_FOLDER}/ovs-vswitchd.log
- scp ${!OS_CTRL_IP}:/var/log/openvswitch/ovsdb-server.log ${OS_CTRL_FOLDER}/ovsdb-server.log
scp ${!OS_CTRL_IP}:/etc/neutron/neutron.conf ${OS_CTRL_FOLDER}/neutron.conf
scp ${!OS_CTRL_IP}:/etc/nova/nova.conf ${OS_CTRL_FOLDER}/nova.conf
scp ${!OS_CTRL_IP}:/etc/kuryr/kuryr.conf ${OS_CTRL_FOLDER}/kuryr.conf
scp ${!OS_CTRL_IP}:/etc/neutron/neutron_lbaas.conf ${OS_CTRL_FOLDER}/neutron-lbaas.conf
scp ${!OS_CTRL_IP}:/etc/neutron/services/loadbalancer/haproxy/lbaas_agent.ini ${OS_CTRL_FOLDER}/lbaas-agent.ini
rsync -avhe ssh ${!OS_CTRL_IP}:/opt/stack/logs/* ${OS_CTRL_FOLDER} # rsync to prevent copying of symbolic links
+ rsync --rsync-path="sudo rsync" -avhe ssh ${!OS_CTRL_IP}:/etc/hosts ${OS_CTRL_FOLDER}/hosts.log
# Use rsync with sudo to get access to the log dir.
rsync --rsync-path="sudo rsync" -avhe ssh ${!OS_CTRL_IP}:/var/log/audit/audit.log ${OS_CTRL_FOLDER}
scp extra_debug.sh ${!OS_CTRL_IP}:/tmp
scp ${!OSIP}:/var/log/libvirt/qeum/*.log ${OS_COMPUTE_FOLDER}
scp ${!OSIP}:/etc/nova/nova.conf ${OS_COMPUTE_FOLDER}/nova.conf
rsync -avhe ssh ${!OSIP}:/opt/stack/logs/* ${OS_COMPUTE_FOLDER} # rsync to prevent copying of symbolic links
+ rsync --rsync-path="sudo rsync" -avhe ssh ${!OSIP}:/etc/hosts ${OS_COMPUTE_FOLDER}/hosts.log
# Use rsync with sudo to get access to the log dir. Also can't use wildcard because the dirs only have
# exec permissions which doesn't allow ls.
rsync --rsync-path="sudo rsync" -avhe ssh ${!OSIP}:/var/log/libvirt ${OS_COMPUTE_FOLDER}
sudo killall dhclient
sudo killall dnsmasq
#Workaround for mysql failure
-echo "127.0.0.1 localhost \${HOSTNAME}" > /tmp/hosts
+echo "127.0.0.1 localhost \${HOSTNAME}" >> /tmp/hosts
echo "::1 localhost \${HOSTNAME}" >> /tmp/hosts
sudo mv /tmp/hosts /etc/hosts
-sudo /usr/sbin/brctl addbr br100
-#sudo ifconfig eth0 mtu 2000
sudo mkdir /opt/stack
sudo chmod 777 /opt/stack
cd /opt/stack
-git clone https://git.openstack.org/openstack-dev/devstack
-cd devstack
-git checkout $OPENSTACK_BRANCH
+git clone https://git.openstack.org/openstack-dev/devstack --branch $OPENSTACK_BRANCH
#To fix the recent tempest/tox issues which blocks stacking
sudo pip install tox==2.7.0
EOF
do
echo "Stack the Control Node"
CONTROLIP=OPENSTACK_CONTROL_NODE_${i}_IP
+ create_etc_hosts ${!CONTROLIP}
+ scp ${WORKSPACE}/hosts_file ${!CONTROLIP}:/tmp/hosts
scp ${WORKSPACE}/get_devstack.sh ${!CONTROLIP}:/tmp
${SSH} ${!CONTROLIP} "bash /tmp/get_devstack.sh"
create_control_node_local_conf ${!CONTROLIP} ${ODLMGRIP[$i]} "${ODL_OVS_MGRS[$i]}"
SITE_INDEX=$((((i - 1) / NUM_COMPUTES_PER_SITE) + 1)) # We need the site index to infer the control node IP for this compute
COMPUTEIP=OPENSTACK_COMPUTE_NODE_${i}_IP
CONTROLIP=OPENSTACK_CONTROL_NODE_${SITE_INDEX}_IP
+ create_etc_hosts ${!COMPUTEIP} ${!CONTROLIP}
+ scp ${WORKSPACE}/hosts_file ${!COMPUTEIP}:/tmp/hosts
scp ${WORKSPACE}/get_devstack.sh ${!COMPUTEIP}:/tmp
${SSH} ${!COMPUTEIP} "bash /tmp/get_devstack.sh"
create_compute_node_local_conf ${!COMPUTEIP} ${!CONTROLIP} ${ODLMGRIP[$SITE_INDEX]} "${ODL_OVS_MGRS[$SITE_INDEX]}"
do
echo "Configure the Control Node"
CONTROLIP=OPENSTACK_CONTROL_NODE_${i}_IP
+ # Gather Compute IPs for the site
+ for j in `seq 1 ${NUM_COMPUTES_PER_SITE}`
+ do
+ COMPUTE_INDEX=$(((i-1) * NUM_COMPUTES_PER_SITE + j))
+ IP_VAR=OPENSTACK_COMPUTE_NODE_${COMPUTE_INDEX}_IP
+ COMPUTE_IPS[$((j-1))]=${!IP_VAR}
+ done
+
+ # Need to disable firewalld and iptables in compute nodes as well
+ for ip in ${COMPUTE_IPS[*]}
+ do
+ scp ${WORKSPACE}/disable_firewall.sh "${ip}:/tmp"
+ ${SSH} "${ip}" "sudo bash /tmp/disable_firewall.sh"
+ done
#Need to disable firewalld and iptables in control node
echo "Stop Firewall in Control Node for compute nodes to be able to reach the ports and add to hypervisor-list"
echo "sleep for 60s and print hypervisor-list"
sleep 60
+ # In anything after Newton, if we do not enable the n-cpu in control node
+ # We need to discover hosts manually and ensure that they are mapped to cells.
+ # reference: https://ask.openstack.org/en/question/102256/how-to-configure-placement-service-for-compute-node-on-ocata/
+ if [ "${OPENSTACK_BRANCH}" == "stable/ocata" ]; then
+ scp ${WORKSPACE}/setup_host_cell_mapping.sh ${!CONTROLIP}:/tmp
+ ${SSH} ${!CONTROLIP} "sudo bash /tmp/setup_host_cell_mapping.sh"
+ fi
${SSH} ${!CONTROLIP} "cd /opt/stack/devstack; source openrc admin admin; nova hypervisor-list"
# 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
exit 1
fi
- # For Ocata, if we do not enable the n-cpu in control node
- # We need to discover hosts manually and ensure that they are mapped to cells.
- # reference: https://ask.openstack.org/en/question/102256/how-to-configure-placement-service-for-compute-node-on-ocata/
- if [ "${OPENSTACK_BRANCH}" == "stable/ocata" ]; then
- scp ${WORKSPACE}/setup_host_cell_mapping.sh ${!CONTROLIP}:/tmp
- ${SSH} ${!CONTROLIP} "sudo bash /tmp/setup_host_cell_mapping.sh"
- fi
# upgrading pip, urllib3 and httplib2 so that tempest tests can be run on openstack control node
# this needs to happen after devstack runs because it seems devstack is pulling in specific versions
SUITES=`egrep -v '(^[[:space:]]*#|^[[:space:]]*$)' testplan.txt | tr '\012' ' '`
fi
-#Environment Variables Needed to execute Openstack Client for NEtvirt Jobs
+if [ "${OPENSTACK_BRANCH}" == "stable/pike" ]; then # Pike
+ AUTH="http://${!CONTROLIP}/identity"
+else
+ AUTH="http://${!CONTROLIP}:35357/v3"
+fi
+
+#Environment Variables Needed to execute Openstack Client for Netvirt Jobs
cat > /tmp/os_netvirt_client_rc << EOF
export OS_USERNAME=admin
export OS_PASSWORD=admin
export OS_PROJECT_NAME=admin
export OS_USER_DOMAIN_NAME=default
export OS_PROJECT_DOMAIN_NAME=default
-export OS_AUTH_URL="http://${!CONTROLIP}:35357/v3"
+export OS_AUTH_URL=${AUTH}
export OS_IDENTITY_API_VERSION=3
export OS_IMAGE_API_VERSION=2
export OS_TENANT_NAME=admin
---
- project:
- name: netvirt-csit-openstack-integration
+ name: netvirt-csit-openstack-integration-nitrogen
jobs:
- '{project}-csit-{topology}-openstack-{openstack}-{functionality}-{stream}'
project: 'netvirt'
+ stream: 'nitrogen'
+ branch: 'master'
+ jre: 'openjdk8'
+
topology:
- 1node:
openstack_system_count: 1
sg-mode: 'transparent'
testplan: '{project}-{topology}-tempest-openstack.txt'
- stream:
- - oxygen:
- branch: 'master'
- jre: 'openjdk8'
- - nitrogen:
- branch: 'stable/nitrogen'
- jre: 'openjdk8'
- - carbon:
- branch: 'stable/carbon'
- jre: 'openjdk8'
- karaf-version: karaf3
- - boron:
- branch: 'stable/boron'
- jre: 'openjdk8'
- karaf-version: karaf3
+ openstack:
+ - ocata:
+ openstack-branch: 'stable/ocata'
+ odl-ml2-branch: 'stable/ocata'
+ odl-ml2-driver-version: 'v2'
+ openstack_system_image: 'CentOS 7 - devstack-newton - 20170707-0359'
+ openstack_system2_image: 'CentOS 7 - devstack-newton - 20170707-0359'
+ - pike:
+ openstack-branch: 'stable/pike'
+ odl-ml2-branch: 'stable/pike'
+ odl-ml2-driver-version: 'v2'
+ odl-ml2-port-binding: 'pseudo-agentdb-binding'
+ enable-openstack-services: 'q-svc,q-dhcp,q-meta,n-cauth,tempest'
+ disable-openstack-services: 'swift,cinder,n-net,q-vpn,n-cpu,horizon'
+ openstack_system_image: 'CentOS 7 - devstack-pike - 20170901-2223'
+ openstack_system2_image: 'CentOS 7 - devstack-pike - 20170901-2223'
+ - queens:
+ openstack-branch: 'master'
+ odl-ml2-branch: 'master'
+ odl-ml2-driver-version: 'v2'
+ odl-ml2-port-binding: 'pseudo-agentdb-binding'
+ openstack_system_image: 'CentOS 7 - devstack-pike - 20170901-2223'
+ openstack_system2_image: 'CentOS 7 - devstack-pike - 20170901-2223'
+
+ security-group-mode: '{sg-mode}'
+
+- project:
+ name: netvirt-csit-openstack-integration-carbon
+ jobs:
+ - '{project}-csit-{topology}-openstack-{openstack}-{functionality}-{stream}'
+
+ project: 'netvirt'
+
+ stream: 'carbon'
+ branch: 'stable/carbon'
+ jre: 'openjdk8'
+ karaf-version: karaf3
+
+ topology:
+ - 1node:
+ openstack_system_count: 1
+ openstack_system2_count: 2
+ odl_system_count: 1
+ enable-haproxy: 'no'
+ install-features: 'odl-netvirt-openstack'
+ - 3node:
+ openstack_system_count: 1
+ openstack_system2_count: 3
+ odl_system_count: 3
+ enable-haproxy: 'yes'
+ install-features: 'odl-jolokia,odl-netvirt-openstack'
+
+ testplan: '{project}-{topology}-openstack.txt'
+
+ functionality:
+ - upstream-transparent:
+ schedule: ''
+ sg-mode: 'transparent'
+ - upstream-stateful:
+ schedule: ''
+ sg-mode: 'stateful'
+ - upstream-stateful-snat-conntrack:
+ schedule: ''
+ sg-mode: 'stateful'
+ odl-snat-mode: 'conntrack'
+ - upstream-learn:
+ schedule: ''
+ sg-mode: 'learn'
+ - gate-learn:
+ schedule: ''
+ sg-mode: 'learn'
+ - gate-transparent:
+ schedule: ''
+ sg-mode: 'transparent'
+ - gate-stateful:
+ schedule: ''
+ sg-mode: 'stateful'
+ - gate-minimal-transparent:
+ schedule: ''
+ sg-mode: 'transparent'
+ testplan: '{project}-{topology}-minimal-openstack.txt'
+ - gate-tempest-transparent:
+ schedule: ''
+ sg-mode: 'transparent'
+ testplan: '{project}-{topology}-tempest-openstack.txt'
+
+ openstack:
+ - ocata:
+ openstack-branch: 'stable/ocata'
+ odl-ml2-branch: 'stable/ocata'
+ odl-ml2-driver-version: 'v2'
+ openstack_system_image: 'CentOS 7 - devstack-newton - 20170707-0359'
+ openstack_system2_image: 'CentOS 7 - devstack-newton - 20170707-0359'
+
+ security-group-mode: '{sg-mode}'
+
+- project:
+ name: netvirt-csit-openstack-integration-boron
+ jobs:
+ - '{project}-csit-{topology}-openstack-{openstack}-{functionality}-{stream}'
+
+ project: 'netvirt'
+
+ stream: 'boron'
+ branch: 'stable/boron'
+ jre: 'openjdk8'
+ karaf-version: karaf3
+
+ topology:
+ - 1node:
+ openstack_system_count: 1
+ openstack_system2_count: 2
+ odl_system_count: 1
+ enable-haproxy: 'no'
+ install-features: 'odl-netvirt-openstack'
+ - 3node:
+ openstack_system_count: 1
+ openstack_system2_count: 3
+ odl_system_count: 3
+ enable-haproxy: 'yes'
+ install-features: 'odl-jolokia,odl-netvirt-openstack'
+
+ testplan: '{project}-{topology}-openstack.txt'
+
+ functionality:
+ - upstream-transparent:
+ schedule: ''
+ sg-mode: 'transparent'
+ - upstream-stateful:
+ schedule: ''
+ sg-mode: 'stateful'
+ - upstream-stateful-snat-conntrack:
+ schedule: ''
+ sg-mode: 'stateful'
+ odl-snat-mode: 'conntrack'
+ - upstream-learn:
+ schedule: ''
+ sg-mode: 'learn'
+ - gate-learn:
+ schedule: ''
+ sg-mode: 'learn'
+ - gate-transparent:
+ schedule: ''
+ sg-mode: 'transparent'
+ - gate-stateful:
+ schedule: ''
+ sg-mode: 'stateful'
+ - gate-minimal-transparent:
+ schedule: ''
+ sg-mode: 'transparent'
+ testplan: '{project}-{topology}-minimal-openstack.txt'
+ - gate-tempest-transparent:
+ schedule: ''
+ sg-mode: 'transparent'
+ testplan: '{project}-{topology}-tempest-openstack.txt'
openstack:
- newton:
openstack-branch: 'stable/newton'
odl-ml2-branch: 'stable/newton'
- openstack_system_image: 'CentOS 7 - devstack-newton - 20170808-0528'
- openstack_system2_image: 'CentOS 7 - devstack-newton - 20170808-0528'
- newton-nodl-v2:
openstack-branch: 'stable/newton'
odl-ml2-branch: 'stable/newton'
odl-ml2-driver-version: 'v2'
- openstack_system_image: 'CentOS 7 - devstack-newton - 20170808-0528'
- openstack_system2_image: 'CentOS 7 - devstack-newton - 20170808-0528'
- - ocata:
- openstack-branch: 'stable/ocata'
- odl-ml2-branch: 'stable/ocata'
- odl-ml2-driver-version: 'v2'
- openstack_system_image: 'CentOS 7 - devstack-newton - 20170808-0528'
- openstack_system2_image: 'CentOS 7 - devstack-newton - 20170808-0528'
+
+ openstack_system_image: 'CentOS 7 - devstack-newton - 20170808-0528'
+ openstack_system2_image: 'CentOS 7 - devstack-newton - 20170808-0528'
security-group-mode: '{sg-mode}'
openstack-branch: 'stable/newton'
odl-ml2-branch: 'stable/newton'
odl-ml2-driver-version: 'v2'
- openstack_system_image: 'CentOS 7 - devstack-newton - 20170808-0528'
+
+ openstack_system_image: 'CentOS 7 - devstack-newton - 20170808-0528'
+ openstack_system2_image: 'CentOS 7 - devstack-newton - 20170808-0528'
security-group-mode: 'stateful'