Commit Graph

51655 Commits

Author SHA1 Message Date
Gábor Antal 23efc549a1 Transform instance.live_migration_force_complete notification
The instance.live_migration_force_complete.start and
instance.live_migration_force_complete.end notifications have been
transformed to the versioned notification framework.

Co-Authored-By: Takashi Natsume <natsume.takashi@lab.ntt.co.jp>
Change-Id: I2e9a474457a7597a9febc111b13a67ddcf45f29e
Implements: bp versioned-notification-transformation-rocky
2018-07-16 00:12:37 +09:00
Gábor Antal 6322cb6a18 Transform aggregate.update_prop notification
The aggregate.update_prop.start and aggregate.update_prop.end
notifications has been transformed to the versioned notification
framework.

Co-Authored-By: Takashi Natsume <natsume.takashi@lab.ntt.co.jp>
Change-Id: I37b19573b6d0e1131c446fcec361f01fa2560f82
Implements: bp versioned-notification-transformation-rocky
2018-07-15 23:36:31 +09:00
Zuul 202c147f3c Merge "Transform instance.live_migration_rollback_dest notification" 2018-07-15 13:25:45 +00:00
Zuul 13dbe1a58d Merge "Transform instance.live_migration_post notification" 2018-07-15 13:14:54 +00:00
Zuul cb0bf8a5e1 Merge "ironic: Log an error when API version is not available" 2018-07-15 07:49:44 +00:00
Zuul 629dc4d008 Merge "virt/ironic: Implement rescue and unrescue" 2018-07-15 07:49:36 +00:00
Zuul f75fcc6ce5 Merge "ironic: provide facilities to gracefully navigate versions" 2018-07-15 01:19:13 +00:00
Zuul 039f7e055e Merge "Transform instance.rebuild_scheduled notification" 2018-07-14 17:20:16 +00:00
Zuul 21a368e1a6 Merge "Heal allocations with incomplete consumer information" 2018-07-13 19:26:59 +00:00
Matt Riedemann 6b6d81cf2b Heal allocations with incomplete consumer information
Allocations created before microversion 1.8 didn't have project_id
/ user_id consumer information. In Rocky those will be migrated
to have consumer records, but using configurable sentinel values.

As part of heal_allocations, we can detect this and heal the
allocations using the instance.project_id/user_id information.

This is something we'd need if we ever use Placement allocation
information counting quotas.

Note that we should be using Placement API version 1.28 with
consumer_generation when updating the allocations, but since
people might backport this change the usage of consumer
generations is left for a follow up patch.

Related to blueprint add-consumer-generation

Change-Id: Idba40838b7b1d5389ab308f2ea40e28911aecffa
2018-07-13 11:29:54 -04:00
Zuul 706257d20b Merge "Adapt _validate_instance_group_policy to new policy model" 2018-07-13 13:30:59 +00:00
OpenStack Proposal Bot 9b5d1d9ae8 Imported Translations from Zanata
For more information about this automatic import see:
https://docs.openstack.org/i18n/latest/reviewing-translation-import.html

Change-Id: I3a294bcbbedea827d4cc98419c9ffb5dbc3f7f97
2018-07-13 06:58:20 +00:00
Hironori Shiina 1db9f80a29 ironic: Log an error when API version is not available
This patch adds logging when ironic doesn't support a required API
version for rescuing and unrescuing.

Change-Id: Ibabfc439e9d426aeabd54877a82e27f02f6ddb5a
Implements: blueprint ironic-rescue-mode
2018-07-13 15:41:48 +09:00
Zuul 00fa50c8da Merge "Change the ServerGroupAntiAffinityFilter to adapt to new policy" 2018-07-13 02:59:44 +00:00
Zuul e13db24c48 Merge "Add policy field to ServerGroup notification object" 2018-07-13 02:45:55 +00:00
Zuul 63bc42f6b9 Merge "Follow up for Ie49d605c66062d2548241d7e04f5a2a6b98c011e" 2018-07-13 02:45:44 +00:00
Taku Izumi a07b68ea92 virt/ironic: Implement rescue and unrescue
This patch adds implementation of rescue and unrescue for ironic virt
driver.

Implements: blueprint ironic-rescue-mode

Change-Id: I7c20a0c5f566c3255350fd494d1a2cde84a99440
Signed-off-by: Taku Izumi <izumi.taku@jp.fujitsu.com>
Co-Authored-By: Hironori Shiina <shiina.hironori@jp.fujitsu.com>
2018-07-13 01:56:13 +00:00
Julia Kreger 4acbf4fee3 ironic: provide facilities to gracefully navigate versions
For quite some time, the nova virt driver has invoked the ironic
python client library with a static microversion pin which causes
operators to have a failed nova-compute process upon out of order
upgrades, as well as causes ironic's grenade CI jobs to break every
cycle when the pin is changed to a version released in the current
cycle due to established community agreement as well as the grenade
testing framework limitations.

In order to gracefully navigate this, python-ironicclient has
accepted a list of possible versions to negotiate since 2.2.0.

This patch provies a mechanism to validate if we are able to
send a request that was added at a specific version, allowing for
minimal code changes and for logic to only be centered around newer
features being added.

Change-Id: I440689a246538fbc8200687e40480d837b87eb7b
Closes-Bug: #1739440
2018-07-12 18:53:36 -07:00
Zuul fff9335bed Merge "Handle rebuild of instances with image traits" 2018-07-13 00:43:12 +00:00
Zuul 3dc4e61f6e Merge "Update process doc to be more generic about point of contact" 2018-07-13 00:30:18 +00:00
Zuul 536e5fa57f Merge "Mention osc-placement for managing traits in docs" 2018-07-12 18:49:06 +00:00
Zuul 45c58c0b70 Merge "Revert "docs: Disable smartquotes"" 2018-07-12 18:43:22 +00:00
melanie witt d76c54a70e Update process doc to be more generic about point of contact
The docs currently name a past PTL by IRC nick -- update it to be
more generic so we don't have to update it every time the PTL
changes.

Change-Id: I31dbf0ee4f7650389e824c25c3aea7529d63eaa0
2018-07-12 17:23:03 +00:00
Matt Riedemann 0d9e140df3 Follow up for Ie49d605c66062d2548241d7e04f5a2a6b98c011e
This just addresses the comments from said change.

Change-Id: Iec9a54c70ac4c1e99d320b5d9db05dfbb84aa529
2018-07-12 12:12:09 -04:00
Matt Riedemann 7ac21382f9 Mention osc-placement for managing traits in docs
This just links to the osc-placement plugin docs
for managing required and forbidden traits in the
flavor extra specs docs.

Change-Id: I8549dc404a62a05d327a2c7a4813e7cc505d6b06
2018-07-12 11:25:31 -04:00
Zuul da16690f4d Merge "Add policy to InstanceGroup object" 2018-07-12 14:34:04 +00:00
Author Name 012ea7439b Handle rebuild of instances with image traits
Update the conductor to handle rebuilding of an instance. If a rebuild
is requested with an image with traits, we check the current allocations
of the instance against the image required traits and allow the action
only if the current allocations can satisfy the image requirements.

Change-Id: Ie49d605c66062d2548241d7e04f5a2a6b98c011e
Implements: blueprint glance-image-traits
2018-07-12 04:24:55 -07:00
Yikun Jiang 09f67d7789 Adapt _validate_instance_group_policy to new policy model
To solve the race condition problem, we do anti-affinity policy
sanity check in the instance build code of compute manager, but
this check is only valid in original policy.

Specifically, this change adds validation of the new
max_server_per_host policy rule which can be used to allow >1
anti-affinity group member on the same host.

blueprint: complex-anti-affinity-policies

Change-Id: I755b6fdddc9d754326cd9c81b6880581641f73e8
2018-07-12 10:32:14 +08:00
Yikun Jiang a77f57acf7 Change the ServerGroupAntiAffinityFilter to adapt to new policy
In this patch, the anti-affinity filter will get the
max_server_per_host limit from policy rules, and compare it
against the number of servers within the same group on a given
host. If the filter finds the number is not satisfied with the
limit, it will filter out this host.

The default ``max_server_per_host`` for the anti-affinity filter
is 1 for backward compatibility.

Change-Id: I4b67ec9dd4ce846a704d0f75ad64c41e693de0fb
blueprint: complex-anti-affinity-policies
2018-07-12 10:30:10 +08:00
Yikun Jiang c67ab38ea0 Add policy field to ServerGroup notification object
In this patch, the ServerGroupPayload is updated to include
the new ``policy`` field; the ``policies`` field is deprecated
for removal but still put into the notification payload for
backward compatibility.

Related to blueprint complex-anti-affinity-policies

Change-Id: Ie739ee8dec4685cd70e735ff83f7f30bc7e95a57
2018-07-12 10:00:05 +08:00
Yikun Jiang 8fa70e5dfc Add policy to InstanceGroup object
The change items in this patch as below:
1. Add policy and rules to InstanceGroup, deprecate
the policies field.
2. Also, make _from_db_object and _create_in_db method to
support new "policy" field.

The internal usage of InstanceGroup.policies is converted to
use the new model in the REST API and RequestSpec compat code.

Related to blueprint complex-anti-affinity-policies

Change-Id: Ib33719a4b9599d86848c618a6e142c71ece79ca5
2018-07-12 09:30:41 +08:00
Zuul 39b05ee9e3 Merge "Fix server_group_members quota check" 2018-07-11 21:33:06 +00:00
Zuul 6235735ba8 Merge "Add functional regressions tests for server_group_members OverQuota" 2018-07-11 21:32:58 +00:00
Zuul d620b0fdc3 Merge "Fix TypeError in prep_resize allocation cleanup" 2018-07-11 21:32:46 +00:00
Zuul d2954aed7c Merge "Add queued for delete to instance_mappings table." 2018-07-11 21:32:30 +00:00
Zuul 746a8c8d29 Merge "[placement] add error.code on a ConcurrentUpdateDetected" 2018-07-11 18:20:54 +00:00
Zuul 8136772f28 Merge "Test for unsanitized consumer UUID" 2018-07-11 16:27:36 +00:00
Zuul 90cdf80750 Merge "Remove irrelevant comment" 2018-07-11 14:12:32 +00:00
Eric Fried a644b22056 Test for unsanitized consumer UUID
Add a gabbi test case demonstrating that the consumer with UUID
{8}-{4}-{4}-{4}-{12} is not the same as the consumer with UUID
{8}{4}{4}{4}{12}.

Change-Id: I1852ac6004fedc5dfa9dd3de187c937ab385d1b5
Related-Bug: #1758057
2018-07-11 13:24:28 +00:00
Stephen Finucane d1820d14c6 Revert "docs: Disable smartquotes"
Bump the minimum version of oslo.config to 6.1.0, which adds proper
support for parsing Opt.help as rST [1]. This in turn allows us to
revert commit 75fc300901, which is a
temporary fix relying on deprecated features of Sphinx.

[1] https://review.openstack.org/#/c/553860/

Change-Id: I8f56bdce37cfc538348490052a24e463164c86a3
2018-07-11 14:02:32 +01:00
Chris Dent c5cdef24ed [placement] add error.code on a ConcurrentUpdateDetected
A pending api-sig guideline
I473918ce9c6b49c0b904e93b7140421525f4e7c0 reflects discussion amongst
various parties that adding error codes to structured error responses
should not be considered a breaking API change.

Given that, it is simply "okay" to add them. This change adds
errors.CONCURRENT_UPDATE wherever the ConcurrentUpdateDetected results
in an HTTPConflict (409) response.

In practice this means that if microversion 1.23 or beyond is being
used, there will be a code in any error response, and for some
409 responses that code will be `placement.concurrent_update`.

Note that because we haven't instrumented a way to cause a truly
concurrent update, we've never had real tests for this kind of
thing.

Change-Id: I5a164a0ee298846231113ad7b62b82a3e8f1f409
2018-07-11 14:00:57 +01:00
Zuul d3fa585f5e Merge "Update some placement docs to reflect modern times" 2018-07-11 05:28:02 +00:00
Zuul d5978b4fe9 Merge "Remove unused variable in migration" 2018-07-11 02:56:44 +00:00
Matt Riedemann 78af1de158 Fix TypeError in prep_resize allocation cleanup
The CachingScheduler doesn't create allocations in
placement so when prep_resize fails and it tries
to revert allocations, the _revert_allocation() method
returns False and then prep_resize calls
delete_allocation_for_failed_resize() which since change
I7891b98f225f97ad47f189afb9110ef31c810717 has taken a
context argument, but that's not being passed so it
results in a TypeError.

This fixes the TypeError and adds a functional test case
which runs a resize reschedule scenario with the
CachingScheduler.

Change-Id: I0ec0c2d3f7ef8d2274b97a28a175d53921edc9db
Closes-Bug: #1781100
2018-07-10 22:11:05 -04:00
Zuul 7d2223e4ec Merge "unquiesce instance after quiesce failure" 2018-07-11 01:34:17 +00:00
Chris Dent cc7f4ea724 Update some placement docs to reflect modern times
This change provides a small number of updates to the placement user and
contributor documentation to reflect some of the things that have
changed recently. This is by no means complete, but is an improvement
over what was there.

Partial-Bug: #1778227

Change-Id: Ia348cd3c99b1a5104e15595fdebc83e1ca582a98
2018-07-11 01:33:28 +00:00
Zuul 08bca9a48e Merge "update project/user for consumer in allocation" 2018-07-11 00:53:41 +00:00
Zuul 571928cbaa Merge "Refactor policies to policy in InstanceGroup DB model" 2018-07-10 22:59:35 +00:00
Zuul 8286e47d72 Merge "Use nova.db.api directly" 2018-07-10 22:59:20 +00:00
Zuul 1c8cb61783 Merge "Update root providers in same tree" 2018-07-10 22:59:11 +00:00