[devstack] Restart nova compute before checking hypervisor stats

Nova compute may fail if it was unable to fetch nodes list from Ironic
during startup. This change makes sure we restart it.

Change-Id: Ibddd34faa0eeb9b42fe0e8d73f14907b1df11734
Closes-Bug: #1537076
This commit is contained in:
Dmitry Tantsur 2016-01-27 17:10:58 +01:00
parent 6f906319cb
commit fde62528af

View File

@ -703,6 +703,11 @@ function enroll_nodes {
nova flavor-key baremetal set "cpu_arch"="$ironic_node_arch"
if [ "$VIRT_DRIVER" == "ironic" ]; then
# NOTE(dtantsur): sometimes nova compute fails to start with ironic due
# to keystone restarting and not being able to authenticate us.
# Restart it just to be sure (and avoid gate problems like bug 1537076)
stop_nova_compute
start_nova_compute
wait_for_nova_resources "count" $total_nodes
wait_for_nova_resources "vcpus" $total_cpus
fi