Co-Authored-By: Gábor Antal <antal@inf.u-szeged.hu>
Change-Id: I27608f60dd5f8458e476286c6991c47dba7852b1
Implements: bp versioned-notification-transformation-queens
When trying to recreate hundreds of instance action
events for scale testing with the FakeDriver, a nice
simple way to do that is by stopping those instances
and starting them again.
However, since power_off/on aren't implemented, once
you "stop" them the sync_instance_power_state periodic
task in the compute manager thinks they are still running
on the "hypervisor" and will stop them again via the API,
which records yet another instance action and set of
events.
This just toggles the power state bit on the fake instance
in the FakeDriver to make the periodic task do the right
thing.
As a result, we also have more realistic API and
notification samples.
Change-Id: Ie621686053ad774c4ae4f22bb2a455f98900b611
The keypair.import.start and keypair.import.end notifications
has been transformed to the versioned notification framework.
Change-Id: Icadc53d84fa021aae0f9ec2e18e9125de98e00f6
Implements: bp versioned-notification-transformation-queens
Co-Authored-By: Balazs Gibizer <balazs.gibizer@ericsson.com>
Co-Authored-By: Gábor Antal <antal@inf.u-szeged.hu>
Change-Id: I10f120e4ff227f96d6c3fdd4a7123f13b84c4337
Implements: bp versioned-notification-transformation-queens
The versioned instance.snapshot.start and .end notifications now
contain the id of the image that stores the instance snapshot.
Change-Id: I1c8c038078bbe1a5914a92d44b3e977287294a88
Implements: bp versioned-notification-transformation-queens
In I18e7483ec9a484a660e1d306fdc0986e1d5f952b BDM was added to the instance
notifications. In general to add BDM to the payload an exta DB query is
needed. However in some places the BDM is already separately before the
notify_about_instance_action is called to send the notification. In this cases
loading the BDM again is unnecessary as the already loaded BDM can be reused.
This patch makes sure that notify_about_instance_action is called with the
already loaded BDM. There will be subsequent patches to do the same with
other notify calls.
Change-Id: I391554d3904a5a60b921ef4714a1cfd0a64a25c2
Related-Bug: #1718226
We need to do this so we can have a migration uuid at the time we
call to scheduler to allocate for the new host. This just does the
plumbing through the RPC layers. The compute-side code can already
tolerate a migration having been already created for things like
live migration, so we just have to plumb it through.
Related to blueprint migration-allocations
Change-Id: I6bc6d28655368084f08fed9c4f56a285b7063338
Based on the following discussion:
http://lists.openstack.org/pipermail/openstack-dev/2017-September/121978.html
removeFixedIp action is deprecated, so instead of transforming its
notification, the instance.interface_detach versioned notification is
introduced.
Change-Id: Id4fa9eba59ef958ce514d9eb43346adf095b8b6e
Implements: blueprint versioned-notification-transformation-queens
If the MoveClaim during an evacuate fails we need to
remove the destination node allocation since the
ResourceTracker isn't going to do it.
This also fixes test_rebuild_server_exc which was faking
a rebuild failure by raising an error that would not
actually happen during a rebuild. ComputeResourcesUnavailable
only happens if a claim fails, and for a rebuild, which
is on the same host that the instance is already on, doesn't
involve a claim attempt.
Change-Id: I59ff47bf773c9831d0f44e1caf7877fe08c911c3
Closes-Bug: #1713786
The instance.resize.error notification
is transformed to the versioned framework.
Change-Id: Ieb4ae4605fee8fbf58de4c5efb3c00083b4bd62c
Implements: bp versioned-notification-transformation-queens
The aggregate.remove_host.start and aggregate.remove_host.end notifications
has been transformed to the versioned notification framework.
Note that the legacy event_type was aggregate.removehost but the versioned
notification is named to aggregate.remove_host to keep the naming consistent
with the other event_types.
Implements: bp versioned-notification-transformation-queens
Change-Id: I5cb84eb797ca98964a04b5b495fba263db98a54f
Transform server group delete notification to the versioned
notification framework.
Co-Authored-By: Gábor Antal <antal@inf.u-szeged.hu>
Change-Id: I03890877118a283f9cc22eec2c7456bd2016a6ba
Implements: bp versioned-notification-transformation-queens
The aggregate.add_host.start and aggregate.add_host.end notifications
has been transformed to the versioned notification framework.
Note that the legacy event_type was aggregate.addhost but the versioned
notification is named to aggregate.add_host to keep the naming consistent
with the other event_types.
Implements: bp versioned-notification-transformation-queens
Change-Id: I980d89f47b944116e5fc9cedd74c43bbd88fbeae
Transform server group create notification to the versioned
notification framework.
Co-Authored-By: Gábor Antal <antal@inf.u-szeged.hu>
Change-Id: I781975293ccef40670cf474dd1d475cb427dba63
Implements: bp versioned-notification-transformation-queens
The keypair.delete.start and keypair.delete.end notifications
has been transformed to the versioned notification framework.
Change-Id: I48f28a56f9232faf52f458588500a9d77eb6b679
Implements: bp versioned-notification-transformation-queens
Because we need to allow for a smooth upgrade from Ocata to
Pike, we need Pike compute hosts to be tolerant of the bad accounting
assumptions that Ocata compute hosts were making. If a user migrates an
instance from an Ocata compute host to a Pike compute host, the Ocata
compute host will continue essentially re-setting the instance
allocation to be an allocation against only the source Ocata host
(during the migration operation). We need to have the Pike destination
compute host recognize when its in a mixed Ocata/Pike environment and
tolerate this incorrect "healing" that the Ocata source host will do.
To tolerate this, the Pike destination compute host must continue to
behave like an Ocata compute host until all compute hosts are upgraded
to Pike or beyond.
Note that this adds service version caching for the compute service.
We were already doing the lookup for the RPC pin and caching that,
so this is not much of a change. Also note that we weren't clearing
this caching in tests, so any test that ran code that cached the
service version would affect later ones. This clears it as part of the
base test setup too.
Co-Authored-By: Jay Pipes <jaypipes@gmail.com>
Change-Id: Ia93168b1560267178059284186fb2b7096c7e81f
This patch added a new field 'tags' to InstanceCreatePayload.
Partial-implement: bp additional-notification-fields-for-searchlight
Partial-implement: blueprint support-tag-instance-when-boot
Change-Id: Iefaa9da4e136fd5e823bf7b11c8aa5b4cd6d7de8
This patch adds bdm related data to InstancePayload. As loading BDM
can be expensive a new configuration flag 'bdms_in_notifications' is
introduced. If this is set to false (as by default) then the instance
notifications will contain 'null' value in block_devices field.
If this configuration flag is set to true then the block devices will
be loaded from the db and will be included in the notification payload.
Implements: bp additional-notification-fields-for-searchlight
Change-Id: I18e7483ec9a484a660e1d306fdc0986e1d5f952b
This adds the support for new style volume attachments
to the swap volume operation.
If the existing volume attachment (old_volume) was created
using the new flow, it will have attachment_id set. Based
on that the API will create a new volume attachment for the
volume being swapped to and then pass that attachment to the
compute over RPC. Note that we do not yet create new-style
volume attachments so this is all no-op code for now. And
when we do start creating new-style volume attachments, that
will only be allowed when Cinder is new enough (3.27 microversion)
and all compute services are upgraded, so we don't perform
any nova-compute service version checks here.
Once on the compute, we key off the new_attachment_id being
passed from the API to tell if we should use the old or new
style calls to Cinder. For example, initialize_connection and
terminate_connection are replaced with attachment_update and
attachment_delete.
Co-Authored-By: Matt Riedemann <mriedem.os@gmail.com>
Co-Authored-By: John Griffith <john.griffith8@gmail.com>
Depends-On: I23391300468cc5e2f45a12d5ad8617ab48c21e6a
Partially Implements: blueprint cinder-new-attach-apis
Change-Id: I4b8bd01f1ffe2640fe7313213bf853d2e1bef9dd
Add key_name field to InstancePayload which means every instance.<action>
notification now have key_name field based on the instance.key_name.
Change-Id: I39059c5077c790aa85dff6b4563f581c54536b86
Implements: bp additional-notification-fields-for-searchlight
Add keypairs field to instance.create notifications based on
instance.keypairs field.
Change-Id: I30e068d4de4b45f34308665de37d4cb9d6502111
Implements: bp additional-notification-fields-for-searchlight
This patch adds support to the compute manager and Neutron API for
tagged attach for network interfaces.
Change-Id: I3ca96e6d791d609db8bf4368a3c71f880de8e7ad
Implements: blueprint virt-device-tagged-attach-detach
This patch adds support to the compute manager and API for tagged
attachment of block devices.
Change-Id: I1f25f8098a495c49e7021eb92b2cd5f048ced484
Implements: blueprint virt-device-tagged-attach-detach
The instance.soft_delete.start and instance.soft_delete.end notifications
are transformed to the versioned framework.
Change-Id: I608b13f843a623f549b38459902aaff287254a95
Co-Authored-By: Jin Li <jl7351@att.com>
Implements: bp versioned-notification-transformation-pike
There are two parallel efforts to add new fields to the instance.create
notification only. Currently instance.create notification uses the generic
InstanceActionPayload ovo as the payload type. This patch creates a separate
InstanceCreatePayload ovo so that fields like keypairs and tags can be added
only to this specific payload class later in separate patches.
The keypair and tags field are not added directly to the base InstancePayload
class because both field need extra db query to fetch. So sending them at
every instance action (e.g. reboot) could cause db load.
The version of the instance.create payload is not bumped as the content
of the payload is the same just the name of the type is changed.
Change-Id: I90fb7beb450100de8f4e542921b99f043c529a0f
The keypair.create.start and keypair.create.end notifications
has been transformed to the versioned notification framework.
Change-Id: I71e9d8dae55653ad3ee70f708a6d92c98ed20c1c
Implements: bp versioned-notification-transformation-pike
The current rebuild testing in test_instance_action changes the image
used by the instance, therefore the actions tested in
test_instance_action had to be in specific order as testing rebuild
also changes the output json.
The rebuild test was moved from test_instance_action to its own method,
and now all the actions in test_instance_actions keeps the instance in
the same state.
Change-Id: Id0a7aaf8575d69deb89d3842b54fc23ee05b2153
Implements: bp versioned-notification-transformation-pike
This patch adds notifications when instance
tags changed, as tag is commonly used for
searching and filtering, and projects like
searchlight depends on the notifications.
To avoid unnecessarily building a notification
payload when notifications are disabled, this
change also adds the if_notifications_enabled
decorator to send_instance_update_notification.
Change-Id: I03c8e8225e51fd80580772752c0b292987e34218
Implements: bp send-tag-notification