From 3eb4d1fd1d94dc830f7e3420c49117e01df6451a Mon Sep 17 00:00:00 2001 From: Andrew Laski Date: Tue, 30 Aug 2016 10:39:04 -0400 Subject: [PATCH] Add a TODO and add info to a releasenote This updates the release notes for the new cellsv2 discover_hosts command to be clear that it should be run at the API level. And adds a TODO to provide a better error message if that is not done. Change-Id: I51f113c2c445a9806675a9ee66f883d2b7f4f8f0 --- nova/cmd/manage.py | 4 ++++ .../notes/cells-discover-hosts-06a3079ba687e092.yaml | 9 ++++++--- 2 files changed, 10 insertions(+), 3 deletions(-) diff --git a/nova/cmd/manage.py b/nova/cmd/manage.py index 54afea53fd..9c0c791ec2 100644 --- a/nova/cmd/manage.py +++ b/nova/cmd/manage.py @@ -1491,6 +1491,10 @@ class CellV2Commands(object): """ ctxt = context.RequestContext() + # TODO(alaski): If this is not run on a host configured to use the API + # database most of the lookups below will fail and may not provide a + # great error message. Add a check which will raise a useful error + # message about running this from an API host. if cell_uuid: cell_mappings = [objects.CellMapping.get_by_uuid(ctxt, cell_uuid)] else: diff --git a/releasenotes/notes/cells-discover-hosts-06a3079ba687e092.yaml b/releasenotes/notes/cells-discover-hosts-06a3079ba687e092.yaml index 1b602d7c4f..12d8b292ef 100644 --- a/releasenotes/notes/cells-discover-hosts-06a3079ba687e092.yaml +++ b/releasenotes/notes/cells-discover-hosts-06a3079ba687e092.yaml @@ -6,14 +6,17 @@ features: then anytime a new host is added to a cell this new "nova-manage cell_v2 discover_hosts" needs to be run before instances can be booted on that host. If multiple hosts are added at one time the command - only needs to be run one time to discover all of them. + only needs to be run one time to discover all of them. This command should + be run from an API host, or a host that is configured to use the nova_api + database. Please note that adding a host to a cell and not running this command could lead to build failures/reschedules if that host is selected by the scheduler. The discover_hosts command is necessary to route requests to the host but is not necessary in order for the scheduler to be aware of the - host. In order to avoid that it is advised that new compute hosts are - disabled until the discover command has been run. + host. It is advised that nova-compute hosts are configured with + "enable_new_services=False" in order to avoid failures before the hosts + have been discovered. issues: - If a deployer has updated their deployment to using cellsv2 using either the simple_cell_setup or the map_cell0/map_cell_and_hosts/map_instances