2017-01-20 09:01:49 -05:00
|
|
|
#!/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.
|
|
|
|
|
2017-01-26 11:31:58 +01:00
|
|
|
if [[ -x $(which nova-manage) ]]; then
|
|
|
|
nova-manage cell_v2 discover_hosts --verbose
|
|
|
|
fi
|