Commit Graph

45489 Commits

Author SHA1 Message Date
Stephen Finucane ac2a4abfca Duplicate JSON line ending check to pep8
The docs job is not run in the gate, meaning invalid JSON files with
\r\n line endings are able to sneak in. Duplicate the checks from the
docs environment to the pep8 environment so that gate jobs run it.

Note that pep8 is our general linting target and thus should include
these kind of tests.

Change-Id: Ie923902b04be79b9f66ba1841c60899a413f6439
Closes-Bug: #1673131
2017-03-15 16:05:38 +00:00
Stephen Finucane 66d7ca90d8 trivial: Remove \r\n line endings from JSON sample
These are invalid and are currently causing the docs target to fail.

Change-Id: I484f5b1b4785ce7b44992ca59f993c618f3ce0c2
Partial-Bug: #1673131
2017-03-15 16:03:28 +00:00
Matt Riedemann edf51119fa Temporarily untarget context when deleting from cell0
When deleting an instance we look it up in the _get_instance
method and if it's in cell0 then the context is permanently
targeted to that cell via the set_target_cell method.

When we delete the instance in _delete we need to temporarily
untarget the context when we decrement the quota usage otherwise
the quota usage gets decremented in the cell0 database rather than
the cell database. Once the instance is deleted then we
re-apply the target cell on the context.

Change-Id: I7de87dce216835729283bca69f0eff59a679b624
Closes-Bug: #1670627
2017-03-13 13:45:03 -04:00
Matt Riedemann 018068c4ca Decrement quota usage when deleting an instance in cell0
When we fail to schedule an instance, e.g. there are no hosts
available, conductor creates the instance in the cell0 database
and deletes the build request. At this point quota usage
has been incremented in the main 'nova' database.

When the instance is deleted, the build request is already gone
so _delete_while_booting returns False and we lookup the instance
in cell0 and delete it from there, but that flow wasn't decrementing
quota usage like _delete_while_booting was.

This change adds the same quota usage decrement handling that
_delete_while_booting performs.

Change-Id: I4cb0169ce0de537804ab9129bc671d75ce5f7953
Partial-Bug: #1670627
2017-03-13 12:57:55 -04:00
Jenkins c3d6739ba5 Merge "Add regression test for bug 1670627" 2017-03-13 16:50:55 +00:00
Jenkins b867411072 Merge "conf: Fix formatting of network options" 2017-03-13 14:49:00 +00:00
Jenkins 3027d779cb Merge "Transform instance.rebuild.error notification" 2017-03-13 13:02:42 +00:00
Jenkins 2cd9a902a1 Merge "Transform instance.rebuild notification" 2017-03-13 13:00:49 +00:00
Jenkins 1ff7f65718 Merge "Correctly set up deprecation warning" 2017-03-13 12:58:15 +00:00
ghanshyam e9b193dc61 Typo fix in releasenotes: deprecate network options
This patch updates network options deprecation releasenotes
for left out comment in I3f1dbddebea846b19c0a1647595c447fefc435e2

Change-Id: I3563cd6789bef411d0713b866d68a84dc28db097
2017-03-13 09:22:42 +00:00
Gábor Antal 97084edce8 Transform instance.rebuild.error notification
Co-Authored-By: Gábor Antal <antal@inf.u-szeged.hu>
Change-Id: I8340817977ed7b15bb85d266de4fe9eedb0b0fa0
Implements: bp versioned-notification-transformation-pike
2017-03-12 11:45:19 -04:00
Alex Szarka 7e3b0ba179 Transform instance.rebuild notification
Handling rebuild.error:
https://review.openstack.org/#/c/396621/

Co-Authored-By: Béla Vancsics <vancsics@inf.u-szeged.hu>
Co-Authored-By: Gábor Antal <antal@inf.u-szeged.hu>
Change-Id: If624c2691830584851e9c97693cd7b7e73e73bb2
Implements: bp versioned-notification-transformation-pike
2017-03-12 11:40:27 -04:00
Matt Riedemann 500282d867 Add regression test for bug 1670627
This adds a functional regression test for bug 1670627.

This is the recreate scenario. Patches that are proposed to
fix the bug will build on top of this and change it's assertions
to know when it's properly fixed.

Change-Id: I872a3fd5cfd3dd869f74cd3fd0aa5da411b1fec3
Related-Bug: #1670627
2017-03-11 17:19:08 -05:00
Jenkins 0f29badb77 Merge "No API cell up-call to delete consoleauth tokens" 2017-03-11 21:54:00 +00:00
Dan Peschman 087cd64ad9 No API cell up-call to delete consoleauth tokens
One goal of Cells v2 is to remove all up-calls from compute to API
cells.  This change removes the up-call to delete consoleauth tokens
during instance deletion and live migration.  Instead, the tokens are
deleted near the start of these processes in the API cell.  To close
the loop, new consoleauth tokens are not granted to instances in
deleting or migrating task states.

Change-Id: Ic7c68b75e22bad2b0237a2f861254611a86516f3
2017-03-11 11:12:47 -08:00
Jenkins 899e4d7750 Merge "Add identity helper property to CellMapping" 2017-03-11 05:13:33 +00:00
Jenkins 5ce3fada48 Merge "Remove a dead cinder v1 check" 2017-03-11 03:11:56 +00:00
Jenkins 6b398b87c3 Merge "handle uninited fields in notification payload" 2017-03-11 02:20:28 +00:00
Jenkins 1c5709af54 Merge "Stop using mox in unit/virt/disk/test_api.py" 2017-03-10 22:52:20 +00:00
Jenkins 330590d0aa Merge "remove a TODO as all set for tags" 2017-03-10 22:51:34 +00:00
Jenkins b00badc4a9 Merge "conf: Deprecate most 'network' option" 2017-03-10 22:47:10 +00:00
Jenkins f6b4f9c8c3 Merge "Add cell field to Destination object" 2017-03-10 19:42:42 +00:00
Jenkins 387e949625 Merge "api-ref: Fix keypair API parameters" 2017-03-10 19:31:08 +00:00
Jenkins 19b6879e51 Merge "Remove duplicate attributes in sample files" 2017-03-10 19:30:25 +00:00
Jenkins 33649fc551 Merge "Fix missing instance.delete notification" 2017-03-10 19:29:42 +00:00
Jenkins 772aba39a3 Merge "re-orphan flavor after rpc deserialization" 2017-03-10 19:01:44 +00:00
Jenkins 08091c49ee Merge "Change MQ targeting to honor only what is in the context" 2017-03-10 19:00:16 +00:00
Dan Smith 35f803f6f4 Add identity helper property to CellMapping
This adds CellMapping.identity, a property to help with quick logging of
a CellMapping. It's tempting to just log a a whole CellMapping object,
but that can be bad due to the credentials stored within. This adds a
convenient way to log the uuid or name-and-uuid of a CellMapping without
having to replicate the is-name-set-or-none logic everywhere.

Related to blueprint cells-aware-api
Change-Id: Ie8eaf08e9f5bda56431358c40ccf187251be4542
2017-03-10 09:58:34 -08:00
Ionuț Bîru abd18a12e3 Correctly set up deprecation warning
In the current state, no warning was output in the logs.
With this fix, a warning is output in the logs and the value from
[DEFAULT] is used correctly.

Change-Id: I6a7f856e583aed31a3316c0b174a5559cd09e34b
Closes-Bug: #1671847
2017-03-10 17:34:49 +02:00
Dan Smith 9b8ab58360 Add cell field to Destination object
This will allow us to request the scheduler limit a scheduling decision to a
specific cell.

Change-Id: I020900ff682f54fafe3e94789c5731ef4748679b
2017-03-10 07:00:34 -08:00
Dan Smith 159062882e Change MQ targeting to honor only what is in the context
Previously we had aimed to make things like compute RPC automatically
look up the InstanceMapping or HostMapping for the call being performed
to target appropriately. However, we cannot do that within the cell,
and even trying incurs some overhead. For now, just deprecate the
by_instance() and by_host() methods and honor what is in the context
(if set) and otherwise fall back to the default client. Make the context
target routines create and store the RPC transport and remove the caching
logic from the ClientRouter since we're removing its ability to do that.

Related to blueprint cells-aware-api
Change-Id: I10f374adca672576058c4dbab708c040d166df47
2017-03-10 07:00:32 -08:00
Jenkins 6ab498e16d Merge "Fix API doc about server attributes (2.3 API)" 2017-03-10 13:49:39 +00:00
Jenkins 44937abe3d Merge "Remove usage of config option verbose" 2017-03-10 13:43:12 +00:00
ghanshyam ff795656c3 Remove duplicate attributes in sample files
Some of the sample files have duplicate
attributes in sample files.

Those did not cause failure as tests load json
sample file as dict and duplicate values gets merged.

This patch fix duplicate entry.

Functional sample file left while fixing the same on
doc sample - I7cd969fb4c9d4bff995c34725cfb739cccaba12c

Change-Id: I3fa0411e0a3f17020389911d5a16bcd247870839
2017-03-10 10:15:07 +00:00
Takashi NATSUME 2800b53836 api-ref: Fix keypair API parameters
Fix parameter types and the order of parameters.
Add missing parameters.
Add a period at the end of a parameter description.
Replace sample files with v2.10 files.

Change-Id: I9d8d20b42c7d32e11af479e79c9c9e8475421302
Closes-Bug: #1656781
2017-03-10 15:58:06 +09:00
Balazs Gibizer f9ac9531fb Fix missing instance.delete notification
The I8742071b55f018f864f5a382de20075a5b444a79 introduced cases when an
instance object is destroyed without the instance.delete notification
being emitted.

This patch adds the necessary notification to restore legacy
behaviour.

Closes-Bug: #1665263
Change-Id: I55ce90ca34c927c5dcd340fa5bdb0607a4ad4971
2017-03-09 18:49:37 -05:00
Jenkins 4cd8ab5bdc Merge "Teach simple_tenant_usage about cells" 2017-03-09 23:44:26 +00:00
Jenkins 73fc7f8056 Merge "Teach os-migrations about cells" 2017-03-09 23:15:22 +00:00
Jenkins a6807d7f58 Merge "Teach os-aggregates about cells" 2017-03-09 21:55:11 +00:00
Jenkins 54629ff944 Merge "Use Cinder API v3 as default" 2017-03-09 21:14:58 +00:00
Stephen Finucane 2ea9254adf conf: Fix formatting of network options
While these options are all deprecated, they were breaking the display
of option in the config-guide found in openstack-manuals. Remove excess
indentation and format code as such.

Change-Id: I72792ce7a12ac283e403cccf07ee6b9b63ad90bf
2017-03-09 17:27:32 +00:00
Jenkins 2a5674b544 Merge "Avoid using fdatasync() when fetching images" 2017-03-09 17:04:32 +00:00
Dan Smith f061579f00 Teach simple_tenant_usage about cells
Related to blueprint cells-aware-api

Change-Id: Icd5e46e0276df6cf7ffbbb57abb1dddc46678e11
2017-03-09 07:44:27 -08:00
Dan Smith 8dbefb4a92 Teach os-migrations about cells
Related to blueprint cells-aware-api

Change-Id: Id9d255f4338e4812a10b410edf91b8d9f4f5c35e
2017-03-09 07:44:27 -08:00
Dan Smith 3f36897f36 Teach os-aggregates about cells
Related to blueprint cells-aware-api
Change-Id: I6850534b7d2729c7b40d9f0afe10a440025b5123
2017-03-09 07:44:22 -08:00
Dao Cong Tien 9783be7e7c Stop using mox in unit/virt/disk/test_api.py
Partially-Implements: blueprint remove-mox-pike

Change-Id: I5dab5892d8e19217175475f1e4c8e676cf44c5c5
2017-03-09 20:17:52 +07:00
Lucian Petrut d9ed8a7235 Avoid using fdatasync() when fetching images
fdatasync is not available on Windows, for which reason this
operation now fails.

This change switches to fsync, which is platform independent.

Closes-Bug: #1671435

Change-Id: I71ac19160f198a97bb1834c5c81684758f129bcc
2017-03-09 13:20:10 +02:00
Jenkins 80af8a9dac Merge "numa: add numa constraints for emulator threads policy" 2017-03-09 11:15:57 +00:00
tengqm 9092207b9a Fix API doc about server attributes (2.3 API)
The attribute names added in version 2.3 API was incorrectly documented.

Change-Id: Ib2cdb5191fc23ba87b1528c95afc019ec57b4103
2017-03-09 03:50:48 -05:00
Jenkins fa2b4a8264 Merge "Refactor cell loading in compute/api" 2017-03-09 02:42:33 +00:00