Commit Graph

51 Commits

Author SHA1 Message Date
Surya Seetharaman cd01cbe65e Add --enable and --disable options to nova-manage update_cell
Through these new options, users can enable or disable a cell
through the CLI.

Related to blueprint cell-disable

Change-Id: I761f2e2b1f1cc2c605f7da504a8c8647d6d6a45e
2018-04-04 20:23:51 +00:00
Zuul 9c7ebf90fa Merge "Add disabled option to create_cell command" 2018-03-26 13:26:35 +00:00
Zuul 7672472998 Merge "Modify nova-manage cell_v2 list_cells to display "disabled" column" 2018-03-26 13:11:28 +00:00
Surya Seetharaman 2e491f7490 Modify nova-manage cell_v2 list_cells to display "disabled" column
This patch adds the new column disabled to the list of columns to be
displayed by the list_cells command.

Related to blueprint cell-disable

Change-Id: I96a6d5e59d33c65314fc187c0286ce3408d30bdc
2018-03-23 20:26:22 +00:00
Surya Seetharaman 9e9520a4b0 Add disabled option to create_cell command
Specifying this new option will create pre-disabled cells.

Related to blueprint cell-disable

Change-Id: I87e06eeefd48f640f42fcc5ff5a48938adc2ac22
2018-03-23 20:26:02 +00:00
Zuul 658d468df4 Merge "Remove version/date from CLI documentation" 2018-03-20 00:05:03 +00:00
Ken'ichi Ohmichi d6be2ece51 Remove version/date from CLI documentation
This patch removes the unnecessary maintenance of a date and version
from the CLI documentation.

NOTE: Cinder team also did the same removal with
      the commit Idf78bbed44f942bb6976ccf4da67c748d9283ed9

Change-Id: I0a9dd49e68f2d47c58a46b107c77975e7b2aeaf7
2018-03-19 17:03:02 +00:00
Zuul 37b4f77b5e Merge "Add --by-service to discover_hosts" 2018-03-19 05:07:53 +00:00
Zuul 15885f18c8 Merge "Make archive_deleted_rows handle a missing CONF.api_database.connection" 2018-03-18 02:16:29 +00:00
Dan Smith 005a66d7e0 Add --by-service to discover_hosts
This allows us to discover and map compute hosts by service instead of
by compute node, which will solve a major deployment ordering problem for
people using ironic. This also allows closing a really nasty race when
doing HA of nova-compute/ironic.

Change-Id: Ie9f064cb9caf6dcba2414acb24d12b825df45fab
Closes-Bug: #1755602
2018-03-16 15:55:19 -07:00
Surya Seetharaman 8da6831e63 Make archive_deleted_rows handle a missing CONF.api_database.connection
This change https://review.openstack.org/#/c/515034/ (added in queens)
makes the archive_deleted_rows CLI remove instance mappings and request
specs from the API database if there are instances archived from the
main nova/cell database. However for this to work, the api database
connection should be set in the config file. So in the case that the
API database is not configured in the config file being used to run the
CLI, we should gracefully handle the condition and and stop archiving thus
prompting the user to set the api_db config and try the archival operation
again. This patch fixes the graceful handling.

Change-Id: I0c7b802a453aa423c7273ab724ce78eac0cfed4c
Closes-Bug: #1753833
2018-03-13 18:52:41 +01:00
David Rabel fcda5c2d1a Fix indentation in doc/source/cli/*
Current indentation was wrongly interpreted as quotes.

Change-Id: I731d8833e69e6bed12f5637d6bb3248b890c18ab
2018-03-09 15:41:00 +00:00
Dan Smith fd59fbd4d1 Make nova-manage db purge take --all-cells
This makes purge iterate over all cells if requested. This also makes our
post_test_hook.sh use the --all-cells variant with just the base config
file.

Related to blueprint purge-db

Change-Id: I7eb5ed05224838cdba18e96724162cc930f4422e
2018-03-08 09:26:49 -08:00
Dan Smith ff47787e11 Add --purge helper flag to archive_deleted_rows
Since many people will want to fully purge shadow table data after archiving,
this adds a --purge flag to archive_deleted_rows which will automatically do
a full db purge when complete.

Related to blueprint purge-db

Change-Id: Ibd824a77b32cbceb60973a89a93ce09fe6d1050d
2018-03-08 09:17:22 -08:00
Zuul 83caaae547 Merge "Add simple db purge command" 2018-03-08 17:15:22 +00:00
Surya Seetharaman 00a0308d2a Update the nova-manage db archive_deleted_rows description
This patch adds the bit about removing the deleted rows from the
instance_mappings and request_specs tables as well permanently so
that the users are aware of this.

Change-Id: I183cc9f80b3feec6789332860b5aeb7591b710df
2018-03-08 00:29:39 +01:00
Dan Smith ae241cc68f Add simple db purge command
This adds a simple purge command to nova-manage. It either deletes all
shadow archived data, or data older than a date if provided.

This also adds a post-test hook to run purge after archive to validate
that it at least works on data generated by a gate run.

Related to blueprint purge-db

Change-Id: I6f87cf03d49be6bfad2c5e6f0c8accf0fab4e6ee
2018-03-07 10:35:32 -08:00
Zuul a32e22d005 Merge "Extending delete_cell --force to delete instance_mappings" 2018-02-22 20:47:17 +00:00
Surya Seetharaman ee2f65d91f Extending delete_cell --force to delete instance_mappings
Currently the nova-manage delete_cell command with the --force option
allows us to destroy hosts_mappings of the cell which does not have any
instances or instance_mappings. This patch extends this command with the
--force option for destroying instance_mappings in addition to the
host_mappings of the cell which is to be deleted. Note that the instance
mappings and host mappings are only removed if there are no living
instances in the cell. So a --force delete here will not work if there
are non-deleted instances.

Change-Id: Ibefa0465224bec9a22431c7d3b5c8f5d91fc7732
Closes-Bug: #1745375
2018-02-20 11:17:13 +01:00
Zuul 538f47eeca Merge "add "--until-complete" option for nova-manage db archive_deleted_rows." 2018-02-01 21:26:11 +00:00
Zuul 40f74fb959 Merge "placement: enable required traits from the flavor extra specs" 2018-02-01 06:42:41 +00:00
Ameed Ashour eba33a0e2d add "--until-complete" option for nova-manage db archive_deleted_rows.
Change-Id: Ibcb489efb364c03167b7398f615c9a15f6867370
Closes-bug: #1746531
2018-01-31 16:45:24 -05:00
He Jie Xu 6a818ebc19 placement: enable required traits from the flavor extra specs
This patch enables the flavor extra spec 'required:[traits]'. The
admin can specifiy a set of traits that a flavor required.

To enable this, the placement 1.17 is required, it added trait
support in the `GET /allocation_candidates` API. So bump the
minimal placement version requirement to 1.17 and update the
check in cmd `nova-status`.

Implement blueprint request-traits-in-nova

Change-Id: Ia51ace951e9a0402f873ce9751a8cd3c0283db08
2018-01-24 23:35:54 +08:00
Matt Riedemann 2890d8db67 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
2018-01-23 15:34:03 -05:00
Zuul d9ba29fd6e Merge "update_cell allows more than once cell to have the same db/transport url" 2018-01-16 11:12:03 +00:00
Takashi NATSUME 52e7e6e3e4 Add a warning in 'nova-manage cell_v2 delete_cell'
When deleting a cell, if there are instance mappings to the cell,
the command fails with the following message.

* There are existing instances mapped to cell with uuid UUID.

But even if all instances have been deleted in the cell,
the same message is shown.

So in that case, add a warning that the instance mappings have to
be deleted by 'nova-manage db archive_deleted_rows'
before deleting the cell.

Change-Id: I2a163fb50a7e71ce9f463bc9ddeffe2ea47d1588
Closes-Bug: #1725331
2018-01-12 07:22:32 +00:00
Zuul 0010e230cc Merge "Add support for listing hosts in cellv2" 2018-01-03 23:19:40 +00:00
jichenjc 38a8a142a3 Remove 'nova-manage logs' command
This command was deprecated in 16.0.0 and can now be removed.

Change-Id: I980352415a2d812725d53d46eb968abbf443b6b7
2017-12-27 14:58:28 +00:00
Zuul c864cf677f Merge "Remove 'nova-manage account' and 'nova-manage project'" 2017-12-27 13:43:59 +00:00
Zuul 024ebdccb5 Merge "Update nova-status and docs for nova-compute requiring placement 1.14" 2017-12-19 22:23:47 +00:00
Surya Seetharaman c34e37eef3 update_cell allows more than once cell to have the same db/transport url
Unlike in nova-manage create_cell, in nova-manage update_cell the check
for the same combination of transport-url and/or database_connection
does not exist. Hence it allows a user to update a cell's transport-url
and/or database_connection to another existing cell's transport/db urls.

Change-Id: Ia5d5566c535d6da3d215392590a2d362e1226424
Closes-Bug: #1729806
2017-12-18 11:10:57 +01:00
Matt Riedemann 4b7a150584 Update nova-status and docs for nova-compute requiring placement 1.14
With change I2f367b06e683ed7c815dd9e0536a46e5f0a27e6c, nova-compute
now unconditionally requires Placement 1.14 to be available (the
client side code doesn't check to see if 1.14 is available before
trying to use it).

This change updates the nova-status check for the minimum required
version of Placement and also starts the "Queens" section of the
Placement upgrade notes docs.

Change-Id: I37415e384d375bc9b548a0223f787a9236286bb0
2017-12-13 15:18:27 -05:00
Hongbin Lu c7b51a63b0 Add support for listing hosts in cellv2
Add a ``nova-manage cell_v2 list_hosts`` command for listing hosts
in one or all v2 cells.

Change-Id: Ie8eaa8701aafac10e030568107b8e6255a60434d
Closes-Bug: #1735687
2017-12-07 23:38:47 +00:00
jichenjc b9b78fc252 Remove 'nova-manage account' and 'nova-manage project'
These commands were deprecated in 16.0.0 and can now be removed.

Change-Id: Icab97d0f46ab83b1f8584fd1d8c482e6d04a8795
2017-12-04 10:47:49 +08:00
jichenjc 726387e51a Remove 'nova-manage shell' command
This command was deprecated in 16.0.0 and can be removed.

Change-Id: I29c9e437fb7a99b0ecbd4ebda1518dd49d414e96
2017-12-04 10:46:40 +08:00
jichenjc d614a8b8af Remove 'nova-manage quota refresh' command
This command was deprecated in 16.0.0 and can now be removed.

Change-Id: I016227cb20f8d6911e3cb57c7372835a75d122fd
2017-11-24 02:34:47 +08:00
Surya Seetharaman 32fd58813f cleanup mapping/reqspec after archive instance
This patch aims at deleting the records of the archived instances from
the instance_mappings and request_specs tables in the API database
immediately following their archival from instances to shadow_instances
table. So upon running the 'nova-manage db archive_deleted_rows' command
the records of the archived instances will be automatically removed from
the instance_mappings and request_specs tables as well. A warning has
also been added to fix the issue of 'nova-manage verify_instance'
returning a valid instance mapping even after the instance is deleted.

The patch also adds InstanceMappingList.destory_bulk() and
RequestSpec.destroy_bulk() methods for ease of bulk deletion of records.

Change-Id: I483701a55576c245d091ff086b32081b392f746e
Closes-Bug: #1724621
Closes-Bug: #1678056
2017-11-21 15:28:07 +01:00
Michael Still 3f7995f586 Move the idmapshift binary into privsep.
I can't see any evidence that anyone else uses our nova-idmapshift
binary, and it adds a lot of complexity (flags we never call for
example). Move the code we do actually use into the privsep
directory and simplify our calls to it. Remove the extra binary
from our install and documentation.

Change-Id: Ibce28d20d166da154833376cf51f1877b829925e
blueprint: hurrah-for-privsep
2017-10-24 18:50:23 +11:00
Takashi NATSUME f4f17b364e Add 'delete_host' command in 'nova-manage cell_v2'
Add 'delete_host' command in 'nova-manage cell_v2'.
Add an optional 'force' option in 'nova-manage cell_v2 delete_cell'.
If specifying the 'force' option, a cell can be deleted
even if the cell has hosts.

Change-Id: I8cd7826c2c03687c6b85731519778f09d542b236
Closes-Bug: #1721179
2017-10-19 01:31:02 +00:00
Stephen Finucane 3a6e1e2396 doc: Rework man pages
Rework the man pages by:

- Wording the synopsis sections similarly for all commands
- Not using upper-case section names, as this is unnecessary and results
  in worse HTML output
- Formatting code and file names as literals

The 'nova-idmapshift' man page is excluded as this utility will be
removed shortly.

Change-Id: I67914a757f9436461960a8d6b92d157f59ccad66
2017-10-09 16:08:40 +01:00
Takashi NATSUME 48eb371e62 Fix inconsistency of 'NOTE:' description
Use the 'note' directive.

TrivialFix
Change-Id: If342940f8cc64591778ad21ce6cccbe006c0145b
2017-09-28 16:28:49 +09:00
Dan Smith 8f8982d8ef Add nova-manage db command for ironic flavor migrations
This adds `nova-manage db ironic_flavor_migration` which allows
pushing the migrations ahead of time, and without ironic or nova
services running.

This is a similar operation to online_data_migrations, but there is
a need to pass data that would normally be retrieved from ironic.
However, we want this to work offline and thus that data must be
provided locally. When fast-forwarding through the pike release,
ironic and nova-compute will never be started and thus we can't rely
on the online nature of the migration integrated into the ironic
driver.

Change-Id: I459bce472227ee08230d3120d9e2eb1bde635218
2017-09-15 00:30:23 -04:00
Andreas Jaeger 4e6eec5c9b Fix broken URLs
Fix broken nova URLs that linked to the old developer/nova places and
use the new link instead.

Change-Id: Ideb50626e140201dded19fc82584440f1a407e47
2017-09-07 15:42:31 +02:00
wanghongtaozz f44935b7d2 spelling mistake
Change-Id: I478de51257b8133c2e3ef52e93d53a2818496f56
2017-09-06 03:46:38 -07:00
Jenkins a85ec5e53f Merge "add online_data_migrations to nova docs" 2017-09-01 16:45:47 +00:00
Hesam Chobanlou 9e1e1a52de add online_data_migrations to nova docs
adding cli documentation for online_data_migrations to clarify
when the command is complete.

Closes-Bug: #1670738

Change-Id: If50bd044091250611a7d3d67438d732279510d5b
2017-09-01 15:43:00 +00:00
Sean Dague 7e693e9c5c Clean up *most* ec2 / euca2ools references
The ec2 / euca2ools command references definitely don't work any more,
this deletes most of them. The exception is the policy reference doc
which is over a year out of date, and needs more then surgical removal
of ec2 from it.

Change-Id: I963170f99037d5ed085e8c676ab55750c7f6372e
2017-08-09 11:20:12 -04:00
Sean Dague 104efa6fb6 Structure cli page
The cli page was just a straight list of cli links. This groups them
by function with a preamble to make it more clear why you'd want to go
look at any particular ones.

Part of bp: doc-migration

Change-Id: Iecf99e173be3c3d5a2d5dd758c09f79d443729b9
2017-08-09 11:20:12 -04:00
Matt Riedemann 3414ab14ca Deprecate cells v1
With multi-cell support in Pike, we should deprecate cells v1
so we can at least start the deprecation signaling in the
docs and release notes. We may not end up removing cells v1
code in Queens, but this at least gives us the option.

Note that we also want to do this because nova-network cannot
be removed until we remove cells v1.

Change-Id: I1a173f7ce0715e684850e030c358e8175fa8724c
2017-08-01 11:07:55 -04:00
Dan Smith f2606322f7 Deprecate useless quota_usage_refresh from nova-manage
Since we no longer use usage records, we don't need the nova-manage
command to sync usage records with actual resource consumption.

Co-Authored-By: melanie witt <melwittt@gmail.com>

Part of blueprint cells-count-resources-to-check-quota-in-api

Change-Id: I55f7a2b6e15eec6e6ec97be23903325ad22bd4d4
2017-07-19 19:33:23 +00:00