devstack/tools/discover_hosts.sh
Mehdi Abaakouk 5c6aa56e11 Don't assume nova-manage is present
tools/discover_hosts.sh is run by devstack-gate, and breaks all dsvm job
that doesn't use nova.

nova-manage is perhaps not installed if nova services are not enabled.

This change checks the presence of nova-.

Change-Id: Ic555d241f98d0fa027897c69a7115d1be88f6c96
2017-01-26 16:21:54 +01:00

21 lines
578 B
Bash
Executable File

#!/usr/bin/env bash
# **discover_hosts.sh**
# This is just a very simple script to run the
# "nova-manage cell_v2 discover_hosts" command
# which is needed to discover compute nodes and
# register them with a parent cell in Nova.
# This assumes that /etc/nova/nova.conf exists
# and has the following entries filled in:
#
# [api_database]
# connection = This is the URL to the nova_api database
#
# In other words this should be run on the primary
# (API) node in a multi-node setup.
if [[ -x $(which nova-manage) ]]; then
nova-manage cell_v2 discover_hosts --verbose
fi