.\" Man page generated from reStructuredText. . .TH "NOVA-MANAGE" "1" "Jan 24, 2023" "" "nova" .SH NAME nova-manage \- Management tool for the OpenStack Compute services. . .nr rst2man-indent-level 0 . .de1 rstReportMargin \\$1 \\n[an-margin] level \\n[rst2man-indent-level] level margin: \\n[rst2man-indent\\n[rst2man-indent-level]] - \\n[rst2man-indent0] \\n[rst2man-indent1] \\n[rst2man-indent2] .. .de1 INDENT .\" .rstReportMargin pre: . RS \\$1 . nr rst2man-indent\\n[rst2man-indent-level] \\n[an-margin] . nr rst2man-indent-level +1 .\" .rstReportMargin post: .. .de UNINDENT . RE .\" indent \\n[an-margin] .\" old: \\n[rst2man-indent\\n[rst2man-indent-level]] .nr rst2man-indent-level -1 .\" new: \\n[rst2man-indent\\n[rst2man-indent-level]] .in \\n[rst2man-indent\\n[rst2man-indent-level]]u .. .SH SYNOPSIS .INDENT 0.0 .INDENT 3.5 .sp .nf .ft C nova\-manage [ [...]] .ft P .fi .UNINDENT .UNINDENT .SH DESCRIPTION .sp \fBnova\-manage\fP controls cloud computing instances by managing various admin\-only aspects of Nova. .sp The standard pattern for executing a \fBnova\-manage\fP command is: .INDENT 0.0 .INDENT 3.5 .sp .nf .ft C nova\-manage [] .ft P .fi .UNINDENT .UNINDENT .sp Run without arguments to see a list of available command categories: .INDENT 0.0 .INDENT 3.5 .sp .nf .ft C nova\-manage .ft P .fi .UNINDENT .UNINDENT .sp You can also run with a category argument such as \fBdb\fP to see a list of all commands in that category: .INDENT 0.0 .INDENT 3.5 .sp .nf .ft C nova\-manage db .ft P .fi .UNINDENT .UNINDENT .sp These sections describe the available categories and arguments for \fBnova\-manage\fP\&. .SH OPTIONS .sp These options apply to all commands and may be given in any order, before or after commands. Individual commands may provide additional options. Options without an argument can be combined after a single dash. .INDENT 0.0 .TP .B \-h, \-\-help Show a help message and exit .UNINDENT .INDENT 0.0 .TP .B \-\-config\-dir DIR Path to a config directory to pull \fB*.conf\fP files from. This file set is sorted, so as to provide a predictable parse order if individual options are over\-ridden. The set is parsed after the file(s) specified via previous \fI\%\-\-config\-file\fP, arguments hence over\-ridden options in the directory take precedence. This option must be set from the command\-line. .UNINDENT .INDENT 0.0 .TP .B \-\-config\-file PATH Path to a config file to use. Multiple config files can be specified, with values in later files taking precedence. Defaults to None. This option must be set from the command\-line. .UNINDENT .INDENT 0.0 .TP .B \-\-debug, \-d If set to true, the logging level will be set to DEBUG instead of the default INFO level. .UNINDENT .INDENT 0.0 .TP .B \-\-log\-config\-append PATH, \-\-log\-config PATH, \-\-log_config PATH The name of a logging configuration file. This file is appended to any existing logging configuration files. For details about logging configuration files, see the Python logging module documentation. Note that when logging configuration files are used then all logging configuration is set in the configuration file and other logging configuration options are ignored (for example, \fI\%\-\-log\-date\-format\fP). .UNINDENT .INDENT 0.0 .TP .B \-\-log\-date\-format DATE_FORMAT Defines the format string for \fB%(asctime)s\fP in log records. Default: None. This option is ignored if \fI\%\-\-log\-config\-append\fP is set. .UNINDENT .INDENT 0.0 .TP .B \-\-log\-dir LOG_DIR, \-\-logdir LOG_DIR (Optional) The base directory used for relative log_file paths. This option is ignored if \fI\%\-\-log\-config\-append\fP is set. .UNINDENT .INDENT 0.0 .TP .B \-\-log\-file PATH, \-\-logfile PATH (Optional) Name of log file to send logging output to. If no default is set, logging will go to stderr as defined by use_stderr. This option is ignored if \fI\%\-\-log\-config\-append\fP is set. .UNINDENT .INDENT 0.0 .TP .B \-\-nodebug The inverse of \fI\%\-\-debug\fP\&. .UNINDENT .INDENT 0.0 .TP .B \-\-nopost\-mortem The inverse of \fI\%\-\-post\-mortem\fP\&. .UNINDENT .INDENT 0.0 .TP .B \-\-nouse\-journal The inverse of \fI\%\-\-use\-journal\fP\&. .UNINDENT .INDENT 0.0 .TP .B \-\-nouse\-json The inverse of \fI\%\-\-use\-json\fP\&. .UNINDENT .INDENT 0.0 .TP .B \-\-nouse\-syslog The inverse of \fI\%\-\-use\-syslog\fP\&. .UNINDENT .INDENT 0.0 .TP .B \-\-nowatch\-log\-file The inverse of \fI\%\-\-watch\-log\-file\fP\&. .UNINDENT .INDENT 0.0 .TP .B \-\-post\-mortem Allow post\-mortem debugging .UNINDENT .INDENT 0.0 .TP .B \-\-syslog\-log\-facility SYSLOG_LOG_FACILITY Syslog facility to receive log lines. This option is ignored if \fI\%\-\-log\-config\-append\fP is set. .UNINDENT .INDENT 0.0 .TP .B \-\-use\-journal Enable journald for logging. If running in a systemd environment you may wish to enable journal support. Doing so will use the journal native protocol which includes structured metadata in addition to log messages. This option is ignored if \fI\%\-\-log\-config\-append\fP is set. .UNINDENT .INDENT 0.0 .TP .B \-\-use\-json Use JSON formatting for logging. This option is ignored if \fI\%\-\-log\-config\-append\fP is set. .UNINDENT .INDENT 0.0 .TP .B \-\-use\-syslog Use syslog for logging. Existing syslog format is DEPRECATED and will be changed later to honor RFC5424. This option is ignored if \fI\%\-\-log\-config\-append\fP is set. .UNINDENT .INDENT 0.0 .TP .B \-\-version Show program\(aqs version number and exit .UNINDENT .INDENT 0.0 .TP .B \-\-watch\-log\-file Uses logging handler designed to watch file system. When log file is moved or removed this handler will open a new log file with specified path instantaneously. It makes sense only if \fI\%\-\-log\-file\fP option is specified and Linux platform is used. This option is ignored if \fI\%\-\-log\-config\-append\fP is set. .UNINDENT .SH COMMANDS .SS Nova Database .INDENT 0.0 .TP .B \fBnova\-manage db version\fP Print the current main database version. .TP .B \fBnova\-manage db sync [\-\-local_cell] [VERSION]\fP Upgrade the main database schema up to the most recent version or \fBVERSION\fP if specified. By default, this command will also attempt to upgrade the schema for the cell0 database if it is mapped (see the \fBmap_cell0\fP or \fBsimple_cell_setup\fP commands for more details on mapping the cell0 database). If \fB\-\-local_cell\fP is specified, then only the main database in the current cell is upgraded. The local database connection is determined by \fBdatabase.connection\fP in the configuration file, passed to nova\-manage using the \fB\-\-config\-file\fP option(s). This command should be run after \fBnova\-manage api_db sync\fP\&. .sp Returns exit code 0 if the database schema was synced successfully, or 1 if cell0 cannot be accessed. .TP .B \fBnova\-manage db archive_deleted_rows [\-\-max_rows ] [\-\-verbose] [\-\-until\-complete] [\-\-before ] [\-\-purge] [\-\-all\-cells]\fP Move deleted rows from production tables to shadow tables. Note that the corresponding rows in the \fBinstance_mappings\fP, \fBrequest_specs\fP and \fBinstance_group_member\fP tables of the API database are purged when instance records are archived and thus, \fBapi_database.connection\fP is required in the config file. Specifying \fB\-\-verbose\fP will print the results of the archive operation for any tables that were changed. Specifying \fB\-\-until\-complete\fP will make the command run continuously until all deleted rows are archived. Use the \fB\-\-max_rows\fP option, which defaults to 1000, as a batch size for each iteration (note that the purged API database table records are not included in this batch size). Specifying \fB\-\-before\fP will archive only instances that were deleted before the \fI\%date\fP provided, and records in other tables related to those instances. Specifying \fB\-\-purge\fP will cause a \fIfull\fP DB purge to be completed after archival. If a date range is desired for the purge, then run \fBnova\-manage db purge \-\-before \fP manually after archiving is complete. Specifying \fB\-\-all\-cells\fP will cause the process to run against all cell databases. .sp \fBReturn Codes\fP .TS center; |l|l|. _ T{ Return code T} T{ Description T} _ T{ 0 T} T{ Nothing was archived. T} _ T{ 1 T} T{ Some number of rows were archived. T} _ T{ 2 T} T{ Invalid value for \fB\-\-max_rows\fP\&. T} _ T{ 3 T} T{ No connection to the API database could be established using \fBapi_database.connection\fP\&. T} _ T{ 4 T} T{ Invalid value for \fB\-\-before\fP\&. T} _ T{ 255 T} T{ An unexpected error occurred. T} _ .TE .sp If automating, this should be run continuously while the result is 1, stopping at 0, or use the \fB\-\-until\-complete\fP option. .TP .B \fBnova\-manage db purge [\-\-all] [\-\-before ] [\-\-verbose] [\-\-all\-cells]\fP Delete rows from shadow tables. Specifying \fB\-\-all\fP will delete all data from all shadow tables. Specifying \fB\-\-before\fP will delete data from all shadow tables that is older than the \fI\%date\fP provided. Specifying \fB\-\-verbose\fP will cause information to be printed about purged records. Specifying \fB\-\-all\-cells\fP will cause the purge to be applied against all cell databases. For \fB\-\-all\-cells\fP to work, the api database connection information must be configured. Returns exit code 0 if rows were deleted, 1 if required arguments are not provided, 2 if an invalid date is provided, 3 if no data was deleted, 4 if the list of cells cannot be obtained. .TP .B \fBnova\-manage db null_instance_uuid_scan [\-\-delete]\fP Lists and optionally deletes database records where instance_uuid is NULL. .TP .B \fBnova\-manage db online_data_migrations [\-\-max\-count]\fP Perform data migration to update all live data. .sp \fB\-\-max\-count\fP controls the maximum number of objects to migrate in a given call. If not specified, migration will occur in batches of 50 until fully complete. .sp Returns exit code 0 if no (further) updates are possible, 1 if the \fB\-\-max\-count\fP option was used and some updates were completed successfully (even if others generated errors), 2 if some updates generated errors and no other migrations were able to take effect in the last batch attempted, or 127 if invalid input is provided (e.g. non\-numeric max\-count). .sp This command should be called after upgrading database schema and nova services on all controller nodes. If it exits with partial updates (exit status 1) it should be called again, even if some updates initially generated errors, because some updates may depend on others having completed. If it exits with status 2, intervention is required to resolve the issue causing remaining updates to fail. It should be considered successfully completed only when the exit status is 0. .sp For example: .INDENT 7.0 .INDENT 3.5 .sp .nf .ft C $ nova\-manage db online_data_migrations Running batches of 50 until complete 2 rows matched query migrate_instances_add_request_spec, 0 migrated 2 rows matched query populate_queued_for_delete, 2 migrated +\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-+\-\-\-\-\-\-\-\-\-\-\-\-\-\-+\-\-\-\-\-\-\-\-\-\-\-+ | Migration | Total Needed | Completed | +\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-+\-\-\-\-\-\-\-\-\-\-\-\-\-\-+\-\-\-\-\-\-\-\-\-\-\-+ | create_incomplete_consumers | 0 | 0 | | migrate_instances_add_request_spec | 2 | 0 | | migrate_quota_classes_to_api_db | 0 | 0 | | migrate_quota_limits_to_api_db | 0 | 0 | | migration_migrate_to_uuid | 0 | 0 | | populate_missing_availability_zones | 0 | 0 | | populate_queued_for_delete | 2 | 2 | | populate_uuids | 0 | 0 | +\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-+\-\-\-\-\-\-\-\-\-\-\-\-\-\-+\-\-\-\-\-\-\-\-\-\-\-+ .ft P .fi .UNINDENT .UNINDENT .sp In the above example, the \fBmigrate_instances_add_request_spec\fP migration found two candidate records but did not need to perform any kind of data migration for either of them. In the case of the \fBpopulate_queued_for_delete\fP migration, two candidate records were found which did require a data migration. Since \fB\-\-max\-count\fP defaults to 50 and only two records were migrated with no more candidates remaining, the command completed successfully with exit code 0. .TP .B \fBnova\-manage db ironic_flavor_migration [\-\-all] [\-\-host] [\-\-node] [\-\-resource_class]\fP Perform the ironic flavor migration process against the database while services are offline. This is \fInot recommended\fP for most people. The ironic compute driver will do this online and as necessary if run normally. This routine is provided only for advanced users that may be skipping the 16.0.0 Pike release, never able to run services normally at the Pike level. Since this utility is for use when all services (including ironic) are down, you must pass the resource class set on your node(s) with the \fB\-\-resource_class\fP parameter. .sp To migrate a specific host and node, provide the hostname and node uuid with \fB\-\-host $hostname \-\-node $uuid\fP\&. To migrate all instances on nodes managed by a single host, provide only \fB\-\-host\fP\&. To iterate over all nodes in the system in a single pass, use \fB\-\-all\fP\&. Note that this process is not lightweight, so it should not be run frequently without cause, although it is not harmful to do so. If you have multiple cellsv2 cells, you should run this once per cell with the corresponding cell config for each (i.e. this does not iterate cells automatically). .sp Note that this is not recommended unless you need to run this specific data migration offline, and it should be used with care as the work done is non\-trivial. Running smaller and more targeted batches (such as specific nodes) is recommended. .UNINDENT .INDENT 0.0 .TP .B \fB\-\-before \fP The date argument accepted by the \fB\-\-before\fP option can be in any of several formats, including \fBYYYY\-MM\-DD [HH:mm[:ss]]\fP and the default format produced by the \fBdate\fP command, e.g. \fBFri May 24 09:20:11 CDT 2019\fP\&. Date strings containing spaces must be quoted appropriately. Some examples: .INDENT 7.0 .INDENT 3.5 .sp .nf .ft C # Purge shadow table rows older than a specific date nova\-manage db purge \-\-before 2015\-10\-21 # or nova\-manage db purge \-\-before "Oct 21 2015" # Times are also accepted nova\-manage db purge \-\-before "2015\-10\-21 12:00" .ft P .fi .UNINDENT .UNINDENT .sp Note that relative dates (such as \fByesterday\fP) are not supported natively. The \fBdate\fP command can be helpful here: .INDENT 7.0 .INDENT 3.5 .sp .nf .ft C # Archive deleted rows more than one month old nova\-manage db archive_deleted_rows \-\-before "$(date \-d \(aqnow \- 1 month\(aq)" .ft P .fi .UNINDENT .UNINDENT .UNINDENT .SS Nova API Database .INDENT 0.0 .TP .B \fBnova\-manage api_db version\fP Print the current API database version. .TP .B \fBnova\-manage api_db sync [VERSION]\fP Upgrade the API database schema up to the most recent version or \fBVERSION\fP if specified. This command does not create the API database, it runs schema migration scripts. The API database connection is determined by \fBapi_database.connection\fP in the configuration file passed to nova\-manage. .sp In the 18.0.0 Rocky or 19.0.0 Stein release, this command will also upgrade the optional placement database if \fB[placement_database]/connection\fP is configured. .sp Returns exit code 0 if the database schema was synced successfully. This command should be run before \fBnova\-manage db sync\fP\&. .UNINDENT .SS Nova Cells v2 .INDENT 0.0 .TP .B \fBnova\-manage cell_v2 simple_cell_setup [\-\-transport\-url ]\fP Setup a fresh cells v2 environment. If a \fBtransport_url\fP is not specified, it will use the one defined by \fBtransport_url\fP in the configuration file. Returns 0 if setup is completed (or has already been done), 1 if no hosts are reporting (and cannot be mapped) and 1 if the transport url is missing or invalid. .TP .B \fBnova\-manage cell_v2 map_cell0 [\-\-database_connection ]\fP Create a cell mapping to the database connection for the cell0 database. If a database_connection is not specified, it will use the one defined by \fBdatabase.connection\fP in the configuration file passed to nova\-manage. The cell0 database is used for instances that have not been scheduled to any cell. This generally applies to instances that have encountered an error before they have been scheduled. Returns 0 if cell0 is created successfully or already setup. .TP .B \fBnova\-manage cell_v2 map_instances \-\-cell_uuid [\-\-max\-count ] [\-\-reset]\fP Map instances to the provided cell. Instances in the nova database will be queried from oldest to newest and mapped to the provided cell. A \fB\-\-max\-count\fP can be set on the number of instance to map in a single run. Repeated runs of the command will start from where the last run finished so it is not necessary to increase \fB\-\-max\-count\fP to finish. A \fB\-\-reset\fP option can be passed which will reset the marker, thus making the command start from the beginning as opposed to the default behavior of starting from where the last run finished. .sp If \fB\-\-max\-count\fP 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. .sp \fBReturn Codes\fP .TS center; |l|l|. _ T{ Return code T} T{ Description T} _ T{ 0 T} T{ All instances have been mapped. T} _ T{ 1 T} T{ There are still instances to be mapped. T} _ T{ 127 T} T{ Invalid value for \fB\-\-max\-count\fP\&. T} _ T{ 255 T} T{ An unexpected error occurred. T} _ .TE .TP .B \fBnova\-manage cell_v2 map_cell_and_hosts [\-\-name ] [\-\-transport\-url ] [\-\-verbose]\fP Create a cell mapping to the database connection and message queue transport url, and map hosts to that cell. The database connection comes from the \fBdatabase.connection\fP defined in the configuration file passed to nova\-manage. If a transport_url is not specified, it will use the one defined by \fBtransport_url\fP in the configuration file. This command is idempotent (can be run multiple times), and the verbose option will print out the resulting cell mapping uuid. Returns 0 on successful completion, and 1 if the transport url is missing or invalid. .TP .B \fBnova\-manage cell_v2 verify_instance \-\-uuid [\-\-quiet]\fP Verify instance mapping to a cell. This command is useful to determine if the cells v2 environment is properly setup, specifically in terms of the cell, host, and instance mapping records required. Returns 0 when the instance is successfully mapped to a cell, 1 if the instance is not mapped to a cell (see the \fBmap_instances\fP command), 2 if the cell mapping is missing (see the \fBmap_cell_and_hosts\fP command if you are upgrading from a cells v1 environment, and the \fBsimple_cell_setup\fP if you are upgrading from a non\-cells v1 environment), 3 if it is a deleted instance which has instance mapping, and 4 if it is an archived instance which still has an instance mapping. .TP .B \fBnova\-manage cell_v2 create_cell [\-\-name ] [\-\-transport\-url ] [\-\-database_connection ] [\-\-verbose] [\-\-disabled]\fP Create a cell mapping to the database connection and message queue transport url. If a database_connection is not specified, it will use the one defined by \fBdatabase.connection\fP in the configuration file passed to nova\-manage. If a transport_url is not specified, it will use the one defined by \fBtransport_url\fP in the configuration file. The verbose option will print out the resulting cell mapping uuid. All the cells created are by default enabled. However passing the \fB\-\-disabled\fP option can create a pre\-disabled cell, meaning no scheduling will happen to this cell. The meaning of the various exit codes returned by this command are explained below: .INDENT 7.0 .IP \(bu 2 Returns 0 if the cell mapping was successfully created. .IP \(bu 2 Returns 1 if the transport url or database connection was missing or invalid. .IP \(bu 2 Returns 2 if another cell is already using that transport url and/or database connection combination. .UNINDENT .TP .B \fBnova\-manage cell_v2 discover_hosts [\-\-cell_uuid ] [\-\-verbose] [\-\-strict] [\-\-by\-service]\fP Searches cells, or a single cell, and maps found hosts. This command will check the database for each cell (or a single one if passed in) and map any hosts which are not currently mapped. If a host is already mapped, nothing will be done. You need to re\-run this command each time you add a batch of compute hosts to a cell (otherwise the scheduler will never place instances there and the API will not list the new hosts). If \fB\-\-strict\fP is specified, the command will only return 0 if an unmapped host was discovered and mapped successfully. If \fB\-\-by\-service\fP is specified, this command will look in the appropriate cell(s) for any nova\-compute services and ensure there are host mappings for them. This is less efficient and is only necessary when using compute drivers that may manage zero or more actual compute nodes at any given time (currently only ironic). .sp This command should be run once after all compute hosts have been deployed and should not be run in parallel. When run in parallel, the commands will collide with each other trying to map the same hosts in the database at the same time. .sp The meaning of the various exit codes returned by this command are explained below: .INDENT 7.0 .IP \(bu 2 Returns 0 if hosts were successfully mapped or no hosts needed to be mapped. If \fB\-\-strict\fP is specified, returns 0 only if an unmapped host was discovered and mapped. .IP \(bu 2 Returns 1 if \fB\-\-strict\fP is specified and no unmapped hosts were found. Also returns 1 if an exception was raised while running. .IP \(bu 2 Returns 2 if the command aborted because of a duplicate host mapping found. This means the command collided with another running discover_hosts command or scheduler periodic task and is safe to retry. .UNINDENT .TP .B \fBnova\-manage cell_v2 list_cells [\-\-verbose]\fP By default the cell name, uuid, disabled state, masked transport URL and database connection details are shown. Use the \fB\-\-verbose\fP option to see transport URL and database connection with their sensitive details. .TP .B \fBnova\-manage cell_v2 delete_cell [\-\-force] \-\-cell_uuid \fP Delete a cell by the given uuid. Returns 0 if the empty cell is found and deleted successfully or the cell that has hosts is found and the cell, hosts and the instance_mappings are deleted successfully with \fB\-\-force\fP option (this happens if there are no living instances), 1 if a cell with that uuid could not be found, 2 if host mappings were found for the cell (cell not empty) without \fB\-\-force\fP option, 3 if there are instances mapped to the cell (cell not empty) irrespective of the \fB\-\-force\fP option, and 4 if there are instance mappings to the cell but all instances have been deleted in the cell, again without the \fB\-\-force\fP option. .TP .B \fBnova\-manage cell_v2 list_hosts [\-\-cell_uuid ]\fP Lists the hosts in one or all v2 cells. By default hosts in all v2 cells are listed. Use the \fB\-\-cell_uuid\fP option to list hosts in a specific cell. If the cell is not found by uuid, this command will return an exit code of 1. Otherwise, the exit code will be 0. .TP .B \fBnova\-manage cell_v2 update_cell \-\-cell_uuid [\-\-name ] [\-\-transport\-url ] [\-\-database_connection ] [\-\-disable] [\-\-enable]\fP Updates the properties of a cell by the given uuid. If a database_connection is not specified, it will attempt to use the one defined by \fBdatabase.connection\fP in the configuration file. If a transport_url is not specified, it will attempt to use the one defined by \fBtransport_url\fP in the configuration file. The meaning of the various exit codes returned by this command are explained below: .INDENT 7.0 .IP \(bu 2 If successful, it will return 0. .IP \(bu 2 If the cell is not found by the provided uuid, it will return 1. .IP \(bu 2 If the properties cannot be set, it will return 2. .IP \(bu 2 If the provided transport_url or/and database_connection is/are same as another cell, it will return 3. .IP \(bu 2 If an attempt is made to disable and enable a cell at the same time, it will return 4. .IP \(bu 2 If an attempt is made to disable or enable cell0 it will return 5. .UNINDENT .sp \fBNOTE:\fP .INDENT 7.0 .INDENT 3.5 Updating the \fBtransport_url\fP or \fBdatabase_connection\fP fields on a running system will NOT result in all nodes immediately using the new values. Use caution when changing these values. .sp The scheduler will not notice that a cell has been enabled/disabled until it is restarted or sent the SIGHUP signal. .UNINDENT .UNINDENT .TP .B \fBnova\-manage cell_v2 delete_host \-\-cell_uuid \-\-host \fP Delete a host by the given host name and the given cell uuid. Returns 0 if the empty host is found and deleted successfully, 1 if a cell with that uuid could not be found, 2 if a host with that name could not be found, 3 if a host with that name is not in a cell with that uuid, 4 if a host with that name has instances (host not empty). .sp \fBNOTE:\fP .INDENT 7.0 .INDENT 3.5 The scheduler caches host\-to\-cell mapping information so when deleting a host the scheduler may need to be restarted or sent the SIGHUP signal. .UNINDENT .UNINDENT .UNINDENT .SS Placement .INDENT 0.0 .TP .B \fBnova\-manage placement heal_allocations [\-\-max\-count ] [\-\-verbose] [\-\-skip\-port\-allocations] [\-\-dry\-run] [\-\-instance ] [\-\-cell \(ga .fi ) but the corresponding allocation is not found then the allocation is created against the network device resource providers according to the resource request of that port. It is possible that the missing allocation cannot be created either due to not having enough resource inventory on the host the instance resides on or because more than one resource provider could fulfill the request. In this case the instance needs to be manually deleted or the port needs to be detached. When nova \fI\%supports migrating instances with guaranteed bandwidth ports\fP, migration will heal missing allocations for these instances. .sp Before the allocations for the ports are persisted in placement nova\-manage tries to update each port in neutron to refer to the resource provider UUID which provides the requested resources. If any of the port updates fail in neutron or the allocation update fails in placement the command tries to roll back the partial updates to the ports. If the roll back fails then the process stops with exit code \fB7\fP and the admin needs to do the rollback in neutron manually according to the description in the exit code section. .sp There is also a special case handled for instances that \fIdo\fP have allocations created before Placement API microversion 1.8 where project_id and user_id values were required. For those types of allocations, the project_id and user_id are updated using the values from the instance. .sp Specify \fB\-\-max\-count\fP to control the maximum number of instances to process. If not specified, all instances in each 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 or 4. .sp Specify \fB\-\-verbose\fP to get detailed progress output during execution. .sp Specify \fB\-\-dry\-run\fP to print output but not commit any changes. The return code should be 4. \fI(Since 20.0.0 Train)\fP .sp Specify \fB\-\-instance\fP to process a specific instance given its UUID. If specified the \fB\-\-max\-count\fP option has no effect. \fI(Since 20.0.0 Train)\fP .sp Specify \fB\-\-skip\-port\-allocations\fP to skip the healing of the resource allocations of bound ports, e.g. healing bandwidth resource allocation for ports having minimum QoS policy rules attached. If your deployment does not use such a feature then the performance impact of querying neutron ports for each instance can be avoided with this flag. \fI(Since 20.0.0 Train)\fP .sp Specify \fB\-\-cell\fP to process heal allocations within a specific cell. This is mutually exclusive with the \fB\-\-instance\fP option. .sp Specify \fB\-\-force\fP to forcefully heal single instance allocation. This option needs to be passed with \fB\-\-instance\fP\&. .sp This command requires that the \fBapi_database.connection\fP and \fBplacement\fP configuration options are set. Placement API >= 1.28 is required. .sp \fBReturn Codes\fP .TS center; |l|l|. _ T{ Return code T} T{ Description T} _ T{ 0 T} T{ Command completed successfully and allocations were created. T} _ T{ 1 T} T{ \fB\-\-max\-count\fP was reached and there are more instances to process. T} _ T{ 2 T} T{ Unable to find a compute node record for a given instance. T} _ T{ 3 T} T{ Unable to create (or update) allocations for an instance against its compute node resource provider. T} _ T{ 4 T} T{ Command completed successfully but no allocations were created. T} _ T{ 5 T} T{ Unable to query ports from neutron T} _ T{ 6 T} T{ Unable to update ports in neutron T} _ T{ 7 T} T{ Cannot roll back neutron port updates. Manual steps needed. The error message will indicate which neutron ports need to be changed to clean up \fBbinding:profile\fP of the port: .INDENT 7.0 .INDENT 3.5 .sp .nf .ft C $ openstack port unset \-\-binding\-profile allocation .ft P .fi .UNINDENT .UNINDENT T} _ T{ 127 T} T{ Invalid input. T} _ T{ 255 T} T{ An unexpected error occurred. T} _ .TE .UNINDENT .INDENT 0.0 .TP .B \fBnova\-manage placement sync_aggregates [\-\-verbose]\fP Mirrors compute host aggregates to resource provider aggregates in the Placement service. Requires the \fBapi_database\fP and \fBplacement\fP sections of the nova configuration file to be populated. .sp Specify \fB\-\-verbose\fP to get detailed progress output during execution. .sp \fBNOTE:\fP .INDENT 7.0 .INDENT 3.5 Depending on the size of your deployment and the number of compute hosts in aggregates, this command could cause a non\-negligible amount of traffic to the placement service and therefore is recommended to be run during maintenance windows. .UNINDENT .UNINDENT .sp New in version Rocky. .sp \fBReturn Codes\fP .TS center; |l|l|. _ T{ Return code T} T{ Description T} _ T{ 0 T} T{ Successful run T} _ T{ 1 T} T{ A host was found with more than one matching compute node record T} _ T{ 2 T} T{ An unexpected error occurred while working with the placement API T} _ T{ 3 T} T{ Failed updating provider aggregates in placement T} _ T{ 4 T} T{ Host mappings not found for one or more host aggregate members T} _ T{ 5 T} T{ Compute node records not found for one or more hosts T} _ T{ 6 T} T{ Resource provider not found by uuid for a given host T} _ T{ 255 T} T{ An unexpected error occurred. T} _ .TE .TP .B \fBnova\-manage placement audit [\-\-verbose] [\-\-delete] [\-\-resource_provider ]\fP Iterates over all the Resource Providers (or just one if you provide the UUID) and then verifies if the compute allocations are either related to an existing instance or a migration UUID. If not, it will tell which allocations are orphaned. .sp You can also ask to delete all the orphaned allocations by specifying \fB\-delete\fP\&. .sp Specify \fB\-\-verbose\fP to get detailed progress output during execution. .sp This command requires that the \fBapi_database.connection\fP and \fBplacement\fP configuration options are set. Placement API >= 1.14 is required. .sp \fBReturn Codes\fP .TS center; |l|l|. _ T{ Return code T} T{ Description T} _ T{ 0 T} T{ No orphaned allocations were found T} _ T{ 1 T} T{ An unexpected error occurred T} _ T{ 3 T} T{ Orphaned allocations were found T} _ T{ 4 T} T{ All found orphaned allocations were deleted T} _ T{ 127 T} T{ Invalid input T} _ .TE .UNINDENT .SH SEE ALSO .INDENT 0.0 .IP \(bu 2 .nf :nova\-doc:\(gaOpenStack Nova <>\(ga .fi .UNINDENT .SH BUGS .INDENT 0.0 .IP \(bu 2 Nova bugs are managed at \fI\%Launchpad\fP .UNINDENT .SH AUTHOR openstack@lists.openstack.org .SH COPYRIGHT 2010-present, OpenStack Foundation .\" Generated by docutils manpage writer. .