Commit Graph

74 Commits

Author SHA1 Message Date
Zuul 907e168431 Merge "Add supplementary info for simple_cell_setup cmd" 2018-06-16 00:54:20 +00:00
Chen 8992416f9d Add supplementary info for simple_cell_setup cmd
Mention that if no transport_url is provided then the one
in the configuration file will be used for command
``nova-manage cell_v2 simple_cell_setup [--transport-url <transport_url>]``,
just like that for other cell_v2 commands.

Change-Id: Ifededa59f7ffe5887e67e29b93f70fa70dfaef33
2018-06-15 11:17:48 +08:00
Eric Fried 20da4ee469 Update nova-status & docs: require placement 1.25
Change I496e8d64907fdcb0e2da255725aed1fc529725f2 made nova-scheduler
require placement >= 1.25 so this change updates the minimum required
version checked in the nova-status upgrade check command along with the
upgrade docs.

related to blueprint: granular-resource-requests

Change-Id: I0a17ee362461a8ae2113804687799bb9d9216110
2018-06-13 10:15:13 -05:00
tianhui 98c503337a Fix bug to doc:nova-status
There is a wrong format in the doc and correct it

Change-Id: Ib171ca43e648a02c933f0cbefe6ca2186b2794ef
2018-06-07 19:37:18 +08:00
Zuul 07652b8bab Merge "Add nova-manage placement heal_allocations CLI" 2018-06-06 20:32:18 +00:00
Matt Riedemann 95106d2fa1 Add nova-manage placement heal_allocations CLI
This adds a new CLI which will iterate all non-cell0
cells looking for instances that (1) have a host,
(2) aren't undergoing a task state transition and
(3) don't have allocations in placement and try
to allocate resources, based on the instance embedded
flavor, against the compute node resource provider
on which the instance is currently running.

This is meant as a way to help migrate CachingScheduler
users off the CachingScheduler by first shoring up
instance allocations in placement for any instances
created after Pike, when the nova-compute resource
tracker code stopped creating allocations in placement
since the FilterScheduler does it at the time of
scheduling (but the CachingScheduler doesn't).

This will be useful beyond just getting deployments
off the CachingScheduler, however, since operators
will be able to use it to fix incorrect allocations
resulting from failed operations.

There are several TODOs and NOTEs inline about things
we could build on top of this or improve, but for now
this is the basic idea.

Change-Id: Iab67fd56ab4845f8ee19ca36e7353730638efb21
2018-06-01 18:45:10 -04:00
Zuul d741f624c8 Merge "doc: Start using openstackdoctheme's extlink extension" 2018-05-30 15:21:12 +00:00
Zuul 465051809c Merge "doc: Don't use single backticks in man pages" 2018-05-30 13:41:50 +00:00
Matt Riedemann 216e232def Update nova-status and docs for required placement 1.24
Change Id7eecbfe53f3a973d828122cf0149b2e10b8833f made
nova-scheduler require placement >= 1.24 so this change
updates the minimum required version checked in the
nova-status upgrade check command along with the upgrade
docs.

Change-Id: I4369f7fb1453e896864222fa407437982be8f6b5
2018-05-18 21:46:25 +00:00
Zuul 3f1c581fc6 Merge "Use .. deprecated:: theme for deprecations" 2018-05-08 23:47:51 +00:00
Eric Fried fca14f0906 Use .. deprecated:: theme for deprecations
We were using `warning`, and `important` themes to mark deprecations in
various places.  We have a `deprecated` role, so this change switches to
use it.

Note that I also found the following files that mentioned deprecation,
but not in a way where using this role seemed appropriate.  I'm
recording them here so you know I considered them.

doc/source/admin/configuration/hypervisor-kvm.rst
doc/source/admin/configuration/schedulers.rst
doc/source/cli/index.rst
doc/source/cli/nova-rootwrap.rst
doc/source/contributor/api.rst
doc/source/contributor/code-review.rst
doc/source/contributor/policies.rst
doc/source/contributor/project-scope.rst
doc/source/reference/policy-enforcement.rst
doc/source/reference/stable-api.rst
doc/source/user/feature-classification.rst
doc/source/user/flavors.rst
doc/source/user/upgrade.rst

Change-Id: Icd7613d9886cfe0775372c817e5f3d07d8fb553d
2018-05-08 21:50:51 +00:00
melanie witt e91dad3ee9 Deprecate the nova-consoleauth service
Part of blueprint convert-consoles-to-objects

Change-Id: I9bfa89d2d8fe2b5803b4e1478377e13dc3231b1c
2018-05-03 10:02:29 -04:00
Stephen Finucane dd1a416bc9 doc: Start using openstackdoctheme's extlink extension
This ensures we have version-specific references to other projects [1].
Note that this doesn't mean the URLs are actually valid - we need to do
more work (linkcheck?) here, but it's an improvement nonetheless.

[1] https://docs.openstack.org/openstackdocstheme/latest/#external-link-helper

Change-Id: Ifb99e727110c4904a85bc4a13366c2cae300b8df
2018-05-03 14:34:47 +01:00
Zuul 7e25f50cbf Merge "Cleanup patch for the cell-disable series" 2018-05-03 10:58:38 +00:00
Stephen Finucane fcdc61a18a doc: Don't use single backticks in man pages
This is done in a couple of places in the documentation and is broken
rST. 'prog' is semantic markup that fits right in here, so use that.

Change-Id: Ic654e33daaf68b01f561ac8d792934d5a57a07e5
2018-05-03 10:48:43 +01:00
Zuul d079d26444 Merge "Log a warning and add nova-status check for old API service versions" 2018-04-20 05:21:00 +00:00
Surya Seetharaman 441a637771 Cleanup patch for the cell-disable series
This patch addresses the cleanup comments from the reviewers
for the cell-disable spec series.

Change-Id: I9e6e9518ca380b497f411dd01fed85562dd2731c
2018-04-13 10:03:53 +02:00
Zuul 7891acf809 Merge "Marker reset option for nova-manage map_instances" 2018-04-11 17:57:04 +00:00
Matt Riedemann eaf6340847 Log a warning and add nova-status check for old API service versions
Change Ib984c30543acb3ca9cb95fb53d44d9ded0f5a5c8, which was added
in Newton when cells v2 was optional, added some transitional code
to the API for looking up an instance, which didn't rely on instance
mappings in a cell to find the instance if the minimum nova-osapi_compute
service version was from before Ocata.

People have reported this being a source of confusion when upgrading
from before Ocata, when cells v2 wasn't required, to Ocata+ where cells
v2 along with the mapping setup is required. That's because they might
have older nova-osapi_compute service version records in their 'nova'
(cell) database which makes the API think the code is older than it
actually is, and results in an InstanceNotFound error.

This change does two things:

1. Adds a warning to the compute API code in this scenario to serve
   as a breadcrumb if a deployment hits this issue.

2. A nova-status check to look for minimum nova-osapi_compute service
   versions across all cells and report the issue as a warning. It's
   not an upgrade failure since we don't know how the nova-api service
   is configured, but leave that investigation up to the deployer.

This is also written in such a way that we should be able to backport
this through to stable/ocata.

Change-Id: Ie2bc4616439352850cf29a9de7d33a06c8f7c2b8
Closes-Bug: #1759316
2018-04-09 14:43:34 -04:00
Zuul 0120643def Merge "Add --enable and --disable options to nova-manage update_cell" 2018-04-05 23:16:13 +00:00
Matt Riedemann 7eb6703521 Add nova-status check for ironic flavor migration
In Pike we started requiring that ironic instances have their
embedded flavor migrated to track the ironic node custom
resource class. This can be done either via the normal running
of the nova-compute service and ironic driver or via the
'nova-manage db ironic_flavor_migration' command.

This change adds a nova-status check to see if there are any
unmigrated ironic instances across all non-cell0 cells, and
is based mostly on the same logic within the nova-manage command
except it's multi-cell aware and doesn't use the objects.

Change-Id: Ifd22325e849db2353b1b1eedfe998e3d6a79591c
2018-04-04 17:23:06 -04:00
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
Dan Smith a9e7581f00 Make get_allocation_candidates() honor aggregate restrictions
This uses the member_of query parameter to placement to ensure that the
candidates returned are within the appropriate aggregate(s) if so
specified.

Related to blueprint placement-req-filter

Change-Id: If8ac06039ac9d647efdc088fbe944938e205e941
2018-03-28 15:58:45 -07: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 98163f98b7 Marker reset option for nova-manage map_instances
Currently nova-manage map_instances uses a marker set-up by which repeated
runs of the command will start from where the last run finished. Even
deleting the cell with the instance_mappings will not remove the marker
since the marker mapping has a NULL cell_mapping field. There needs to be
a way to reset this marker so that the user can run map_instances from the
beginning instead of the map_instances command saying "all instances are
already mapped" as is the current behavior.

Change-Id: Ic9a0bda9314cc1caed993db101bf6f874c0a0ae8
Closes-Bug: #1745358
2018-03-15 10:28:57 +01: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