Commit Graph

52830 Commits

Author SHA1 Message Date
Zuul 511ba5ccb8 Merge "Mention meta key suffix in tenant isolation with placement docs" 2018-11-09 23:56:49 +00:00
Zuul ed5e7fb2c2 Merge "Add recreate test for bug 1799892" 2018-11-09 23:20:34 +00:00
Zuul bc46a54773 Merge "Update the description to make it more accuracy" 2018-11-09 18:37:30 +00:00
Matt Riedemann 1fa09acf08 Mention meta key suffix in tenant isolation with placement docs
This changes does two things to the admin scheduler configuration
docs:

1. Notes the limitation from bug 1802111 for the older
   AggregateMultiTenancyIsolation filter and mentions that
   starting in Rocky, using tenant isolation with placement
   is better.

2. Notes that when isolating tenants via placement, the metadata
   key "filter_tenant_id" can be suffixed to overcome the limitation
   in bug 1802111.

Change-Id: I792c5df01b7cbc46c8363e261bc7422b09180e56
Closes-Bug: #1802111
2018-11-09 11:30:44 -05:00
Zuul e27905f482 Merge "Use SleepFixture instead of mocking _ThreadingEvent.wait" 2018-11-09 03:09:03 +00:00
Zuul 9d30ba409f Merge "Harden placement init under wsgi" 2018-11-09 01:53:51 +00:00
melanie witt fded752b16 Use SleepFixture instead of mocking _ThreadingEvent.wait
Recently, the _ThreadingEvent class in oslo.service was removed [1] and
our unit test patching is preventing us from moving to a newer version
of oslo.service [2].

We have patching of the _ThreadingEvent.wait method to bypass the sleep
time in the looping call of RetryDecorator, which adds several seconds
to the run time of unit tests.

This changes things to use the new SleepFixture from oslo.service
instead.

Depends-On: https://review.openstack.org/616371

[1] I62e9f1a7cde8846be368fbec58b8e0825ce02079
[2] https://review.openstack.org/615676

Change-Id: I45dd7602068eb0ce1331cfefd5a0cf6418bc8e88
2018-11-08 16:50:39 -05:00
Doug Hellmann 32082ebcfc remove mocks of oslo.service private members
We need to completely remove the mocks for oslo.service private members
in order to decouple nova from the requirements updates and be able to
update the constraint for oslo.service to a new version that has a
fixture for managing the sleep call being mocked (applied in the
following patch).

Change-Id: I0bbd2d7f9d6eb13d97587d867ef4d651809a7dd4
Signed-off-by: Doug Hellmann <doug@doughellmann.com>
2018-11-08 16:50:17 -05:00
Zuul f5be7f7843 Merge "Fix support matrix for VMware UEFI support" 2018-11-08 20:46:56 +00:00
Sean Mooney 00d08a3288 Harden placement init under wsgi
- This change tries to address an edge case discovered
  when running placement under mod_wsgi where
  if the placement wsgi application is re-initialize the db_api
  configure method attempts to reconfigure a started transaction
  factory.

- This since oslo.db transaction factories do not support
  reconfiguration at runtime this result in an exception being
  raised preventing reloading of the Placement API without
  restarting apache to force mod_wsgi to recreate the
  python interpreter.

- This change introduces a run once decorator to allow annotating
  functions that should only be executed once for the lifetime fo
  an interpreter.

- This change applies the run_once decorator to the db_api configure
  method, to suppress the attempt to reconfigure the current
  TransactionFactory on application reload.

Co-Authored-By: Balazs Gibizer <balazs.gibizer@ericsson.com>
Closes-Bug: #1799246
Related-Bug: #1784155
Change-Id: I704196711d30c1124e713ac31111a8ea6fa2f1ba
2018-11-08 12:25:46 +00:00
Zuul 6e8a69daf1 Merge "Improve formats of the Compute API guide" 2018-11-08 04:20:04 +00:00
Zuul e7751a4b06 Merge "Remove LazyLoad of Scheduler Clients" 2018-11-07 22:38:51 +00:00
Zuul 48accdf76a Merge "Allow resource_provider_association_refresh=0" 2018-11-07 22:31:28 +00:00
Zuul b8d5dc65c5 Merge "[Trivial Fix] Correct spelling error of "should" and "resource"" 2018-11-07 06:09:44 +00:00
Takashi NATSUME ddf7c6e370 Improve formats of the Compute API guide
Replace the 'NOTE' and 'TODO' words with
the note and todo directives in the Compute API guide.

Improve some format in the guide.
e.g. Fix unnecessary bold characters.

Change-Id: I7e9d6b8a5228886fd5de03d12482481d2b652666
Closes-Bug: #1558459
2018-11-07 04:01:40 +00:00
Zuul c295e395dc Merge "prevent common kwargs from glance client failure" 2018-11-06 21:23:24 +00:00
Zuul 784b0243d6 Merge "Trivial: add reminder to update Tempest's scheduler_enabled_filters" 2018-11-06 21:23:01 +00:00
Eric Fried 5d1a500185 Remove LazyLoad of Scheduler Clients
Things have changed here on Walton's Mountain since LazyLoad was
introduced [1]. It seems to have been created to avoid a circular
import, but as this patch should attest, that's no longer an issue.

Why change this now, besides removing weird and complicated code?
Because a subsequent patch needs to access a *property* of the report
client from the compute manager. As written, LazyLoad only lets you get
at *methods* (as functools.partial). There are other ways to solve that
while preserving the deferred import, but if this works, it's the better
solution.

[1] Ie5732baf9709cd0cb951eae4638910372c79e5f1

Change-Id: I1f97d00fb7633f173370ed6787c9a71ecd8106d5
2018-11-06 11:10:55 -06:00
Eric Fried 11a5fcbb6a Allow resource_provider_association_refresh=0
With this change, [compute]resource_provider_association_refresh is
allowed to be zero, which will disable refreshing resource provider
traits and aggregates.

Inventories are still refreshed in a different code path.

A subsequent patch will be submitted to allow manual refresh by sending
SIGHUP to the compute process.

Change-Id: Iec33e656491848b26686fbf6fb5db4a4c94b9ea8
2018-11-06 11:06:44 -06:00
Jay Pipes 5c21a00e89 prevent common kwargs from glance client failure
When creating a snapshot of a server using the nova API, failure occurs
if the image contains the metadata property "version". This was due to
the way that the GlanceClientWrapper.call() function signature was
structured.

This patch forces all client positional args to be passed as a named
"args" argument to the call() function and all client named args to be
pass as a named "kwargs" argument to the call() function. This
eliminates any argument name-shadowing that previously caused issues.

Closes-bug: #1717547
Change-Id: I3ed3303309fe2a25c0043fd206f36bada4b3b8f9
2018-11-06 11:01:59 -05:00
Radoslav Gerganov 5cb2350de7 Fix support matrix for VMware UEFI support
UEFI support in the VMware driver has been added with commit fc0c6d2.
This patch fixes the support matrix to reflect this.

Change-Id: I8b08e11ae4dd7f1101758b29ae3424d790b26ed1
2018-11-06 15:34:07 +02:00
Balazs Gibizer b93b40c6c0 Add bandwidth related standard resource classes
Introduce NET_BW_EGR_KILOBIT_PER_SEC and
NET_BW_IGR_KILOBIT_PER_SEC resource classes.

blueprint bandwidth-resource-provider

Change-Id: I996bf705b14b564106426a2e57299638fb178750
2018-11-05 17:47:13 -05:00
Balazs Gibizer 90b96170d3 Add requested_resources field to RequestSpec
The new RequestSpec.resource_requests stores a list of RequestGroup
objects each representing a granular resource request group requesting
resource for the given instance.

This will be used in a later patch to communicate the Neutron port's
resource request to the scheduler. Also this can be used later to
refactor flavor-based resource request handling.

This new field is intentionally not persisted to the DB for two
reasons:

* the port's resource request is already persisted in neutron
  so this would be a data duplication that could lead to data
  inconsistencies
* this field is only used to carry information from the the
  nova-conductor to the nova-scheduler for each select_destinations()
  request

blueprint: bandwidth-resource-provider
Change-Id: I53e5debcffd6de2b3a2ff838e7f5da33fa1a82b8
2018-11-05 17:47:13 -05:00
Balazs Gibizer d4f8974f87 Add request_spec.RequestGroup versioned object
Later patches will introduce a field in RequestSpec using this type as
the field type to store the resource requests coming from outside of
Nova like the bandwidth request coming from the Neutron ports.

This patch refactors the usage of placement.lib.RequestGroup. Until now
this class was used both by placement and nova services and they used
it only as a util class. However after this series the nova services
would like to use such a class via RPC which requires an OVO. This
patch makes sure that the new OVO is used by nova and the old plain
object is used by placement. This way placement is not forced to use
an OVO where no OVO functionality is required.

The minimum required version of oslo.versionedobjects is updated to
1.33.3 to include the fix for bug 1771804.

Change-Id: I46c97d2641d9685ef59771314665a17a5236097d
blueprint: bandwidth-resource-provider
2018-11-05 17:47:06 -05:00
Zuul c64b03d218 Merge "Minimal construct plumbing for nova service-list when a cell is down" 2018-11-05 19:33:36 +00:00
Zuul 8d089111c8 Merge "Minimal construct plumbing for nova show when a cell is down" 2018-11-05 15:06:10 +00:00
Artom Lifshitz a4ba04af28 Trivial: add reminder to update Tempest's scheduler_enabled_filters
With [1] now a thing, we should strive to keep Tempest's default for
scheduler_enabled_filters the same as Nova's enabled_filters. This
patch adds a comment to that effect.

[1] https://review.openstack.org/#/c/570207/

Related-bug: 1628443
Change-Id: I0a02acb831d00b472b9d80b4f4205a7f1476feb5
2018-11-04 08:36:06 -05:00
caoyuan 9f937c5ab7 Update the description to make it more accuracy
after the changed[1], the nubmers of service components on
controller node should be two rather than three.

[1]: https://review.openstack.org/#/c/604277/

Change-Id: Iada43eb7f36f946d1713b20a50ebdeb8c69d0545
Closes-Bug: #1801444
2018-11-03 09:48:49 +08:00
Zuul 9db1c6061d Merge "Refactor scatter-gather utility to return exception objects" 2018-11-03 01:08:18 +00:00
Zuul 781c22818f Merge "Pass disk_info dict to libvirt_info" 2018-11-02 18:15:54 +00:00
Zuul ffa8074583 Merge "Fix libvirt volume tests passing invalid disk_info" 2018-11-02 17:31:35 +00:00
Matthew Booth 3519b49efd Pass disk_info dict to libvirt_info
We currently pass all members of the disk_info dict to libvirt_info
when generating libvirt config. A subsequent change adds another key
to this dict. Rather than add a fourth argument to libvirt_info, this
pre-emptive change just passes the dict.

Part of bp local-disk-serial-numbers

Change-Id: I28c5bc23c0ea60d64153472d8937965f60f907c4
2018-11-02 13:54:13 +00:00
Matthew Booth 30cd052d09 Fix libvirt volume tests passing invalid disk_info
The tests for some libvirt volume were following the same pattern of
passing invalid disk_info data to get_config. They seemed to expect
connection_info['data'] to contain the same data as disk_info, which
has never been true.

Part of bp local-disk-serial-numbers

Change-Id: I0fc5ebc9eeae8feb644adaa96537e69521acec78
2018-11-02 13:53:00 +00:00
Zuul 4f5cb30a2f Merge "Minimal construct plumbing for nova list when a cell is down" 2018-11-02 02:38:37 +00:00
Zuul e5bd74795c Merge "Modify get_by_cell_and_project() to get_not_deleted_by_cell_and_project()" 2018-11-02 02:38:31 +00:00
Nguyen Hai Truong f8de2d9788 [Trivial Fix] Correct spelling error of "should" and "resource"
Small modification to correct spelling mistake.

Change-Id: I4bf378e5316ecc48f66eefae4f45d5a505adc305
Signed-off-by: Nguyen Hai Truong <truongnh@vn.fujitsu.com>
2018-11-01 19:28:37 -07:00
Zuul 5a101e1417 Merge "PowerVM upt parity for reshaper, DISK_GB reserved" 2018-11-01 19:57:41 +00:00
Zuul 1e823f2199 Merge "Make ResourceTracker.tracked_instances a set" 2018-11-01 17:13:06 +00:00
Eric Fried a148b11410 PowerVM upt parity for reshaper, DISK_GB reserved
The PowerVM patch to implement the update_provider_tree method (in a
fashion backward compatible with the existing get_available_resource
method) [1] was in flight at the same time as a
bp reshape-provider-tree patch introducing the 'allocations' kwarg [2]
and another patch which provided a ComputeDriver helper method for
calculating the reserved value for the DISK_GB resource from config [3].
This brings PowerVM's update_provider_tree method up to scratch with
those changes.

[1] I96da858e6a63e3339a009fd17ee0d8939b364510
[2] Ic062446e5c620c89aec3065b34bcdc6bf5966275
[3] I72c83a95dabd581998470edb9543079acb6536a5

Change-Id: I89ad36f19672368a1f795e1f29c5af6368ccfeec
2018-11-01 09:50:24 +00:00
Surya Seetharaman 870d718c17 Minimal construct plumbing for nova service-list when a cell is down
This patch modifies the existing behavior of nova service-list which
ignores a down cell to returning a partial construct consisting of
the binary and host info obtained from the API host_mappings table
for the compute services in the down cells. This is enabled by passing
a new enough microversion, which is added in a later patch in this
series.

Related to blueprint handling-down-cell

Change-Id: I9cf5e4eb7f70c495001fd064c060d7d5b3dd5bff
2018-10-31 15:22:15 -04:00
Surya Seetharaman ef5aa8a818 Minimal construct plumbing for nova show when a cell is down
This patch sets the stage for modifying the behavior of nova show
which currently gives a 500 when the cell in which the instance
lives is down. The new behavior will return a partial construct
consisting of uuid, project_id, created_at from instance_mappings
table and user_id, flavor, image_ref and availability_zone info
from request_specs table.  Note that the rest of the keys will be
missing. This behavior will be enabled by passing a new enough
microversion, handling for which is introduced later in this series.

Related to blueprint handling-down-cell

Change-Id: Iaea1cb4ed93bb98f451de4f993106d7891ca3682
2018-10-31 15:22:09 -04:00
Surya Seetharaman 031314b6d8 Refactor scatter-gather utility to return exception objects
Scatter-gather utility returns a raised_exception_sentinel for
all kinds of exceptions that are caught and often times there
maybe situations where we may have to handle the different types
of exceptions differently. To facilitate that, it might be more
useful to return the Exception object itself instead of the dummy
raised_exception_sentinel so that based on the result's exception
type we can handle them differently.

Related to blueprint handling-down-cell

Change-Id: I861b223ee46b0f0a31f646a4b45f8a02410253cf
2018-10-31 15:18:07 -04:00
Surya Seetharaman 37a5ef5113 Minimal construct plumbing for nova list when a cell is down
This patch augments the existing behavior of nova list which
ignores a down cell to returning a partial construct consisting of
uuid, project_id and created_at fields obtained from the API
instance_mappings table for the instances in the down cell by
introducing a new API microversion. This way when the user
gets partial results for certain records, he/she will know
that that particular cell is unreachable. Note that the other
keys will be missing from the API response. Also note that this
is not externally poke-able until the microversion and API change
later in this series.

Related to blueprint handling-down-cell

Change-Id: Ie9a9aed0676d469e5180d4c2d2631cf339335b2d
2018-10-31 15:12:18 -04:00
Zuul f13debf2f0 Merge "Properly track local root disk usage during moves" 2018-10-31 19:02:09 +00:00
Surya Seetharaman d4f8040117 Modify get_by_cell_and_project() to get_not_deleted_by_cell_and_project()
InstanceMappingList.get_by_cell_and_project() is being changed to
get_not_deleted_by_cell_and_project() by which we change the method to
filter out not queued_for_delete instance_mappings and also for
the method to accept cell_uuid as the input instead of the cell_id.
This also adds an optional limit parameter. This is more useful than
the ealier approach since it would increase the performance slightly
by not having to query for the cell_mappings explicitly to get the
cell ids from the cell uuids obtained from scatter gather utility.

Note that this method was added relatively recently and hence is not
used anywhere which is why it should be fine to change this, keeping
in mind the intention of having added it in the first place.

Change-Id: I5df9851cce0b6e635c74fd34f5be9c4906dd7406
Related to blueprint handling-down-cell
2018-10-31 15:00:17 -04:00
Zuul 65a65d5f93 Merge "Add regression test for bug 1796737" 2018-10-31 18:38:49 +00:00
Zuul a2896f47bb Merge "No longer call _normalize_inventory_from_cn_obj from upt flow" 2018-10-31 18:38:23 +00:00
Zuul 5d9022bffd Merge "Provide allocation_ratio/reserved amounts from update_provider_tree()" 2018-10-31 18:32:47 +00:00
Zuul 063e4132cb Merge "Run negative server moving tests with nested RPs" 2018-10-31 10:04:08 +00:00
Zuul c718a64c87 Merge "Fix nits in I7cbd5d9fb875ebf72995362e0b6693492ce32051" 2018-10-31 08:32:19 +00:00