Matt Riedemann | 5713497 | 2017-01-20 09:01:49 -0500 | [diff] [blame] | 1 | #!/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 Abaakouk | 5c6aa56 | 2017-01-26 11:31:58 +0100 | [diff] [blame] | 18 | if [[ -x $(which nova-manage) ]]; then |
| 19 | nova-manage cell_v2 discover_hosts --verbose |
| 20 | fi |