From 0ec6a9dc2fed7c1fa1cb5b4aa863172c1fb4cba4 Mon Sep 17 00:00:00 2001 From: Alon Kochba Date: Mon, 26 Dec 2016 16:37:41 +0200 Subject: [PATCH] Add verification of number of hypervisors to netvirt loading Change-Id: Idd9ea821c086b269ea81c8a88db16122604d27eb Signed-off-by: Alon Kochba --- .../include-raw-integration-deploy-openstack-run-test.sh | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/jjb/integration/include-raw-integration-deploy-openstack-run-test.sh b/jjb/integration/include-raw-integration-deploy-openstack-run-test.sh index b795d0515..38c520b15 100644 --- a/jjb/integration/include-raw-integration-deploy-openstack-run-test.sh +++ b/jjb/integration/include-raw-integration-deploy-openstack-run-test.sh @@ -521,6 +521,13 @@ ${SSH} ${OPENSTACK_CONTROL_NODE_IP} "sudo bash /tmp/disable_firewall.sh" echo "sleep for a minute and print hypervisor-list" sleep 60 ${SSH} ${OPENSTACK_CONTROL_NODE_IP} "cd /opt/stack/devstack; source openrc admin admin; nova hypervisor-list" +expected_num_hypervisors=$((NUM_OPENSTACK_SYSTEM - 1)) +num_hypervisors=$(${SSH} ${OPENSTACK_CONTROL_NODE_IP} "cd /opt/stack/devstack; source openrc admin admin; openstack hypervisor list -f value | wc -l" | tail -1 | tr -d "\r") +if ! [ "${num_hypervisors}" ] || ! [ ${num_hypervisors} -eq ${expected_num_hypervisors} ]; then + echo "Error: Only $num_hypervisors hypervisors detected, expected $expected_num_hypervisors" + collect_logs_and_exit + exit 1 +fi #Need to disable firewalld and iptables in compute nodes as well for i in `seq 1 $((NUM_OPENSTACK_SYSTEM - 1))` -- 2.36.6