Add discover_hosts.sh script

This adds a simple script to run the
'nova-manage cell_v2 discover_hosts'
command which will be used by
devstack-gate to discover the compute
hosts after devstack is fully setup.

This allows us to manage the branches
where this can run from devstack rather
than require branch logic in devstack-gate.

Change-Id: Icc595d60de373471aa7ee8fb9f3a81fc12d80438
Depends-On: I4823737246a8e9cc4eaebf67ff6bdba8bf42ab29
This commit is contained in:
Matt Riedemann 2017-01-20 09:01:49 -05:00 committed by Dan Smith
parent adcf0c50cd
commit 5713497aa5
1 changed files with 18 additions and 0 deletions

18
tools/discover_hosts.sh Executable file
View File

@ -0,0 +1,18 @@
#!/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.
nova-manage cell_v2 discover_hosts --verbose