Finish up removing these entries from the versioned instance
notifications. They're useless since we dropped support for the XenAPI
virt driver. The underlying model is retained for now: that will be
handled separately.
Change-Id: I774c50fca99bc655ca5010e3b9d8247b739293b3
Signed-off-by: Stephen Finucane <stephenfin@redhat.com>
This one is a little more involved because there are persistent objects
and versioned notifications to worry about, neither of which we can
remove right now.
Change-Id: Ic7c330ee1cccdc44a2a555c16cb6090eecbf6ce1
Signed-off-by: Stephen Finucane <stephenfin@redhat.com>
This patch adds a new parameter ``locked_reason`` to
``POST /servers/{server_id}/action`` request where the
action is lock. It enables the user to specify a reason when locking
a server.
The locked_reason will be exposed through ``GET servers/{server_id}``,
``GET /servers/detail``, ``POST /servers/{server_id}/action`` where
the action is rebuild and ``PUT servers/{server_id}`` requests' responses.
The InstanceActionNotification will emit the locked_reason
along with the other instance details. This patch hence changes the
payload object to include the "locked_reason" field.
Note that "locked" will be allowed as a valid filtering/sorting parameter
for ``GET /servers/detail`` and ``GET /servers`` from this new microversion.
Implements blueprint add-locked-reason
Change-Id: I46edd595e7417c584106487123774a73c6dbe65e
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
The instance.rebuild_scheduled notification has been transformed
to the versioned notification framework.
Co-Authored-By: Takashi Natsume <natsume.takashi@lab.ntt.co.jp>
Change-Id: I640562b8dd049ff5b6fea9286dc3082b9d837ed3
Implements: bp versioned-notification-transformation-rocky
The instance.live_migration_post.start and
instance.live_migration_post.end notifications have been transformed to
the versioned notification framework.
Co-Authored-By: Alex Szarka <szarka@inf.u-szeged.hu>
Co-Authored-By: Takashi Natsume <natsume.takashi@lab.ntt.co.jp>
Change-Id: If9993d5edab5a2f141387a8eb294a9645667ee6b
Implements: bp versioned-notification-transformation-rocky
The instance.live_migration_rollback_dest.start and
instance.live_migration_rollback_dest.end notifications has been
transformed to the versioned notification framework.
Co-Authored-By: Takashi Natsume <natsume.takashi@lab.ntt.co.jp>
Change-Id: I8129cbd1785133d4cc1b70bbba6bd7fcc1d21f4a
Implements: bp versioned-notification-transformation-rocky
The instance action notifications contain the user id and the
project id of the owner of the instance. However an instance
action might be initiated by another user. It could be another
user from the same project or can be an admin from the admin project.
To be able to distinguish between the user who initiated the instance
action from the user owning the instance we need to add two new
fields to the instance action notifications, action_initiator_user
and action_initiator_project
Change-Id: I649d8a27baa8840bc1bb567fef027c749c663432
Closes-bug: #1744658
Blueprint: add-action-initiator-to-instance-action-notifications
The instance.unlock versioned notification is introduced in this
patch.
The unlock operation just changes the instance.locked to False in
API, we send the notification after db operation.
Change-Id: Ic750c33b4f88ba9c62ea8cba86915c6010f2cd6f
blueprint: trigger-notifications-when-lock-unlock-instances
The instance.lock versioned notification is introduced in this
patch.
The lock operation just changes the instance.locked to True in
API, we send the notification after db operation.
Change-Id: I03a13afa91c29f4fee25336cb82ea5c887eae2f8
blueprint: trigger-notifications-when-lock-unlock-instances
Add the 'trusted_image_certificates' field to InstanceCreatePayload
and InstanceActionRebuildPayload notifications.
Change-Id: Ib5b50a3889ab15d5aac992f92e9be372a915eeff
This patch contains the instance.exists related notification
transformation. The functional test for instance_usage_audit
periodic task case is added in a subsequent patch.
Change-Id: I1a0afa0e8740c229db77c18b932e316196880de5
Implements: bp versioned-notification-transformation-rocky
As it was agreed on the Rocky PTG [1] it is useful to have the
request_id of in the payload of every instance action versioned
notification. For example it could help the deployer connect
the state change described in the notification with the user
action, the request, on the REST API.
So this patch proposes to extend the InstanceActionPayload
versioned object with a new request_id field and populate
the request_id from the context object used for emitting
the instance action notifications.
[1] https://etherpad.openstack.org/p/nova-ptg-rocky L391
Implements: bp add-request-id-to-instance-action-notifications
Change-Id: I7243b60938d6e9c7c2bc2aacdba5c667cca8ec9b
The following notifications has been transformed to
the versioned notification framework.
* live_migration.post.dest.start
* live_migration.post.dest.end
Co-Authored-By: Takashi Natsume <natsume.takashi@lab.ntt.co.jp>
Change-Id: I510136a7eb0a832dfe469cb68d06d1b9472d9ae4
Implements: bp versioned-notification-transformation-rocky
The instance.resize_prep.start and instance.resize_prep.end
notifications are transformed to the versioned framework.
Co-Authored-By: Takashi Natsume <natsume.takashi@lab.ntt.co.jp>
Change-Id: If33d092e8688ed4d4864b2f7130104ab85ce1ea4
Implements: bp versioned-notification-transformation-queens
Co-Authored-By: Takashi Natsume <natsume.takashi@lab.ntt.co.jp>
Co-Authored-By: Gábor Antal <antal@inf.u-szeged.hu>
Change-Id: Ie1914b1f5f71c23dd441dafaea9e4261541d338d
Implements: bp versioned-notification-transformation-queens
The instance.resize_confirm.start and instance.resize_confirm.end
notifications are transformed to the versioned framework.
Change-Id: I6a51542216340299d250576714e303f74e0ceb0f
Co-Authored-By: Takashi Natsume <natsume.takashi@lab.ntt.co.jp>
Co-Authored-By: stewie925 <st3wty@att.com>
Co-Authored-By: MikeG451 <michael.glaser@att.com>
Implements: bp versioned-notification-transformation-queens
The rescue (instance.rescue.start and instance.rescue.end) and unrescue
(instance.unrescue.start and instance.unrescue.end) notifications are
transformed to the versioned framework.
This patch also fixes the power state of the server
when unrescuing it with the fake compute driver.
Co-Authored-By: Takashi Natsume <natsume.takashi@lab.ntt.co.jp>
Change-Id: Ib1d03c6d693e3b04886c638c956e35809fed8fc2
Implements: bp versioned-notification-transformation-queens
Closes-Bug: #1742133
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
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
The instance.snapshot.start and .end notification sample file was
attached to two different Notification ovo by mistake. This caused that
the samples are appeared in the notification dev-ref twice.
This patch removes the duplication and adds a simple check to the doc
generation code to detech such problems in the future.
Change-Id: I8478c134f9cdb08c02a44e1838dbacede5523914
Closes-Bug: #1732685
Co-Authored-By: Gábor Antal <antal@inf.u-szeged.hu>
Change-Id: I27608f60dd5f8458e476286c6991c47dba7852b1
Implements: bp versioned-notification-transformation-queens
Add the 'instance-interface_attach-error' notification sample
to the nova document.
Change-Id: Ife45fd30fd723675b45c7170e02358ab352e05e0
CLoses-Bug: #1728884
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 the BDM is already locaded before the
notify_about_instance_create 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_create is called with the
already loaded BDM.
The remaining instance related versioned notification calls does not have
BDM already loaded.
Change-Id: Ic25de45c18348206f0309da6d4997f4bf336acb2
Closes-Bug: #1718226
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
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
The instance.resize.error notification
is transformed to the versioned framework.
Change-Id: Ieb4ae4605fee8fbf58de4c5efb3c00083b4bd62c
Implements: bp versioned-notification-transformation-queens
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
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
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
To avoid cyclic dependency a local import is introduced in
I1399d15285677aab4dd79704d21fbaf2bb5e1361 but it can be
removed with a small refactoring as proposed here.
The original get_nw_info_for_instance() is kept in nova.compute.utils
as a proxy to avoid changes in a lot of other source files. That
removal will be done in a subsequent patch.
Change-Id: I32231126483d419358acc40d353edd45af744a1f