From 2890d8db67012d7c33c40a1e36a66766740b8f8f Mon Sep 17 00:00:00 2001 From: Matt Riedemann Date: Tue, 23 Jan 2018 15:30:47 -0500 Subject: [PATCH] Expand on when you might want to set --max-count for map_instances The default behavior for the "nova-manage cell_v2 map_instances" command is to map all instances in the cell in batches of 50. This can be slow when there are several thousand instances in the deployment and an operator may want to specify a higher --max-count value and run the command until it completes. This simply updates the command option description and man page to point this out for consideration. Change-Id: I59c2ed89fe02212977445f6825c6da8fedbb8ccf Related-Bug: #1742649 --- doc/source/cli/nova-manage.rst | 4 ++++ nova/cmd/manage.py | 5 ++++- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/doc/source/cli/nova-manage.rst b/doc/source/cli/nova-manage.rst index c364ba2f9189..39dc3105277f 100644 --- a/doc/source/cli/nova-manage.rst +++ b/doc/source/cli/nova-manage.rst @@ -152,6 +152,10 @@ Nova Cells v2 instances have been mapped, and 1 if there are still instances to be mapped. + If ``--max-count`` is not specified, all instances in the cell will be + mapped in batches of 50. If you have a large number of instances, consider + specifying a custom value and run the command until it exits with 0. + ``nova-manage cell_v2 map_cell_and_hosts [--name ] [--transport-url ] [--verbose]`` Create a cell mapping to the database connection and message queue diff --git a/nova/cmd/manage.py b/nova/cmd/manage.py index f7f945b64ae3..330cef307b69 100644 --- a/nova/cmd/manage.py +++ b/nova/cmd/manage.py @@ -1073,7 +1073,10 @@ class CellV2Commands(object): help='Unmigrated instances will be mapped to the cell with the ' 'uuid provided.') @args('--max-count', metavar='', dest='max_count', - help='Maximum number of instances to map') + help='Maximum number of instances to map. If not set, all instances ' + 'in the cell will be mapped in batches of 50. If you have a ' + 'large number of instances, consider specifying a custom value ' + 'and run the command until it exits with 0.') def map_instances(self, cell_uuid, max_count=None): """Map instances into the provided cell.