¿ù°£ Àα⠰Խù°

°Ô½Ã¹° 708°Ç
   
nova-manager
±Û¾´ÀÌ : ÃÖ°í°ü¸®ÀÚ ³¯Â¥ : 2022-11-22 (È­) 15:26 Á¶È¸ : 186
                                
https://docs.openstack.org/nova/rocky/cli/nova-manage.html



root@controller:~# nova-manage db archive_deleted_rows --max_rows 10000 --verbose
Option "logdir" from group "DEFAULT" is deprecated. Use option "log-dir" from group "DEFAULT".
Option "verbose" from group "DEFAULT" is deprecated for removal.  Its value may be silently ignored in the future.
+--------------+-------------------------+
| Table        | Number of Rows Archived |
+--------------+-------------------------+
| reservations | 10000                   |
+--------------+-------------------------+


root@controller:~# nova-manage db archive_deleted_rows --max_rows 3000 --verbose
Option "logdir" from group "DEFAULT" is deprecated. Use option "log-dir" from group "DEFAULT".
Option "verbose" from group "DEFAULT" is deprecated for removal.  Its value may be silently ignored in the future.
+-------------------------+-------------------------+
| Table                   | Number of Rows Archived |
+-------------------------+-------------------------+
| instance_actions_events | 1523                    |
| reservations            | 1477                    |
+-------------------------+-------------------------+


root@controller:~# nova-manage db archive_deleted_rows --max_rows 10000 --verbose
Option "logdir" from group "DEFAULT" is deprecated. Use option "log-dir" from group "DEFAULT".
Option "verbose" from group "DEFAULT" is deprecated for removal.  Its value may be silently ignored in the future.
+--------------------------+-------------------------+
| Table                    | Number of Rows Archived |
+--------------------------+-------------------------+
| instance_system_metadata | 7960                    |
| migrations               | 132                     |
| reservations             | 1908                    |
+--------------------------+-------------------------+


root@controller:~# nova-manage db archive_deleted_rows --max_rows 10000 --verbose
Option "logdir" from group "DEFAULT" is deprecated. Use option "log-dir" from group "DEFAULT".
Option "verbose" from group "DEFAULT" is deprecated for removal.  Its value may be silently ignored in the future.
Nothing was archived.



Nova Database¢Ò

nova-manage db version
Print the current main database version.
nova-manage db sync [--version <version>] [--local_cell]
Upgrade the main database schema up to the most recent version or --version if specified. By default, this command will also attempt to upgrade the schema for the cell0 database if it is mapped (see the map_cell0 or simple_cell_setup commands for more details on mapping the cell0 database). If --local_cell is specified, then only the main database in the current cell is upgraded. The local database connection is determined by [database]/connection in the configuration file passed to nova-manage.
nova-manage db archive_deleted_rows [--max_rows <number>] [--verbose] [--until-complete] [--purge]
Move deleted rows from production tables to shadow tables. Note that the corresponding rows in the instance_mappings and request_specs tables of the API database are purged when instance records are archived and thus, CONF.api_database.connection is required in the config file. Specifying –verbose will print the results of the archive operation for any tables that were changed. Specifying –until-complete will make the command run continuously until all deleted rows are archived. Use the –max_rows option, which defaults to 1000, as a batch size for each iteration. Specifying –purge will cause a full DB purge to be completed after archival. If a date range is desired for the purge, then run nova-manage db purge --before <date> manually after archiving is complete.
nova-manage db purge [--all] [--before <date>] [--verbose] [--all-cells]
Delete rows from shadow tables. Specifying –all will delete all data from all shadow tables. Specifying –before will delete data from all shadow tables that is older than the date provided. Date strings may be fuzzy, such as Oct 21 2015. Specifying –verbose will cause information to be printed about purged records. Specifying –all-cells will cause the purge to be applied against all cell databases. For –all-cells 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.
nova-manage db null_instance_uuid_scan [--delete]
Lists and optionally deletes database records where instance_uuid is NULL.
nova-manage db online_data_migrations [--max-count]

Perform data migration to update all live data.

--max-count 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.

Returns exit code 0 if no (further) updates are possible, 1 if the --max-count 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).

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.

nova-manage db ironic_flavor_migration [--all] [--host] [--node] [--resource_class]

Perform the ironic flavor migration process against the database while services are offline. This is not recommended 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 --resource_class parameter.

To migrate a specific host and node, provide the hostname and node uuid with --host $hostname --node $uuid. To migrate all instances on nodes managed by a single host, provide only --host. To iterate over all nodes in the system in a single pass, use --all. 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).

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.



À̸§ Æнº¿öµå
ºñ¹Ð±Û (üũÇÏ¸é ±Û¾´À̸¸ ³»¿ëÀ» È®ÀÎÇÒ ¼ö ÀÖ½À´Ï´Ù.)
¿ÞÂÊÀÇ ±ÛÀÚ¸¦ ÀÔ·ÂÇϼ¼¿ä.
   

 



 
»çÀÌÆ®¸í : ¸ðÁö¸®³× | ´ëÇ¥ : ÀÌ°æÇö | °³ÀÎÄ¿¹Â´ÏƼ : ·©Å°´åÄÄ ¿î¿µÃ¼Á¦(OS) | °æ±âµµ ¼º³²½Ã ºÐ´ç±¸ | ÀüÀÚ¿ìÆí : mojily°ñ¹ðÀÌchonnom.com Copyright ¨Ï www.chonnom.com www.kyunghyun.net www.mojily.net. All rights reserved.