A todo in the contributor/placement.rst slipped through the review
cracks and meant a bad link to 'link to spec once it merges' is in the
docs. This fixes it with the correct link to the spec.
Change-Id: I13daf9576dcb1229409826b4c4eac28c8bb1e23f
Blueprint add-kvm-hidden-feature added the capability of hiding the kvm
signature from guests. However, it was implemented only through an image
property.
A major reason for this feature is to allow passed-through Nvidia GPUs
to work correctly. GPU pci-passthrough is specified on the flavor's
extra_specs, without requiring an image with special properties.
Therefore, hiding the KVM signature should also be specifiable through
the flavor's extra_specs, in order to not require a special image for
this use case.
If the new flavor extra_spec is present and set to 'true', the libvirt
driver will produce an additional element to hide kvm's signature on
the vm, in the same way as with the image property
`img_hide_hypervisor_id`.
Implements: blueprint hide-hypervisor-id-flavor-extra-spec
Closes-Bug: 1757424
Change-Id: I41c5913b4148629b448ea5fb43b7597dc067dc22
During a benchmark on allocation creation, I found checking allocations
capacity occupied a great amount of time when allocation table is fairly
big. Add a check on resource provider id to reduce allocation records to
be joined with resource providers and inventories.
Change-Id: Ic36809fa7161c2aa07a42669b44046993e5db058
This patch refactors the sample files of:
* instance-update
* instance-update-tags
notifications to use a common InstanceUpdatePayload sample data.
Change-Id: I8720556ed8a9ce7f1db165a793fbb7070954cc5a
xenapi is going to support pool-based multi-hosts OpenStack
environments, this patch is used to remove dependency to the
old aggregate-based-pools and add support to xenapi pool.
Also include unit test changes.
Updated configuring migrations document:
https://docs.openstack.org/nova/latest/admin/configuring-
migrations.html#configuring-migrations-xenserver-shared-storage
Other related documents will be updated in another patch.
Implements: blueprint live-migration-in-xapi-pool
Change-Id: I2c492c46e85c1df96aa7fdc12cdee0b1c7ba775e
This change makes "DELETE /os-services/{service_id}" fail
with a 409 response when attempting to delete a nova-compute
service which is still hosting instances.
Deleting a compute service also results in deleting the
related compute_nodes table entry for that service host.
The compute node resource provider in placement is tied
to the compute node via the UUID, and if we allow deleting
the compute service and node then the resource provider for
that node is effectively orphaned in Placement, along with
the instances which have allocations against that resource
provider.
Furthermore, restarting the compute service will create a
new service and compute_nodes record, and the compute node
would have a new UUID and resource provider. This will
affect scheduling for that host since Placement will be
reporting it as having available capacity which in reality
is not accurate.
A release note is included for the (justified) behavior
change in the API. A new microversion should not be required
for this since admins should not have to opt out of broken
behavior. Since this API did not previously expect to return
a 409 response, the "expected_errors" decorator is updated
and again, should not require a microversion per the
guidelines:
https://docs.openstack.org/nova/latest/contributor/microversions.html#when-a-microversion-is-not-needed
Change-Id: I0bd63b655ad3d3d39af8d15c781ce0a45efc8e3a
Closes-Bug: #1763183
This adds a functional test which asserts the things
related to bug 1756179 where deleting a compute service
does not also delete the related host mapping or resource
provider resources.
Also related to bug 1763183 in that it should not be
possible to delete a compute service that has instances
running on it since that will mess up resource tracking
in Placement.
Change-Id: I519c5abfe24b154998f481c8a86db239a75d4729
Related-Bug: #1756179
Related-Bug: #1763183
The docs had three things wrong:
1. The server status would be VERIFY_RESIZE, not VERIFY_RESIZED.
2. The RESIZED value is on the OS-EXT-STS:vm_state field, not
vm_status.
3. The migration record status must be "finished", which is what
gets set on the migration record in the _finish_resize() method
in ComputeManager and used in the comptue API.confirm_resize()
method. "confirming" status is what the API sets the migration
record to before casting to nova-compute to finish the
confirmation.
Stepping back, this is too many conditionals for what is really
needed. So rather than fix all three items individually, this
change simply fixes the first one and removes the other two since
the 'status' is based on the 'vm_state' internally, and a non-admin
user cannot list migrations anyway, and the _finish_resize()
method sets the migration status *before* the vm_state.
Closes-Bug: #1764878
Change-Id: Ib751686880ee824cf0693a649f47c828f515b471
Removes a check that prevented compute from starting when config option
placement.[os_]region_name was not set. The check was not appropriate
since that option is not (otherwise) required. The check was originally
added to catch upgrades to Ocata, where placement (newly) needed to be
configured. Since we're well past that point now, the check is no longer
necessary.
Change-Id: I973180d6a384b32838ab61d4e6aaf73c255fd116
Closes-Bug: 1751692
Accept forbidden traits in the processing of extra_specs, with the
format of:
trait:CUSTOM_MAGIC=forbidden
This will be transformed into required=!CUSTOM_MAGIC when the traits
are assembled into a request to GET /allocation_candidates.
Implements blueprint forbidden-traits-in-nova
Change-Id: I31e609aef47d2fea03f279e4bfdd30f072d062b4
This patch refactors the sample files of:
* instance-soft_delete-start
* instance-soft_delete-end
* instance-suspend-start
* instance-suspend-end
* instance-trigger_crash_dump-start
* instance-trigger_crash_dump-end
notifications to use a common InstanceActionPayload sample data.
Change-Id: I8c31f44a3a3460e044ff73e0779a08ae49133f64
This patch refactors the sample files of:
* instance-live_migration_abort_start
* instance-live_migration_abort_end
* instance-shutdown-start
* instance-shutdown-end
notifications to use a common InstanceActionPayload sample data.
refactors the sample files:
* instance-snapshot-start
* instance-snapshot-end
notifications to use a common InstanceActionSnapshotPayload sample data.
Change-Id: I762b619c4410e3ff4a3660fc318832f81f523c05
This patch refactors the sample files of:
* instance-volume_attach-start
* instance-volume_attach-end
* instance-volume_attach-error
* instance-volume_detach-start
* instance-volume_detach-end
notifications to use a common InstanceActionVolumePayload sample data.
and refactor:
* instance-volume_swap-start
* instance-volume_swap-end
* instance-volume_swap-error
notifications to use a common InstanceActionVolumeSwapPayload sample data
Change-Id: I51fd194ac3b95be96db2676b4abf3df5a14d0faa
Since BFV instances don't have a specific image attached to them, the
filter will consider them as not having a specific image, hence not
isolated. Correcting the doc.
Change-Id: Ib235fca1365ee7a38b94600960ee3947f448c4a9
This was added in change I8c2f1a67 with the note:
===
We'll want to add claims around the logic of this method, so it's better
if there is a nested method that does the business logic to
avoid deep nesting that makes the code less readable.
===
AFAICT this logic was never added, and the indirection has always been
redundant.
Change-Id: Ie01f2c056a85e08a46c2461f1952cfdbaac3a547
Replace stubs.Set with mock in
nova/tests/unit/api/openstack/compute/test_serversV21.py.
This patch completes stopping using mox in the file.
Change-Id: I0a1f3392cef358afe413bacd1eb1fd2199618f14
Implements: blueprint mox-removal
Replace stubs.Set for the following methods with mock in
nova/tests/unit/api/openstack/compute/test_serversV21.py.
* nova.compute.api.API.get
* nova.compute.api.API.get_all
Subsequent patches will replace stubs.Set in test cases.
Change-Id: Ib0f55b40357cc714a9be9add76b0dc94169f1afc
Implements: blueprint mox-removal