Commit Graph

56310 Commits

Author SHA1 Message Date
jichenjc 011cce6adb libvirt: avoid cpu check at s390x arch
nova compute will call check_can_live_migrate_destination when doing
live migration and it will compare cpu model, however, following info
indicated that cpu compare is not supported at s390x arch.

URI qemu:///system does not support full set of host capabilities: this
function is not supported by the connection driver:
cannot compute baseline CPU of s390x architecture

https://www.libvirt.org/news.html has the info
v5.9.0 has Improvements part indicated the compare was added at 5.9

so the workaround is to avoid the check and let the migration proceed.

Change-Id: I253f4f305ecf8b5331212be87caef41f2ebb747e
Closes-Bug: 1854126
2020-01-07 07:19:05 +00:00
Zuul 92a9779992 Merge "Add recreate test for bug 1855927" 2020-01-07 05:39:07 +00:00
Zuul 557b73d2a5 Merge "Ensure source service is up before resizing/migrating" 2020-01-07 05:39:02 +00:00
Zuul 0dae0bfde3 Merge "Report trait 'COMPUTE_IMAGE_TYPE_PLOOP'" 2020-01-07 05:29:24 +00:00
Zuul b6e50ad498 Merge "Fix an invalid assertIsNotNone statement" 2020-01-07 01:30:28 +00:00
Zuul a741f28cda Merge "[api-ref] Fix the incorrect link" 2020-01-07 01:30:23 +00:00
Zuul 2c6388e3cd Merge "docs: Add note about an image signature validation limitation when using rbd" 2020-01-07 00:51:29 +00:00
Zuul 34d05c82b8 Merge "Add api for instance action details" 2020-01-06 20:14:00 +00:00
Zuul 662138b6c1 Merge "Create instance action when burying in cell0" 2020-01-06 20:13:52 +00:00
Zuul 2e610aa6cc Merge "Fix duplicated words issue like "during during boot time"" 2020-01-06 19:58:36 +00:00
Zuul 97b8a241a6 Merge "[Trivial]Fix typo instnace" 2020-01-06 19:50:31 +00:00
ericxiett e61cb24932 Report trait 'COMPUTE_IMAGE_TYPE_PLOOP'
This patch updates virt interface for reporting
trait 'COMPUTE_IMAGE_TYPE_PLOOP'.

Change-Id: Ifa2c3857725d64963aed2de7fac0b5b424665afe
Closes-Bug: #1854235
2020-01-06 12:32:42 +00:00
Zuul 7ca014cea7 Merge "Use graceful_exit=True in ComputeTaskManager.revert_snapshot_based_resize" 2020-01-06 06:43:49 +00:00
zhufl b608d6bfb4 Fix duplicated words issue like "during during boot time"
This is to fix the duplicated words issue like
"if it was specified during during boot time".

Change-Id: I0ffedb8c40399a4b0ecd83b142bdeaf556d1568f
2020-01-06 14:19:03 +08:00
Zuul 64c9944978 Merge "Plumb graceful_exit through to EventReporter" 2020-01-05 23:20:05 +00:00
Zuul 71c318f109 Merge "Fix accumulated non-docs nits for cross-cell-resize series" 2020-01-04 18:13:11 +00:00
Zuul 4fcecdb55a Merge "Restore test_minbw_allocation_placement in nova-next job" 2020-01-03 20:45:45 +00:00
zhufl 4352a41b4c [Trivial]Fix typo instnace
This is to fix the typo of instnace, which should be instance.

Change-Id: Ia58f46f647b1fca3405f6e81e631434bec4e31b5
2020-01-03 09:06:20 +08:00
zhufl 1b7ebe5f75 Fix an invalid assertIsNotNone statement
This is to to fix an invalid assertIsNotNone statement,
"self.assertIsNotNone('migration_context', self.task.instance)",
which will never raise an exception.

Change-Id: I7264238a50f5320500696312cff63dcc0e728810
2019-12-26 16:05:09 +08:00
Zuul 65aae518f8 Merge "Introduce scope_types in Admin Actions" 2019-12-26 06:48:34 +00:00
Zuul 029c84e08f Merge "Add cross-cell resize tests for _poll_unconfirmed_resizes" 2019-12-26 03:58:59 +00:00
Zuul 9a083b6db6 Merge "Implement cleanup_instance_network_on_host for neutron API" 2019-12-26 02:04:03 +00:00
Zuul ba325886a4 Merge "Simplify FinishResizeAtDestTask event handling" 2019-12-25 20:08:39 +00:00
Zuul a597994f98 Merge "Add sequence diagrams for cross-cell-resize" 2019-12-24 10:18:27 +00:00
Zuul f964dcfa44 Merge "Flesh out docs for cross-cell resize/cold migrate" 2019-12-24 09:39:06 +00:00
Zuul da4168ddc3 Merge "Enable cross-cell resize in the nova-multi-cell job" 2019-12-24 06:54:22 +00:00
chenxing 2a9766195d [api-ref] Fix the incorrect link
This page[1] doesn't talk about paging or servers_links. The API
reference description should link here[2] for talking about paging.

[1]https://docs.openstack.org/api-guide/compute/links_and_references.html
[2]https://docs.openstack.org/api-guide/compute/paginated_collections.html

Change-Id: I4831d5c2b9598e37346f1e65135b11446b2458eb
Closes-Bug: #1856241
2019-12-24 09:31:38 +08:00
Zuul 1a46ab534f Merge "Add cross-cell resize policy rule and enable in API" 2019-12-24 00:19:55 +00:00
Zuul 0ed00643bf Merge "Move common test method up to base class" 2019-12-23 16:50:59 +00:00
Zuul 65f691b54d Merge "Func test for qos live migration reschedule" 2019-12-23 16:50:52 +00:00
Zuul 752b4068af Merge "Fix get_request_group_mapping doc" 2019-12-23 16:25:04 +00:00
Zuul d3fc193382 Merge "nova-net: Correct some broken VIF tests" 2019-12-23 16:08:34 +00:00
Zuul a0fc9a3e11 Merge "nova-net: Remove nova-network security group driver" 2019-12-23 16:08:29 +00:00
Zuul 55909254e8 Merge "nova-net: Remove 'is_neutron_security_groups' function" 2019-12-23 16:07:12 +00:00
Zuul 47edb56eea Merge "nova-net: Convert remaining unit tests to neutron" 2019-12-23 15:41:43 +00:00
Zuul 9b118a25d4 Merge "Support live migration with qos ports" 2019-12-23 15:41:37 +00:00
Matt Riedemann 26d695876a Use graceful_exit=True in ComputeTaskManager.revert_snapshot_based_resize
This passes graceful_exit=True to the wrap_instance_event decorator
in ComputeTaskManager.revert_snapshot_based_resize so that upon successful
completion of the RevertResizeTask, when the instance is hard destroyed
from the target cell DB (used to create the action/event), a traceback
is not logged for the InstanceActionNotFound exception.

The same event is also finished in the source cell DB upon successful
completion of the RevertResizeTask. Note that there are other ways we
could have done this, e.g. moving the contents of the _execute() method
to another method and then putting that in an EventReporter context with
the source cell context/instance, but this was simpler.

Part of blueprint cross-cell-resize

Change-Id: Ibb32f7c19f5f2ec4811b165b8df748d1b7b0f9e4
2019-12-23 10:10:57 -05:00
Matt Riedemann 24bf2aaa74 Plumb graceful_exit through to EventReporter
This adds a kwarg to wrap_instance_event to be used in the
EventReporter to allow the caller to tell EventReporter to
gracefully handle InstanceActionNotFound on __exit__.

This will be used by ComputeTaskManager.revert_snapshot_based_resize
which starts an action in the target cell DB but upon successful
exit of the RevertResizeTask the instance in the target cell DB
will be hard destroyed resulting in an InstanceActionNotFound
traceback which should be avoided.

Part of blueprint cross-cell-resize

Change-Id: Ie48a9c0a285f77e260f675fbe9282df9f02282b1
2019-12-23 10:10:57 -05:00
Matt Riedemann 3a66b8fdc0 Fix accumulated non-docs nits for cross-cell-resize series
[1] https://review.opendev.org/#/c/638046/56/nova/conductor/tasks/cross_cell_migrate.py@899
[2] https://review.opendev.org/#/c/638046/56/nova/conductor/tasks/cross_cell_migrate.py@1160
[3] https://review.opendev.org/#/c/638046/56/nova/conductor/tasks/cross_cell_migrate.py@1187
[4] https://review.opendev.org/#/c/695334/5/nova/conductor/tasks/cross_cell_migrate.py@1464
[5] https://review.opendev.org/#/c/638048/56/nova/tests/functional/test_cross_cell_migrate.py@570
[6] https://review.opendev.org/#/c/638269/63/nova/compute/api.py@3735
[7] https://review.opendev.org/#/c/691991/15/nova/objects/migration_context.py@131
[8] https://review.opendev.org/#/c/638268/56/nova/tests/functional/test_cross_cell_migrate.py@762

Part of blueprint cross-cell-resize

Change-Id: I92a7c0c35415661db16edb89dc860f4512b98316
2019-12-23 10:10:57 -05:00
Matt Riedemann 74e76b1a6b Add cross-cell resize tests for _poll_unconfirmed_resizes
This adds two tests and updates the cross-cell resize docs to
show that _poll_unconfirmed_resizes can work if the cells are
able to "up-call" to the API DB to confirm the resize. Since
lots of deployments still enable up-calls we don't explicitly
block _poll_unconfirmed_resizes from processing cross-cell
migrations. The other test shows that _poll_unconfirmed_resizes
fails if up-calls are disabled.

Part of blueprint cross-cell-resize

Change-Id: I39e8159f3e734a1219e1a44434d6360572620424
2019-12-23 10:10:57 -05:00
Matt Riedemann 92bf69bfa5 Implement cleanup_instance_network_on_host for neutron API
This implements the cleanup_instance_network_on_host method
in the neutron API which will delete port bindings for the
given instance and the given host, similar to how
setup_networks_on_host works when teardown=True and the
instance.host does not match the host provided to that method.

This allows removing the hacks in the
_confirm_snapshot_based_resize_delete_port_bindings and
_revert_snapshot_based_resize_at_dest methods.

Change-Id: Iff8194c868580facb1cc81b5567d66d4093c5274
2019-12-23 10:10:57 -05:00
Matt Riedemann 166df25325 Simplify FinishResizeAtDestTask event handling
Rather than copy the instance action event from the target
cell DB to the source cell DB when
_finish_snapshot_based_resize_at_dest fails on the dest host,
we can simply use the EventReporter context in conductor with
the source cell context and get the same event.

Part of blueprint cross-cell-resize

Change-Id: I8053765797f097859bf585459f4a00d31844708e
2019-12-23 10:10:57 -05:00
Matt Riedemann 6aafb29820 Add sequence diagrams for cross-cell-resize
This tries to strike a balance between giving a useful high level
flow without injecting too much complex detail in each diagram.

For the more complicated resize diagram, I have used labels to
try and make clear which conductor task is performing an action.

For the less complicated confirm and revert diagrams, I add a
separator to show where the conductor task is orchestrating the
calls and provide a bit more detail into what each task is doing
since the calls to computes are minimal in those cases.

Part of blueprint cross-cell-resize

Change-Id: I27c549901a3359f106ba5d77aa6559397ee12a5d
2019-12-23 10:10:57 -05:00
Matt Riedemann aa74ac60e2 Flesh out docs for cross-cell resize/cold migrate
This gives most of the high level information. I'm sure there
are more troubleshooting things we can add but those could come
later as they crop up.

The sequence diagram(s) will come in a separate change.

Part of blueprint cross-cell-resize

Change-Id: I13f07a2d45bf5b8584adc8aa079bae640cb5c470
2019-12-23 10:10:57 -05:00
Matt Riedemann 7661995b69 Enable cross-cell resize in the nova-multi-cell job
This changes the nova-multi-cell job to essentially
force cross-cell resize and cold migration. By "force"
I mean there is only one compute in each cell and
resize to the same host is disabled, so the scheduler
has no option but to move the server to the other cell.

This adds a new role to write the nova policy.yaml file
to enable cross-cell resize and a pre-run playbook so
that the policy file setup before tempest runs.

Part of blueprint cross-cell-resize

Change-Id: Ia4f3671c40e69674afc7a96b5d9b198dabaa4224
2019-12-23 10:10:57 -05:00
Matt Riedemann 6ebee92445 Add cross-cell resize policy rule and enable in API
This adds the "compute:servers:resize:cross_cell" policy
rule which is now used in the API to determine if a resize
or cold migrate operation can be performed across cells.

The check in the API is based on:

- The policy check passing for the request.
- The minimum nova-compute service version being high
  enough across all cells to perform a cross-cell resize.

If either of those conditions fail a traditional same-cell
resize will be performed.

A docs stub is added here and will be fleshed out in an
upcoming patch.

Implements blueprint cross-cell-resize

Change-Id: Ie8a0f79a3b16e02b7a34a1b81f547013a3d88996
2019-12-23 10:10:57 -05:00
Zuul 7e15762c0a Merge "libvirt: flatten rbd image during cross-cell move spawn at dest" 2019-12-23 14:31:15 +00:00
Zuul 4cb8136e95 Merge "Add test coverage of existing admin_actions policies" 2019-12-23 12:53:35 +00:00
Zuul a869f1c9d3 Merge "Support cross-cell moves in external_instance_event" 2019-12-23 09:59:18 +00:00
Zuul b33667cd34 Merge "Add functional test for anti-affinity cross-cell migration" 2019-12-23 05:45:17 +00:00