Commit Graph

151 Commits

Author SHA1 Message Date
Zuul bd93b3266a Merge "Transform instance.resize_revert notification" 2017-12-05 10:03:36 +00:00
stewie925 ac0745babd Transform instance.resize_revert notification
The instance.resize_revert.start and instance.resize_revert.end
notifications are transformed to the versioned framework.

Change-Id: Ia86c8804b284ed4ad72a1993c454ec373c063b99
Implements: bp versioned-notification-transformation-queens
2017-12-04 20:54:39 -05:00
Zuul b9d9de8962 Merge "Versioned notifications for service create and delete" 2017-11-27 19:41:04 +00:00
liyingjun 8e793a6c6f Versioned notifications for service create and delete
New notifications service.create and service.delete are introduced
with INFO priority and the payload of the notification is the serialized
form of the already existing Service versioned object. Service.create
notification will be emitted after the service is created (so the uuid
is available) and also send the service.delete notification after the
service is deleted.

Implement blueprint: service-create-destroy-notification

Change-Id: I955d98f9fd4b121f98e172e5ab30eb668a24006d
2017-11-27 11:11:44 -05:00
Zuul 491052995a Merge "Transform instance-live_migration_pre notification" 2017-11-23 12:47:43 +00:00
Béla Vancsics 2578a308e6 Transform instance-live_migration_pre notification
The instance.live_migration_pre.start and instance.live_migration_pre.end
notifications has been transformed to the versioned notification framework.

Co-Authored-By: Elod Illes <elod.illes@ericsson.com>
Change-Id: Ied6e9016e7406365c9d0beb281eeb31b7d0cf71b
Implements: bp versioned-notification-transformation-queens
2017-11-22 16:59:13 +01:00
Előd Illés de9ce26c73 Deduplicate keypair notification samples
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
2017-11-20 16:30:21 +01:00
Zuul adb1f161df Merge "Deduplicate server_group samples" 2017-11-14 22:16:50 +00:00
Matt Riedemann 48259c2bd7 Add FlavorPayload.description for versioned notifications
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
2017-11-14 09:14:12 -05:00
Előd Illés c3dc5c5c43 Deduplicate server_group samples
This patch refactors the sample files of server_group notifications to
use a common ServerGroupPayload sample data.

Change-Id: I4e7531c180484a7b430d267153d185f1006543f0
2017-11-14 13:06:40 +01:00
Zuul 8771db8ca9 Merge "Deduplicate instance.reboot notification samples" 2017-11-11 02:13:18 +00:00
Zuul a7c29fa7e6 Merge "Deduplicate instance.live_migration notification samples" 2017-11-11 02:13:12 +00:00
Zuul f30793ce86 Merge "Deduplicate instance.interface_attach samples" 2017-11-11 02:13:06 +00:00
Zuul b649190ca8 Merge "Deduplicate instance.power-off notification samples" 2017-11-11 02:13:01 +00:00
Zuul b84f2c025d Merge "Deduplicated instance.(un)pause notification samples" 2017-11-11 01:55:13 +00:00
Zuul 8b174196c1 Merge "Factor out duplicated notification sample data (2)" 2017-11-11 01:55:07 +00:00
Balazs Gibizer 41c86ff103 Deduplicate instance.reboot notification samples
This patch refactors the sample files of instance.reboot notifications
to use the previously introduced common sample data.

Change-Id: I6a9e8af79153a9b7825aef0838b60a8d1f97a421
2017-11-06 16:18:22 +01:00
Balazs Gibizer 397535ba2d Deduplicate instance.live_migration notification samples
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
2017-11-06 16:13:47 +01:00
Balazs Gibizer da0e385c4b Deduplicate instance.interface_attach samples
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
2017-11-06 16:10:19 +01:00
Balazs Gibizer 10d3e240c2 Deduplicate instance.power-off notification samples
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
2017-11-06 16:07:33 +01:00
Alex Szarka b4b61240f7 Transform instance-live_migration_abort notification
Co-Authored-By: Gábor Antal <antal@inf.u-szeged.hu>
Change-Id: I27608f60dd5f8458e476286c6991c47dba7852b1
Implements: bp versioned-notification-transformation-queens
2017-11-06 16:05:16 +01:00
Balazs Gibizer 45adc60b1d Deduplicated instance.(un)pause notification samples
This patch refactors the sample files of instance.pause and unpause
notifications to use the previously introduced common sample data

Change-Id: I767f082ca244b9f4f940244ab83f69c6e995a442
2017-11-06 16:03:08 +01:00
Balazs Gibizer 4b783a206c Factor out duplicated notification sample data (2)
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
2017-11-06 15:54:09 +01:00
Matt Riedemann 211e9b1961 Implement power_off/power_on for the FakeDriver
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
2017-11-02 11:34:42 -04:00
Zuul 8350f20167 Merge "Transform keypair.import notification" 2017-10-31 00:26:33 +00:00
Béla Vancsics a4c7ab8851 Transform keypair.import notification
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
2017-10-30 16:44:29 -04:00
Béla Vancsics cfa4bfedbb Transform instance.trigger_crash_dump notification
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
2017-10-20 18:40:54 +02:00
Jenkins 871c824328 Merge "Add snapshot id to the snapshot notifications" 2017-10-12 19:52:13 +00:00
Balazs Gibizer 581c537cf5 Add snapshot id to the snapshot notifications
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
2017-10-12 09:13:13 +00:00
Jenkins d70bfd78fa Merge "Transform aggregate.remove_host notification" 2017-10-10 22:34:39 +00:00
Jenkins 253aad457f Merge "Transform aggregate.add_host notification" 2017-10-10 15:34:10 +00:00
Jenkins d3daf15e7b Merge "use already loaded BDM in instance.<action>" 2017-10-09 21:18:39 +00:00
Jenkins 1f30865d6f Merge "Pre-create migration object" 2017-10-09 17:30:02 +00:00
Balazs Gibizer c4fadfd4d2 use already loaded BDM in instance.<action>
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
2017-10-09 17:50:12 +02:00
Előd Illés 06231be9ed Add error notification for instance.interface_attach
Change-Id: Idde2e36658d2fd98444fb0780899bfca32dd2d6e
Implements: bp versioned-notification-transformation-queens
2017-10-06 13:45:11 +00:00
Dan Smith 9868a4d9c1 Pre-create migration object
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
2017-10-05 13:49:15 -07:00
Jenkins e4f89ed5dd Merge "Add instance.interface_detach notification" 2017-10-05 11:30:31 +00:00
Jenkins b3c76529af Merge "Add instance.interface_attach notification" 2017-10-05 11:29:53 +00:00
Előd Illés 08599b0892 Add instance.interface_detach notification
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
2017-09-22 14:32:34 +02:00
Jenkins c40eb08f64 Merge "Transform servergroup.delete notification" 2017-09-21 19:41:01 +00:00
Jenkins 3cf375580d Merge "Transform servergroup.create notification" 2017-09-21 19:37:09 +00:00
Előd Illés 5a70f23ec5 Add instance.interface_attach notification
Based on the following discussion:
http://lists.openstack.org/pipermail/openstack-dev/2017-September/121978.html

addFixedIp action is deprecated, so instead of transforming the
instance.add_fixed_ip notification (https://review.openstack.org/#/c/332876),
instance.interface_attach versioned notification is introduced.

Change-Id: Id8d2c48c9c864554a917596e377d30515465fec1
Implements: bp versioned-notification-transformation-queens
2017-09-21 16:56:42 +02:00
Jenkins f01bda973a Merge "Remove dest node allocation if evacuate MoveClaim fails" 2017-09-12 21:05:36 +00:00
Matt Riedemann 5bc137f7eb Remove dest node allocation if evacuate MoveClaim fails
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
2017-09-12 11:15:38 -04:00
Béla Vancsics 804dd877dc Transform instance.resize.error notifications
The instance.resize.error notification
is transformed to the versioned framework.

Change-Id: Ieb4ae4605fee8fbf58de4c5efb3c00083b4bd62c
Implements: bp versioned-notification-transformation-queens
2017-09-12 14:18:58 +00:00
Balazs Gibizer 6c99eb49c3 Transform aggregate.remove_host notification
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
2017-09-08 16:24:10 +02:00
Béla Vancsics 7f864ff452 Transform servergroup.delete notification
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
2017-09-08 13:01:20 +00:00
Balazs Gibizer 8204b2492b Transform aggregate.add_host notification
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
2017-09-08 14:14:00 +02:00
ShunliZhou 5537840edf Transform servergroup.create notification
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
2017-09-08 10:37:29 +08:00
Jenkins 4beb9ced8f Merge "Transform keypair.delete notification" 2017-09-07 22:19:03 +00:00