This patch aims at deleting the records of the archived instances from
the instance_mappings and request_specs tables in the API database
immediately following their archival from instances to shadow_instances
table. So upon running the 'nova-manage db archive_deleted_rows' command
the records of the archived instances will be automatically removed from
the instance_mappings and request_specs tables as well. A warning has
also been added to fix the issue of 'nova-manage verify_instance'
returning a valid instance mapping even after the instance is deleted.
The patch also adds InstanceMappingList.destory_bulk() and
RequestSpec.destroy_bulk() methods for ease of bulk deletion of records.
Change-Id: I483701a55576c245d091ff086b32081b392f746e
Closes-Bug: #1724621
Closes-Bug: #1678056
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
Commit ace11d3 adds a serial port device to instances, so the serial
console output can be sent to a virtual serial port concentrator (VSPC).
This patch finishes the implementation by returning the output saved by
VSPC to the end user. The config option 'serial_log_dir' should have the
same value as in the VSPC configuration (i.e. it must point to the same
directory).
The VSPC implementation is available at
https://github.com/openstack/vmware-vspc
blueprint vmware-console-log-complete
Change-Id: I7e40dc41b0354d414bc8eae331f8257959e1d123
This adds the new microversion to allow providing
a description when creating a flavor, returning a
flavor description when showing flavor details, and
updating the description on an existing flavor.
Implements blueprint flavor-description
Change-Id: Ib16b0de82f9f9492f5cacf646dc3165a0849d75e
The example versioned notifications don't have any indication of
which release they are available in, and since people can link to
the 'latest' docs, like in I51d0deffc4f42ff2722a8d21aa6b8c8008c62723,
it's important to note that the samples in the latest docs might not
be in the version of nova one is actually using, e.g. ocata or pike.
So this adds a note that people should be aware of that before
relying on some versioned notification.
Change-Id: I2f7db424f0938667895b51f45ea60862a32e22c1
The testing strategy doc was linking to the hacking repo docs
on creating unit tests, which are very specific to creating
unit tests for hacking rules.
This changes the link to the 'creating unit tests' section in
the HACKING.rst file, which has more information on testing
within nova.
Along with that change, the HACKING.rst testing section is
updated a bit to point out that we use stestr now instead of
testr and adds a proper link to the development environment
quickstart docs.
The nova/tests/unit/README.rst actually needs a lot of work,
but that's left for another day.
Change-Id: Ie5106d87d632286162b31ce132e947c306d21abd
Closes-Bug: #1732024
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 adds `key_name` param to instance rebuild
API. Then the user could reset the instance keypair
when rebuilding. If set key_name to None, the API
will unset the keypair of the instance.
APIImpact
Implements blueprint: rebuild-keypair-reset
Change-Id: I23886a89c25f811cfbe7e2500ce7ff52f9162966
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
In the microversion contributor doc, refresh the checklist for creating
a new microversion.
- Remove reference to "doc team"
- Add bullet about release note
- Add bullet for updating the API reference
Change-Id: I81a8cd68792f06738ee9709d07d557a37367a806
Versioned notifications are functionally tested against stored sample
data. Also most of the instance notitication shares payload structure.
Today we store a separate sample for every instance notification.
These samples store similar, mostly redundant data. When a new field
is added to the InstancePayload then every instance notification
related sample file needs to be modified. This leads to big and
redundant changes like I18af99479562e2fe5e74e6e1252b804b074fee58.
To remove the redundancy this patch proposes to use json references
in the sample files instead of copy pasting the same notification
sample fragment to every sample.
As a first step this patch introduces a small json ref resolver.
Then subsequent patches will replace the duplicated sample data
with references to common sample fragments.
This proposed resolver supports resolving the refs recursively so
a referenced json fragment can reference further fragments. However
the current implementation does not handle reference loops.
The resolver also supports overriding parts of the referenced
json fragment to support content customization needed in the next
patch.
Change-Id: Ic3ab7d60e4ac12b767fe70bef97b327545a86e74
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
I put out a new placement microversion [1] and initially missed updating
the API reference documentation [2]. I'd like to say it would have
helped if the checklist in the Microversion section of the contributor
doc had been up to date, except I didn't even know about that document
at the time. Anyway, this change set adds that bullet - and I'll know
to refer to it next time.
[1] https://review.openstack.org/499826
[2] https://review.openstack.org/515748
Change-Id: Id0329d9824eeb1d210defe0567286372b72cb1cf
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
This imports the "provide-user-data-to-instances" page
from the old openstack-manuals user guide.
Since we don't have a glossary, the :term: link is removed
and replaced with just giving the glossary definition as
the first part of the doc.
Change-Id: Iae70d9b53d6cefb3bcb107fe68499cccb71fc15e
Partial-Bug: #1714017