This patch finishes to remove the 'check_attach' call from Nova
completely. As Cinder already performs the required checks as part
of the 'reserve_volume' (os-reserve) call it is unnecessary to check the
statemachine in Nova also and it can lead to race conditions.
The missing 'reserve_volume' call is added to the BFV flow. In case of
build failure the volume will be locked in 'attaching' state until the
instance in ERROR state is cleaned up.
We also check AZ for each volume attach operation which we haven't
done for unshelve. A release note is added to enable 'cross_az_attach'
in case the user does not care about AZ.
The compute service version had to be bumped as the old computes still
perform 'check_attach', which will fail when the API reserves the
volume and the volume state moves to 'attaching'. If the computes
are not new enough the old check will be called as opposed to
'reserve_volume'.
Closes-Bug: #1581230
Change-Id: I3a3caa4c566ecc132aa2699f8c7e5987bbcc863a
We need to signal that the compute is Ocata and since the placement is now
mandatory for Ocata, we want to hard-fail if the conf is not correct.
Depends-On: I573149b9415da2a8bb3951a4c4ce71c4c3e48c6f
Change-Id: I3919f652040f2be2641420dd469af01b268e65c9
This patch adds an extra_specs key to the flavor used in the
instance action sample test to make the samples more realistic.
Change-Id: I5ec2b536469daaea16efb1ef1537a951dc52997a
Implements: bp flavor-notifications
This patch implements the versioned notifications for flavor
create and destroy.
Implement blueprint: flavor-notifications
Change-Id: Icc2169b87ffba4e7e2079076a82029156c584c6a
The aggregate.delete.start and aggregate.delete.end notifications
has been transformed to the versioned notification framework.
Implements: bp versioned-notification-transformation-ocata
Change-Id: I911e7aef813380291e6cf166eac91b53215a3726
The aggregate.create.start and aggregate.create.end notifications
has been transformed to the versioned notification framework.
The notification payload contains the 'id' of the aggregate which
is the db primary key. It is added because the REST API also
uses the db id instead of the uuid in the os-aggregates' requests
and responses.
Implements: bp versioned-notification-transformation-ocata
Change-Id: I92fe504a8f7dc19b0e1df5884045d4bc0d9e4f98
Add instance's locked field and instance's
display_description field in InstancePayload.
Implements: bp additional-notification-fields-for-searchlight
Change-Id: Iceae25ca8a0d7f2e5f22cab1364215bda2fae93c
The instance.snapshot.start and instance.snapshot.end notifications
are transformed to the versioned framework.
Change-Id: I0bde5fce14c181d47f5ad052a68382e01bf95524
Implements: bp versioned-notification-transformation-ocata
The instance.finish_resize.start and instance.finish_resize.end
notifications are transformed to the versioned framework.
Change-Id: I2ca79040a91368212fdf50593ef012a669a4a12a
Implements: bp versioned-notification-transformation-ocata
Along with the transformation changes, I modified notify_about_instance_action
method so it can handle errors now. (It wraps the exception object into an
ExceptionPayload.)
Implements: bp versioned-notification-transformation-ocata
Change-Id: I171990290c8de529c9521a5ee556f97b18b741b0
We don't need image_name as an extra usage information, because
in the versioned notification, we have image_uuid which can be used
to get the name of the image from glance, if needed.
Change-Id: I1f3ea8d74a2e59049447c3045a293ce0babfb427
Implements: bp versioned-notification-transformation-ocata
Instance.shutdown.start and instance.shutdown.end notifications
are transformed to the new versioned framework.
Change-Id: I01732837cf5a54ecd04b00771bac92c9864cd3b0
Implements: bp versioned-notification-transformation-ocata
The instance.unpause.start and instance.unpause.end notifications
are transformed to the versioned framework.
Change-Id: Ia11b63b93ac941bf6922abfe9c380c9647ee7f83
Implements: bp versioned-notification-transformation-ocata
The instance.unshelve.start and instance.unshelve.end
notifications are transformed to the versioned framework.
Change-Id: Ie3fe83a6b18a1a09a8d8aab75b41297c62cdb74b
Implements: bp versioned-notification-transformation-ocata
The instance.resume.start and instance.resume.end notifications
are transformed to the versioned framework using the generic
InstanceActionNotification and InstanceActionPayload class.
Implements: bp versioned-notification-transformation-ocata
Change-Id: I923971ea2f6c1f450ace27b246aa6f372a72bb30
Instance.shelve_offload.start and instance.shelve_offload.end notifications
are transformed to the new versioned framework.
Change-Id: Ifccb61527854cdc1a4ceef34059710b5fd802ff9
Implements: bp versioned-notification-transformation-ocata
The instance.power_off.start and instance.power_off.end notifications
are transformed to the versioned framework.
Change-Id: I45b7b2175f318747158564eb14e21129add86fe9
Implements: bp versioned-notification-transformation-ocata
Add the following notification when swapping volumes.
* 'instance.volume_swap.error'
Change-Id: I90d4ffcb2ffc318de2365a655b5fde8bb6c05ff2
Implements: blueprint add-swap-volume-notifications
Add the following notifications when swapping volumes.
* 'instance.volume_swap.start'
* 'instance.volume_swap.end'
A subsequent patch will add 'instance.volume_swap.error'.
Change-Id: Ic4d9d25bdc611221157e4663817e918b8d667ce9
Implements: blueprint add-swap-volume-notifications
Make aggregate.create() and destroy() use the API rather than cell database.
Also block aggregate creation until main database empty. This makes
Aggregate.create() fail until the main database has had all of its aggreagtes
migrated. Since we want to avoid any overlap or clashes in integer ids we
need to enforce this.
Note that this includes a change to a notification sample, which encodes
the function and module of a sample exception (which happens to be during
an aggregate operation). Since the notifications are encoding internal
function names, which can and will change over time, this is an expected
change.
blueprint cells-aggregate-api-db
Co-Authored-By: Dan Smith <dansmith@redhat.com>
Change-Id: Ida70e3c05f93d6044ddef4fcbc1af999ac1b1944
The instance.restore.start and instance.restore.end notifications
are transformed to the versioned framework.
Change-Id: I4459ec05a7153af7a0f04adcccb9d99cb5f661e5
Implements: bp versioned-notification-transformation-newton
This service version indicates that the successful delete of a
BuildRequest during instance deletion will cause nova-conductor to stop
a build when it notices that the BuildRequest is gone. This simplifies
the delete code for dealing with pre-scheduled instances.
Change-Id: I961d002cccd3e01a26cb5174e0804db7fc1f836d
The instance.resize.start and instance.resize.end notifications
are transformed to the versioned framework.
Implements: bp versioned-notification-transformation-newton
Change-Id: If5183eddb7d79712f360cde11c554e4798f86255
The instance.pause.start and instance.pause.end notifications
are transformed to the versioned framework.
Implements: bp versioned-notification-transformation-newton
Change-Id: I67979c1cd7cd221a2241846255bf2a884a9d60f5
Instance.shelve.start and instance.shelve.end notifications
are transformed to the new versioned framework.
Change-Id: Ibb52f4c9d8ec10810916a6ccb2bb494db7300d05
Implements: bp versioned-notification-transformation-newton
The instance.suspend.start and instance.suspend.end
notifications are transformed to the versioned notifications
framework.
Change-Id: I6a90019773c415db9d27c893eb64466ae101b7d7
Implements: blueprint versioned-notification-transformation-newton
Depends-On: #313654
The instance.power_on.start and instance.power_on.end notifications
are transformed to the versioned framework.
Change-Id: I4e4fd701a59064b89e38b50dcc01c9d8846a09b0
Implements: bp versioned-notification-transformation-newton
The instance.delete.start and instance.delete.end notifications
are transformed to the versioned framework using the generic
InstanceActionNotification and InstanceActionPayload class.
There is no instance.delete.error notification in legacy so
it is not added here but considered as a future improvement.
Change-Id: Iddbe50ce0ad3c14562df800bbc09ec5a7e840485
Implements: bp versioned-notification-transformation-newton
This patch allows the network manager(s) to set virtual device tags if
they are present during allocation.
Implements: blueprint virt-device-role-tagging
Co-authored-by: Vladik Romanovsky <vromanso@redhat.com>
Co-authored-by: Dan Smith <dansmith@redhat.com>
Change-Id: I8367f740d6d4ebaeb81bc74c6a82a8faf5cd8308
Removes a longstanding TODO to update this method to handle instance
objects. The method is not actually used anywhere so there are no
upgrade concerns, but proper protocol is observed regardless.
Change-Id: Ieaf538fa2dc5c4a15574cc6aacac26abbac3b5a2
The REST API is going to be checking that all computes
in the deployment are running new enough code to support
network requests with the special 'auto' and 'none' values
for Get Me a Network, so we need to bump the service version
which can be used as the minimum version to check.
Part of blueprint get-me-a-network
Change-Id: Ia1af75422d5e1fd4535c1ed9703d855239282559
A new versioned notification is emitted from the wrap_exception
decorator.
Change-Id: I8fcbce111537dae6ad3ba0961fb761540ae800ed
Partially-Implements: bp versioned-notification-transformation-newton
During force_live_migration operation there are 2
checks of migration status, one on api layer and one on
compute side, second one requires rpc request to be done
and also to query the db. This check could be removed as additional
one doesn't guarantee that live_migration is not already completed,
also is very small window between api and compute side.
Target compute host is now taken from migration object rather
then instance.host field, which allows to guarantee that nova will not
pause already migrated instance.
Change-Id: I51585302e898251e26cbf311aeac38a0ec329001