50424 Commits

Author SHA1 Message Date
esberglu
8a67fcd1c2 PowerVM: Add proc_units_factor conf option
This introduces a new PowerVM conf option, proc_units_factor, which can
range from 0.05 to 1.0 and will default to 0.1. It is used to calculate
the physical processing power to assign per vCPU, where 1.0 is a whole
physical processor and 0.05 is 1/20th of a physical processor.

Change-Id: I67bfe2a6eff86f1947ada7661fc7c3fed81ed28f
2018-04-10 11:24:20 -05:00
Zuul
e4a34856d7 Merge "Complement tests in allocation candidates" 2018-04-04 17:12:20 +00:00
Zuul
57ff0c34be Merge "trivial: Fix nits in code comments" 2018-04-04 17:12:03 +00:00
Zuul
dd65cad17d Merge "Teardown networking when rolling back live migration even if shared disk" 2018-04-04 14:13:54 +00:00
Zuul
ed52fae692 Merge "Use update_provider_tree from resource tracker" 2018-04-04 11:14:06 +00:00
Zuul
2474f44b17 Merge "PowerVM Driver: Network interface attach/detach" 2018-04-04 06:49:19 +00:00
Zuul
1605391084 Merge "ironic: Get correct inventory for deployed node" 2018-04-04 04:04:39 +00:00
Zuul
14f8b542e6 Merge "api-ref: add a note about volume-backed rescue not being supported" 2018-04-04 03:57:02 +00:00
Zuul
8df0fc88c4 Merge "[placement] Add to contributor docs about handler testing" 2018-04-04 01:19:12 +00:00
Zuul
fcfdd34c94 Merge "Unit test framework: common FakeResponse" 2018-04-04 01:18:57 +00:00
Zuul
8fd98d656e Merge "[placement] Add test for provider summaries" 2018-04-04 01:18:48 +00:00
Zuul
21eec0c313 Merge "Fix N332 api_version decorator hacking check" 2018-04-03 21:31:43 +00:00
Zuul
bc9449573a Merge "Add trusted_certs object" 2018-04-03 15:54:51 +00:00
Zuul
54dc7048a4 Merge "Add trusted_certs to instance_extra" 2018-04-03 15:48:05 +00:00
Zuul
9c929662b3 Merge "Allow scheduling only to enabled cells (Filter Scheduler)" 2018-04-03 15:33:43 +00:00
Zuul
b3c7757223 Merge "Scheduling Optimization: Remove cell0 from the list of candidates" 2018-04-03 15:16:18 +00:00
Zuul
5122a00210 Merge "Fix unit tests to work with new oslo.config" 2018-04-03 10:58:35 +00:00
Zuul
0cdcabfdee Merge "[Trivial]Add missing blank space in conf description" 2018-04-03 10:53:46 +00:00
Zuul
98b505dd11 Merge "Fix a missing white space in exception message" 2018-04-03 09:08:08 +00:00
Fan Zhang
902f5be9d2 [Trivial]Add missing blank space in conf description
Change-Id: I1f7915430474c3aa6565ff01975f720e8bee24ee
Signed-off-by: Fan Zhang <zh.f@outlook.com>
2018-04-03 15:28:20 +08:00
Zuul
cb559d9229 Merge "SchedulerReportClient.update_from_provider_tree" 2018-04-03 01:48:06 +00:00
Zuul
edb152cb15 Merge "doc: Upgrade placement first" 2018-04-03 01:47:58 +00:00
Takashi NATSUME
8b6b65f5a9 Fix a missing white space in exception message
TrivialFix
Change-Id: Ia1e34df5a7e88c252924c25736ffb6bcaea42bfe
2018-04-02 18:41:29 +09:00
Eric Fried
83a5f90f82 Use update_provider_tree from resource tracker
The resource tracker calls the new update_provider_tree virt driver
method - using it if available, falling back to the existing
get_inventory-if-available business if not - and flushes the changes
back to placement accordingly.

Change-Id: I5ee11274816cd9e4f0669e9e52468a29262c9020
blueprint: update-provider-tree
2018-04-02 07:58:38 +00:00
Eric Fried
32fdf52958 SchedulerReportClient.update_from_provider_tree
Once the resource tracker has asked the compute driver to
update_provider_tree, it needs to flush any changes back to placement.

This change set introduces update_from_provider_tree to
SchedulerReportClient.  This method accepts the ProviderTree as modified
by ComputeDriver.update_provider_tree, compares it to what the report
client has in its cache, and flushes any changes back to the placement
service.

Change-Id: I9064a2598d773a814269995eed8862d093d9100e
blueprint: update-provider-tree
Co-Authored-By: Radoslav Gerganov <rgerganov@vmware.com>
Depends-On: https://review.openstack.org/536545
2018-04-02 07:58:38 +00:00
Tetsuro Nakamura
c8defb7ac3 Complement tests in allocation candidates
In `test_allocation_candidates.py`, there are some tests that
validate `allocation_requests` without checking `provider_summaries`.

This patch complements the tests by adding to the test functions
`_validate_provider_summary_resources`, a base test to check
what is in `provider_summaries`.

This change will help us build new features such as nested and
shared providers without breaking the existing behavior.

Change-Id: Ifa7a21a1f83f4a23747d1c6316d9bffcf158ff9a
2018-04-02 05:49:37 +09:00
Tetsuro Nakamura
92d6fc0534 trivial: Fix nits in code comments
Addresses the following minor/nonblocking review comments:

https://review.openstack.org/#/c/533396/8/nova/api/openstack/placement/objects/resource_provider.py@3243
https://review.openstack.org/#/c/533396/8/nova/api/openstack/placement/objects/resource_provider.py@3259

Change-Id: Iecefcd222eac9058964c5376af600e8d9d2608dd
2018-04-02 05:37:55 +09:00
Tetsuro Nakamura
a6122a7a64 [placement] Add test for provider summaries
In ``GET /allocation_candidates`` API, ``provider_summaries``
should show all the inventories for all the resource classes
in all the resource providers.

However, ``provider_summaries`` currently doesn't contain
resources that aren't requested.

This patch adds a simple test case to describe the bug.

Change-Id: Ida9cddc5a2b43917e7b5900fe68a413b18c6cb2d
Partial-Bug: #1760276
2018-04-01 18:41:47 +09:00
Eric Fried
e458bd0406 Fix unit tests to work with new oslo.config
Recently [1] oslo.config started pawing at stack traces and adding
source filename locations to options set in code.  This breaks pretty
handily when you've got primitives like open and os.patch.exists mocked
while you set conf options, as seen in [2].

This patch cleans up *just* the failing instances by pulling the mocks
closer to where they're actually being used, avoiding self.flags(...).

This isn't going to stop anyone from writing new tests that offend in
the same way.  The new oslo.config will, once it gets published, though
people are going to scratch their heads trying to figure out why.

See also dev ML thread [3].

[1] I6dec1e09dcab203c6287f9c56c866f220a42f850
[2] http://logs.openstack.org/12/557012/1/check/cross-nova-py27/37b2a7c/job-output.txt.gz#_2018-03-27_21_41_09_883881
[3] http://lists.openstack.org/pipermail/openstack-dev/2018-March/128833.html

Change-Id: I6484984c374b20351aa406aa91beacf8ee503059
2018-03-31 15:55:51 -05:00
Zuul
c683518ecb Merge "Fix allocation_candidates not to ignore shared RPs" 2018-03-31 16:44:55 +00:00
Surya Seetharaman
ba083b0c98 Allow scheduling only to enabled cells (Filter Scheduler)
This by default would be scheduling to all cells since all cells
would be enabled at the time of creation unless specified otherwise.

Since the list of enabled cells are stored as a global cache on the
host_manager, a reset() handler for the SIGHUP signal has also been
added in the scheduler. Hence upon every create-cell/enable-cell/
disable-cell operation the scheduler has to be signaled so that the
cache is refreshed.

Co-Authored-By: Dan Smith <dms@danplanet.com>

Implements blueprint cell-disable

Change-Id: I6a9007d172b55238d02da8046311f8dc954703c5
2018-03-30 19:16:14 -04:00
Matt Riedemann
bb8ba2cf56 Teardown networking when rolling back live migration even if shared disk
Change I2c86989ab7c6593bf346611cde8c043116d55bc5 way back in Essex
added the "setup_network_on_host" network API calls to the migration
flows, including rollback_live_migration_at_destination. The initial
implementation of that method for Quantum (Neutron) was a no-op.

Change Ib1cc44bf9d01baf4d1f1d26c2a368a5ca7c6ab68 in Newton added the
Neutron implementation for the setup_networks_on_host method in order
to track the destination host being migrated to for instances that
have floating IPs with DVR.

When rolling back from a live migration failure on the destination host,
the "migrating_to" attribute in the port binding profile, added in
pre_live_migration() on the destination compute, is cleared.

However, that only happens in rollback_live_migration_at_destination,
which is only called if the instance is not on shared storage (think
libvirt with the rbd image backend or with NFS). That's controlled
via the "do_cleanup" flag returned from _live_migration_cleanup_flags().

If the live migration is happening over shared storage and fails, then
rollback_live_migration_at_destination isn't called which means
setup_network_on_host isn't called, which means the "migrating_to"
attribute in the port binding profile isn't cleaned up.

This change simply adds the cleanup in _rollback_live_migration in the
event that neutron is being used and we're live migrating over shared
storage so rollback_live_migration_at_destination isn't called.

Change-Id: I658e0a749e842163ed74f82c975bcaf19f9f7f07
Closes-Bug: #1757292
2018-03-30 17:37:24 -04:00
Zuul
167023b507 Merge "remove unnecessary short cut in placement" 2018-03-30 21:30:59 +00:00
Zuul
2d33459255 Merge "Documentation for tenant isolation with placement" 2018-03-30 17:34:06 +00:00
Zuul
136abd08c8 Merge "Add require_tenant_aggregate request filter" 2018-03-30 17:33:58 +00:00
Zuul
efb156eb79 Merge "Add AggregateList.get_by_metadata() query method" 2018-03-30 17:13:09 +00:00
Zuul
6ca6a1d076 Merge "Fix comments in get_all_with_shared()" 2018-03-30 17:12:54 +00:00
Zuul
8732b3ef32 Merge "libvirt: slow live-migration to ensure network is ready" 2018-03-30 11:44:19 +00:00
Chris Dent
d7145270c3 [placement] Add to contributor docs about handler testing
A recent IRC conversation [1] discussed that there are generally no tests
for the placement handler code (the wsgi methods that respond to each
URI and HTTP method). This change adds a paragraph to point out that
this is mostly intentional and that when they get complex it would
be a good idea to extract a method.

[1] http://eavesdrop.openstack.org/irclogs/%23openstack-nova/%23openstack-nova.2018-03-28.log.html#t2018-03-28T13:00:40

Change-Id: I09774c123068e42e6a828fc37455dc5d374486b9
2018-03-30 11:30:52 +01:00
Zuul
10ebbf9df4 Merge "remove a comment about ec2" 2018-03-30 08:41:21 +00:00
Jackie Truong
589eb88726 Add trusted_certs object
This change adds a trusted_certs object, which stores a list of trusted
x509 certificate IDs, to the Instance object.

Change-Id: I872b50932f7611584661efc604c8e5d4324fae9b
Implements: blueprint nova-validate-certificates
2018-03-29 23:00:48 -04:00
dane-fichter
e35e8d7f3f Add trusted_certs to instance_extra
This change adds a trusted_certs deferred-load column to
instance_extras, which stores a list of trusted x509 certificate
UUIDs for a given instance in the form of a JSON blob.

Change-Id: I3fd4e395b31ff1b69f35242d559f8caa17c05a6a
Implements: blueprint nova-validate-certificates
2018-03-29 23:00:42 -04:00
Zuul
942ed9b265 Merge "Use ksa session for cinder microversion check" 2018-03-30 00:19:42 +00:00
Zuul
6a6d896f6f Merge "[placement] Fix bad management of _TRAITS_SYNCED flag" 2018-03-29 23:18:19 +00:00
Zuul
9ea731a652 Merge "Add an index on aggregate_metadata.value" 2018-03-29 20:07:24 +00:00
Zuul
062b5948af Merge "Make get_allocation_candidates() honor aggregate restrictions" 2018-03-29 20:07:16 +00:00
Zuul
9767f45784 Merge "Add aggregates list to Destination object" 2018-03-29 20:07:08 +00:00
Zuul
a00f1c25bc Merge "Add request filter functionality to scheduler" 2018-03-29 19:57:39 +00:00
Dan Smith
a27da62d82 Documentation for tenant isolation with placement
This explains how to actually wire up placement aggregates to allow
for filtering on tenant.

Change-Id: Idb06e7562d88957a00f52cba7d0a788dbff42a28
2018-03-29 11:56:39 -07:00
Zuul
144d621397 Merge "vmware: Fixes _detach_instance_volumes method" 2018-03-29 18:13:51 +00:00