Commit Graph

2584 Commits

Author SHA1 Message Date
Zuul fdf50a1a62 Merge "cleanup mapping/reqspec after archive instance" 2017-11-21 19:04:28 +00:00
Zuul aa170b0088 Merge "Deduplicate keypair notification samples" 2017-11-21 16:31:06 +00:00
Surya Seetharaman 32fd58813f cleanup mapping/reqspec after archive instance
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
2017-11-21 15:28:07 +01:00
Zuul 1da7510aeb Merge "Add a note about versioned notification samples being per-release" 2017-11-21 12:27:09 +00:00
Zuul 82217e6308 Merge "Using --option ARGUMENT" 2017-11-21 12:26:50 +00:00
Zuul 190579d19a Merge "Fix format in live-migration-usage.rst" 2017-11-21 12:26:44 +00:00
Zuul f7da17b8e3 Merge "[placement] Fix a wrong redirection in placement doc" 2017-11-21 12:23:07 +00:00
Zuul 9633ebdf37 Merge "VMware: serial console log (completed)" 2017-11-21 10:57:15 +00: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
Radoslav Gerganov d9c03b1ecb VMware: serial console log (completed)
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
2017-11-17 16:10:26 +02:00
Zuul b28924b8e4 Merge "doc: fix link to creating unit tests in contributor guide" 2017-11-16 10:35:01 +00:00
Matt Riedemann 034d7f3795 Add microversion to allow setting flavor description
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
2017-11-15 22:10:39 +00:00
Matt Riedemann 94ca0b9023 Add a note about versioned notification samples being per-release
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
2017-11-15 20:42:06 +00:00
Zuul 6535abdaaa Merge "Fix indent in configuring-migrations.rst" 2017-11-15 20:30:26 +00:00
Zuul adb1f161df Merge "Deduplicate server_group samples" 2017-11-14 22:16:50 +00:00
Matt Riedemann 85235d229b doc: fix link to creating unit tests in contributor guide
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
2017-11-14 11:22:43 -05: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 3f65e8043b Merge "Enable reset keypair while rebuilding instance" 2017-11-13 20:59:33 +00:00
Zuul 93d2c5e168 Merge "placement: Contributor doc microversion checklist" 2017-11-13 16:42:04 +00:00
Zuul d3afb7146f Merge "Update contributor microversion doc for compute" 2017-11-13 16:34:13 +00:00
LIU Yulong 751f5dec11 Enable reset keypair while rebuilding instance
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
2017-11-13 10:49:02 +08: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
Zuul a41c484d3e Merge "Factor out duplicated notification sample data" 2017-11-11 01:50:36 +00:00
Takashi NATSUME e69f0f1d95 [placement] Fix a wrong redirection in placement doc
Change-Id: I9f404838c36618f5d632c6fb77b69287263f2611
2017-11-06 23:44:05 +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
Luong Anh Tuan fb9e4ca578 Using --option ARGUMENT
The OpenStack CLI commands support both --option ARGUMENT and --option=ARGUMENT.
In technical publications, use --option ARGUMENT.[1]

[1]https://docs.openstack.org/doc-contrib-guide/writing-style/code-conventions.html

Change-Id: Ifbf44c2bd9d7bec9308c6fb2c0340fb48811a653
2017-11-06 00:45:13 +00:00
Eric Fried 3e55e77609 Update contributor microversion doc for compute
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
2017-11-03 14:22:18 +00:00
Balazs Gibizer 5a5155ea4e Factor out duplicated notification sample data
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
2017-11-03 11:36:57 +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
Eric Fried ab5e2e00d2 placement: Contributor doc microversion checklist
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
2017-10-31 15:07:57 -05:00
David Rabel 1d81fc891e Fix format in live-migration-usage.rst
It is :command:`some_command` instead of :command:``some_command``.

Change-Id: I8300c55a247d30cb9db93e5025d79d0fdc24cf5e
2017-10-31 12:40:10 +00:00
Zuul 8350f20167 Merge "Transform keypair.import notification" 2017-10-31 00:26:33 +00:00
Zuul 965f56d7d2 Merge "Transform instance.trigger_crash_dump notification" 2017-10-30 21:25:47 +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
David Rabel 95c3eeb9be Fix indent in configuring-migrations.rst
Change-Id: Iec2f9b5b497a552c407d75278b0cd3c4c0a8deb6
2017-10-28 16:19:45 +02:00
Zuul e4c96de821 Merge "Import user-data page from openstack-manuals" 2017-10-26 01:04:50 +00:00
Zuul a921ebfd5c Merge "Import the config drive docs from openstack-manuals" 2017-10-26 01:04:44 +00:00
Matt Riedemann 3fc85389e5 Import user-data page from openstack-manuals
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
2017-10-24 12:22:34 -04:00