blob: 4ec6a405113115d9558343bddd013b44d41fa8ee [file] [log] [blame]
Matt Riedemann57134972017-01-20 09:01:49 -05001#!/usr/bin/env bash
2
3# **discover_hosts.sh**
4
5# This is just a very simple script to run the
6# "nova-manage cell_v2 discover_hosts" command
7# which is needed to discover compute nodes and
8# register them with a parent cell in Nova.
9# This assumes that /etc/nova/nova.conf exists
10# and has the following entries filled in:
11#
12# [api_database]
13# connection = This is the URL to the nova_api database
14#
15# In other words this should be run on the primary
16# (API) node in a multi-node setup.
17
Mehdi Abaakouk5c6aa562017-01-26 11:31:58 +010018if [[ -x $(which nova-manage) ]]; then
19 nova-manage cell_v2 discover_hosts --verbose
20fi