PYTHON="${ROBOT_VENV}/bin/python"
SSH="ssh -t -t"
ADMIN_PASSWORD="admin"
+OPENSTACK_MASTER_CLIENTS_VERSION="pike"
# TODO: remove this work to run changes.py if/when it's moved higher up to be visible at the Robot level
echo "showing recent changes that made it in to the distribution used by this job"
cat ${WORKSPACE}/hosts_file
} # create_etc_hosts()
+#function to install Openstack Clients for Testing
+#This will pull the latest versions compatiable with the
+# openstack release
+function install_openstack_clients_in_robot_vm() {
+ packages=("python-novaclient" "python-neutronclient" "python-openstackclient")
+ for plugin_name in ${ENABLE_OS_PLUGINS}; do
+ if [ "$plugin_name" == "networking-sfc" ]; then
+ packages+=("networking-sfc")
+ fi
+ done
+ openstack_version=$(echo ${OPENSTACK_BRANCH} | cut -d/ -f2)
+ #If the job tests "master", we will use the clients from previous released stable version to avoid failures
+ if [ "${openstack_version}" == "master" ]; then
+ openstack_version=${OPENSTACK_MASTER_CLIENTS_VERSION}
+ fi
+ for package in ${packages[*]}; do
+ echo "Get the current support version of the package ${package}"
+ wget https://raw.githubusercontent.com/openstack/requirements/stable/${openstack_version}/upper-constraints.txt -O /tmp/constraints.txt 2>/dev/null
+ echo "$PYTHON -m pip install --upgrade --no-deps ${package} --no-cache-dir -c /tmp/constraints.txt"
+ $PYTHON -m pip install --upgrade --no-deps ${package} --no-cache-dir -c /tmp/constraints.txt
+ echo "$PYTHON -m pip install ${package} --no-cache-dir -c /tmp/constraints.txt"
+ $PYTHON -m pip install ${package} --no-cache-dir -c /tmp/constraints.txt
+ done
+
+ if [ "${ENABLE_NETWORKING_L2GW}" == "yes" ]; then
+ #networking-l2gw is not officially available in any release yet. Gettting the latest stable version.
+ $PYTHON -m pip install networking-l2gw
+ fi
+}
+
+
+
# convert commas in csv strings to spaces (ssv)
function csv2ssv() {
local csv=$1
ODL_MODE=manual
ODL_MGR_IP=${MGRIP}
-ODL_PORT=8080
+ODL_PORT=${ODL_PORT}
ODL_PORT_BINDING_CONTROLLER=${ODL_ML2_PORT_BINDING}
ODL_OVS_MANAGERS=${ODL_OVS_MANAGERS}
physical_network_mtus = ${PUBLIC_PHYSICAL_NETWORK}:1400
path_mtu = 1458
-# workaround for port-status not working due to https://bugs.opendaylight.org/show_bug.cgi?id=9092
-[ml2_odl]
-odl_features=nothing
-
[[post-config|/etc/neutron/dhcp_agent.ini]]
[DEFAULT]
force_metadata = True
ODL_MODE=manual
ODL_MGR_IP=${MGRIP}
-ODL_PORT=8080
+ODL_PORT=${ODL_PORT}
ODL_PORT_BINDING_CONTROLLER=${ODL_ML2_PORT_BINDING}
ODL_OVS_MANAGERS=${ODL_OVS_MANAGERS}
echo -e "/usr/sbin/lsmod | /usr/bin/grep openvswitch\n"
/usr/sbin/lsmod | /usr/bin/grep openvswitch
echo -e "\ngrep ct_ /var/log/openvswitch/ovs-vswitchd.log\n"
-grep ct_ /var/log/openvswitch/ovs-vswitchd.log
-echo -e "\novsdb-tool -mm show-log\n"
-ovsdb-tool -mm show-log
+grep "Datapath supports" /var/log/openvswitch/ovs-vswitchd.log
echo -e "\nsudo netstat -punta\n"
sudo netstat -punta
echo -e "\nsudo getenforce\n"
sudo getenforce
-echo -e "\njournalctl > /tmp/journalctl.log\n"
-sudo journalctl > /tmp/journalctl.log
echo -e "\nsudo systemctl status httpd\n"
sudo systemctl status httpd
echo -e "\nenv\n"
source /opt/stack/devstack/openrc admin admin
echo -e "\nenv after openrc\n"
env
-echo "\nsudo du -hs /opt/stack"
+echo -e "\nsudo du -hs /opt/stack"
sudo du -hs /opt/stack
-echo "\nsudo mount"
+echo -e "\nsudo mount"
sudo mount
+echo -e "\ndmesg -T > /tmp/dmesg.log"
+dmesg -T > /tmp/dmesg.log
+echo -e "\njournalctl > /tmp/journalctl.log\n"
+sudo journalctl > /tmp/journalctl.log
+echo -e "\novsdb-tool -mm show-log > /tmp/ovsdb-tool.log"
+ovsdb-tool -mm show-log > /tmp/ovsdb-tool.log
EOF
# Since this log collection work is happening before the archive build macro which also
# archives build step will essentially be a noop.
mkdir -p ${WORKSPACE}/archives
+ mv /tmp/changes.txt ${WORKSPACE}/archives
+
sleep 5
# FIXME: Do not create .tar and gzip before copying.
for i in `seq 1 ${NUM_ODL_SYSTEM}`; do
echo "collect_logs: for openstack control node ip: ${!OSIP}"
NODE_FOLDER="control_${i}"
mkdir -p ${NODE_FOLDER}
+ scp extra_debug.sh ${!OSIP}:/tmp
+ ${SSH} ${!OSIP} "bash /tmp/extra_debug.sh > /tmp/extra_debug.log"
scp ${!OSIP}:/etc/dnsmasq.conf ${NODE_FOLDER}
scp ${!OSIP}:/etc/keystone/keystone.conf ${NODE_FOLDER}
scp ${!OSIP}:/etc/keystone/keystone-uwsgi-admin.ini ${NODE_FOLDER}
scp ${!OSIP}:/opt/stack/devstack/openrc ${NODE_FOLDER}
scp ${!OSIP}:/opt/stack/requirements/upper-constraints.txt ${NODE_FOLDER}
scp ${!OSIP}:/opt/stack/tempest/etc/tempest.conf ${NODE_FOLDER}
+ scp ${!OSIP}:/tmp/*.xz ${NODE_FOLDER}
+ scp ${!OSIP}:/tmp/dmesg.log ${NODE_FOLDER}
+ scp ${!OSIP}:/tmp/extra_debug.log ${NODE_FOLDER}
scp ${!OSIP}:/tmp/get_devstack.sh.txt ${NODE_FOLDER}
+ scp ${!OSIP}:/tmp/journalctl.log ${NODE_FOLDER}
+ scp ${!OSIP}:/tmp/ovsdb-tool.log ${NODE_FOLDER}
scp ${!OSIP}:/var/log/openvswitch/ovs-vswitchd.log ${NODE_FOLDER}
scp ${!OSIP}:/var/log/openvswitch/ovsdb-server.log ${NODE_FOLDER}
list_files "${!OSIP}" "${NODE_FOLDER}"
rsync --rsync-path="sudo rsync" -avhe ssh ${!OSIP}:/var/log/messages ${NODE_FOLDER}
rsync --rsync-path="sudo rsync" -avhe ssh ${!OSIP}:/var/log/rabbitmq ${NODE_FOLDER}
rsync -avhe ssh ${!OSIP}:/opt/stack/logs/* ${NODE_FOLDER} # rsync to prevent copying of symbolic links
- scp extra_debug.sh ${!OSIP}:/tmp
- ${SSH} ${!OSIP} "bash /tmp/extra_debug.sh > /tmp/extra_debug.log"
- scp ${!OSIP}:/tmp/extra_debug.log ${NODE_FOLDER}
- scp ${!OSIP}:/tmp/journalctl.log ${NODE_FOLDER}
- scp ${!OSIP}:/tmp/*.xz ${NODE_FOLDER}
- ${SSH} ${!CONTROLLERIP} "dmesg -T > /tmp/dmesg.log"
- scp ${!CONTROLLERIP}:/tmp/dmesg.log ${NODE_FOLDER}
mv local.conf_control_${!OSIP} ${NODE_FOLDER}/local.conf
+ # qdhcp files are created by robot tests
mv /tmp/qdhcp ${NODE_FOLDER}
mv ${NODE_FOLDER} ${WORKSPACE}/archives/
done
echo "collect_logs: for openstack compute node ip: ${!OSIP}"
NODE_FOLDER="compute_${i}"
mkdir -p ${NODE_FOLDER}
+ scp extra_debug.sh ${!OSIP}:/tmp
+ ${SSH} ${!OSIP} "bash /tmp/extra_debug.sh > /tmp/extra_debug.log"
scp ${!OSIP}:/etc/nova/nova.conf ${NODE_FOLDER}
scp ${!OSIP}:/etc/nova/nova-cpu.conf ${NODE_FOLDER}
scp ${!OSIP}:/etc/openstack/clouds.yaml ${NODE_FOLDER}
scp ${!OSIP}:/opt/stack/devstack/nohup.out ${NODE_FOLDER}/stack.log
scp ${!OSIP}:/opt/stack/devstack/openrc ${NODE_FOLDER}
scp ${!OSIP}:/opt/stack/requirements/upper-constraints.txt ${NODE_FOLDER}
+ scp ${!OSIP}:/tmp/*.xz ${NODE_FOLDER}/
+ scp ${!OSIP}:/tmp/dmesg.log ${NODE_FOLDER}
+ scp ${!OSIP}:/tmp/extra_debug.log ${NODE_FOLDER}
scp ${!OSIP}:/tmp/get_devstack.sh.txt ${NODE_FOLDER}
+ scp ${!OSIP}:/tmp/journalctl.log ${NODE_FOLDER}
+ scp ${!OSIP}:/tmp/ovsdb-tool.log ${NODE_FOLDER}
scp ${!OSIP}:/var/log/openvswitch/ovs-vswitchd.log ${NODE_FOLDER}
scp ${!OSIP}:/var/log/openvswitch/ovsdb-server.log ${NODE_FOLDER}
list_files "${!OSIP}" "${NODE_FOLDER}"
rsync --rsync-path="sudo rsync" -avhe ssh ${!OSIP}:/var/log/messages ${NODE_FOLDER}
rsync --rsync-path="sudo rsync" -avhe ssh ${!OSIP}:/var/log/nova-agent.log ${NODE_FOLDER}
rsync -avhe ssh ${!OSIP}:/opt/stack/logs/* ${NODE_FOLDER} # rsync to prevent copying of symbolic links
- scp extra_debug.sh ${!OSIP}:/tmp
- ${SSH} ${!OSIP} "bash /tmp/extra_debug.sh > /tmp/extra_debug.log"
- scp ${!OSIP}:/tmp/extra_debug.log ${NODE_FOLDER}
- scp ${!OSIP}:/tmp/journalctl.log ${NODE_FOLDER}
- scp ${!OSIP}:/tmp/*.xz ${NODE_FOLDER}/
- ${SSH} ${!OSIP} "dmesg -T > /tmp/dmesg.log"
- scp ${!OSIP}:/tmp/dmesg.log ${NODE_FOLDER}
mv local.conf_compute_${!OSIP} ${NODE_FOLDER}/local.conf
mv ${NODE_FOLDER} ${WORKSPACE}/archives/
done
fi
RECLONE=False
+ODL_PORT=8181
# Always compare the lists below against the devstack upstream ENABLED_SERVICES in
# https://github.com/openstack-dev/devstack/blob/master/stackrc#L52
for i in `seq 1 ${NUM_OPENSTACK_CONTROL_NODES}`; do
CONTROLIP=OPENSTACK_CONTROL_NODE_${i}_IP
- echo "Configure the stack of the control node ${i} of ${NUM_OPENSTACK_CONTROL_NODES}: ${CONTROLIP}"
+ echo "Configure the stack of the control node ${i} of ${NUM_OPENSTACK_CONTROL_NODES}: ${!CONTROLIP}"
scp ${WORKSPACE}/disable_firewall.sh ${!CONTROLIP}:/tmp
${SSH} ${!CONTROLIP} "sudo bash /tmp/disable_firewall.sh"
create_etc_hosts ${!CONTROLIP}
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
- echo "Configure the stack of the compute node ${i} of ${NUM_OPENSTACK_COMPUTE_NODES}: ${COMPUTEIP}"
+ echo "Configure the stack of the compute node ${i} of ${NUM_OPENSTACK_COMPUTE_NODES}: ${!COMPUTEIP}"
scp ${WORKSPACE}/disable_firewall.sh "${!COMPUTEIP}:/tmp"
${SSH} "${!COMPUTEIP}" "sudo bash /tmp/disable_firewall.sh"
create_etc_hosts ${!COMPUTEIP} ${!CONTROLIP}
SUITES=${newsuites}
fi
+#install all client versions required for this job testing
+install_openstack_clients_in_robot_vm
+
# TODO: run openrc on control node and then scrape the vars from it
# Environment Variables Needed to execute Openstack Client for NetVirt Jobs
cat > /tmp/os_netvirt_client_rc << EOF
source /tmp/os_netvirt_client_rc
+echo "Get all versions before executing pybot"
+echo "openstack --version"
+which openstack
+openstack --version
+echo "nova --version"
+which nova
+nova --version
+echo "neutron --version"
+which neutron
+neutron --version
+
echo "Starting Robot test suites ${SUITES} ..."
# please add pybot -v arguments on a single line and alphabetized
suite_num=0