This patch refactors the sample files of keypair-create, keypair-delete
and keypair-import notifications to use a common KeypairPayload sample
data.
Change-Id: Ic8f2d51fe4922cd7633b0d77dc86702798bae1d6
This adds the description field to the FlavorPayload
for versioned notifications on flavor create/update/delete
notifications.
Part of blueprint flavor-description
Change-Id: I9a5dc8b603b5e4e0d37c59cf2749e3ffc217580c
This patch refactors the sample files of server_group notifications to
use a common ServerGroupPayload sample data.
Change-Id: I4e7531c180484a7b430d267153d185f1006543f0
This patch refactors the sample files of instance.reboot notifications
to use the previously introduced common sample data.
Change-Id: I6a9e8af79153a9b7825aef0838b60a8d1f97a421
This patch refactors the sample files of instance.live_migration_rollback
notification samples to use the previously introduced common sample
data. This patch is small as the other live migration notification
transformations haven't been merged yet.
Change-Id: I834c2d5ce0257b053f7023eae55d4c9e6c9a47e1
This patch refactors the sample files of instance.interface_attach and
interface_detach notifications to use the previously introduced common
sample data.
Change-Id: I74396b680f35290e32f667d2ddba227e1cbbab2f
This patch refactors the sample files of instance.power-off and
power-on notifications to use the previously introduced common sample
data.
Change-Id: Ifead36ba0dcef86e98e82819c48255d2d9f06d37
Co-Authored-By: Gábor Antal <antal@inf.u-szeged.hu>
Change-Id: I27608f60dd5f8458e476286c6991c47dba7852b1
Implements: bp versioned-notification-transformation-queens
This patch refactors the sample files of instance.pause and unpause
notifications to use the previously introduced common sample data
Change-Id: I767f082ca244b9f4f940244ab83f69c6e995a442
To remove duplicated data this patch introduce common json fragments for
the instance related notifications and refactors the sample file of
instance.delete.start and instance.delete.end.
The common sample fragments define an active instance as that is the
most common state in the instance action notifications. This way
we can minimize the difference between the common sample and the
generated notification. Still there will be differences. For example
instance.delete.end notification will contain different instance status
and some other deletion related fields are also set. To make sure
the the sample matches with the generated notification we have to
override some of the fields coming from the common sample fragment.
Such overrides could be added in the test case directly to the
_verify_notification() call as it is done in case of dynamic values
like instance uuid. However the sample files not only used in the
functional tests but also during the generation of the notification
dev-ref. To have meaningful samples in the doc we have to do such
overrides during the reference resolving and not directly in the
test case.
Change-Id: I0669a075c94ba2a435116791e3391d8d745bc639
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