summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* Merge "[neutron] Get only ID and name of the SGs from Neutron" into ↵stable/queensZuul2021-09-111-1/+7
|\ | | | | | | stable/queens
| * [neutron] Get only ID and name of the SGs from NeutronSlawek Kaplonski2021-08-101-1/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | During the VM booting process Nova asks Neutron for the security groups of the project. If there are no any fields specified, Neutron will prepare list of security groups with all fields, including rules. In case if project got many SGs, it may take long time as rules needs to be loaded separately for each SG on Neutron's side. During booting of the VM, Nova really needs only "id" and "name" of the security groups so this patch limits request to only those 2 fields. This lazy loading of the SG rules was introduced in Neutron in [1] and [2]. [1] https://review.opendev.org/#/c/630401/ [2] https://review.opendev.org/#/c/637407/ Related-Bug: #1865223 Change-Id: I15c3119857970c38541f4de270bd561166334548 (cherry picked from commit 388498ac5fa15ed8deef06ec061ea47e4a1b7377) (cherry picked from commit 4f49545afaf3cd453796d48ba96b9a82d11c01bf) (cherry picked from commit f7d84db5876b30d6849877799c08ebc65ac077ca) (cherry picked from commit be4a514c8aea073a9188cfc878c9afcc9b03cb28) (cherry picked from commit 1aa571103f90228ddf3dc27386486196ad58ba0e) (cherry picked from commit 9b24ff384e336d3369b796427d34787872d9a08e) (cherry picked from commit d27a662be6cee6c11f643f53ca2ce73bdcefa4ac)
* | Merge "Update pci stat pools based on PCI device changes" into stable/queensZuul2021-06-034-0/+63
|\ \
| * | Update pci stat pools based on PCI device changesHemanth Nakkina2021-05-254-0/+63
| |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | At start up of nova-compute service, the PCI stat pools are populated based on information in pci_devices table in Nova database. The pools are updated only when new device is added or removed but not on any device changes like device type. If an existing device is configured as SRIOV and nova-compute is restarted, the pci_devices table gets updated but the device is still listed under the old pool in pci_tracker.stats.pool (in-memory object). This patch looks for device type updates in existing devices and updates the pools accordingly. Change-Id: Id4ebb06e634a612c8be4be6c678d8265e0b99730 Closes-Bug: #1892361 (cherry picked from commit b8695de6da56db42b83b9d9d4c330148766644be) (cherry picked from commit d8b8a8193b6b8228f6e7d6bde68b5ea6bb53dd8b) (cherry picked from commit f58399cf496566e39d11f82a61e0b47900f2eafa) (cherry picked from commit 8378785f995dd4bec2a5a20f7bf5946b3075120d) (cherry picked from commit 73e631862a81e85fdf9305f3d15b201d780c8743) (cherry picked from commit 1fb4cc03e315f5b4dbebc521f0d1299273c7c396)
* | Merge "Use subqueryload() instead of joinedload() for (system_)metadata" ↵Zuul2021-05-292-1/+24
|\ \ | |/ |/| | | into stable/queens
| * Use subqueryload() instead of joinedload() for (system_)metadatamelanie witt2021-04-292-1/+24
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Currently, when we "get" a single instance from the database and we load metadata and system_metadata, we do so using a joinedload() which does JOINs with the respective tables. Because of the one-to-many relationship between an instance and (system_)metadata records, doing the database query this way can result in a large number of additional rows being returned unnecessarily and cause a large data transfer. This is similar to the problem addressed by change I0610fb16ccce2ee95c318589c8abcc30613a3fe9 which added separate queries for (system_)metadata when we "get" multiple instances. We don't, however, reuse the same code for this change because _instances_fill_metadata converts the instance database object to a dict, and some callers of _instance_get_by_uuid need to be able to access an instance database object attached to the session (example: instance_update_and_get_original). By using subqueryload() [1], we can perform the additional queries for (system_)metadata to solve the problem with a similar approach. Closes-Bug: #1799298 [1] https://docs.sqlalchemy.org/en/13/orm/loading_relationships.html#subquery-eager-loading Change-Id: I5c071f70f669966e9807b38e99077c1cae5b4606 (cherry picked from commit e728fe668a6de886455f2dbaf655c8a151462c8c) (cherry picked from commit 63d2e62c3a223f883ca810f4c66a2a236cf3d483) (cherry picked from commit e7a45e0335e4cf44fec7f7b8d2505f5b95445cf9) (cherry picked from commit 4350074029ffbc03ab238c442ec86fab6560e365) (cherry picked from commit ad7e4fb8f4ea6c458af00ec7aa0b321dc37c097c) (cherry picked from commit 68f80d201310dcaf688d8437a46c8d272ead317d)
* | [stable-only] gate: Pin CEPH_RELEASE to nautilus in LM hookLee Yarwood2021-03-122-0/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | I1edd5a50079f325fa143a7e0d51b3aa3bb5ed45d moved the branchless devstack-plugin-ceph project to the Octopus release of Ceph that drops support for py2. As this was still the default on stable/train this breaks the nova-live-migration and nova-grenade jobs. This change works around this by pinning the CEPH_RELEASE to nautilus within the LM hook as was previously used prior to the above landing. Note that the devstack-plugin-ceph-tempest job from the plugin repo continues to pass as it is correctly pinned to the Luminous release that supports py2. If anything the above enforces the need to move away from these hook scripts and instead inherit our base ceph jobs from this repo in the future to avoid the Ceph release jumping around like this. NOTE(lyarwood): Conflicts due to the partial backport of I902e459093af9b82f9033d58cffcb2a628f5ec39 in stable/queens. Conflicts: nova/tests/live_migration/hooks/run_tests.sh Change-Id: I1d029ebe78b16ed2d4345201b515baf3701533d5 (cherry picked from commit ff570d1b4e9b9777405ae75cc09eae2ce255bf19) (cherry picked from commit 436e8172f65193e177a4a12780f752dbc7e88b39) (cherry picked from commit 238c83a2f778a9c2f0abbe318dda97b715926565)
* | libvirt: Do not reference VIR_ERR_DEVICE_MISSING when libvirt is < v4.1.0Lee Yarwood2021-01-224-21/+141
|/ | | | | | | | | | | | | | | | | | I7eb86edc130d186a66c04b229d46347ec5c0b625 introduced VIR_ERR_DEVICE_MISSING into the hot unplug libvirt error code list within detach_device_with_retry. While the change correctly referenced that the error code was introduced in v4.1.0 it made no attempt to handle versions prior to this. With MIN_LIBVIRT_VERSION currently pinned to v4.0.0 we need to handle libvirt < v4.1.0 to avoid referencing the non-existent error code within the libvirt module. Closes-Bug: #1891547 Change-Id: I32908b77c18f8ec08211dd67be49bbf903611c34 (cherry picked from commit bc96af565937072c04dea31781d86d2073b77ed4) (cherry picked from commit 3f3b889f4e7e204a140d32d71201c4f23dd54c24) (cherry picked from commit c61f4c8e20d712ba84a8965cbe0cba90c7d27d0b) (cherry picked from commit 334a479ae2f4ce3d48dcc4c1b9e14d0cb9822272) (cherry picked from commit 9c885b67a9e6c30570084f1f78218defa0278d83)
* libvirt: Handle VIR_ERR_DEVICE_MISSING when detaching devicesLee Yarwood2021-01-213-54/+67
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Introduced in libvirt v4.1.0 [1] this error code replaces the previously raised VIR_ERR_INVALID_ARG, VIR_ERR_OPERATION_FAILED and VIR_ERR_INVALID_ARG codes [2][3]. VIR_ERR_OPERATION_FAILED was introduced and tested as an active/live/hot unplug config device detach error code in I131aaf28d2f5d5d964d4045e3d7d62207079cfb0. VIR_ERR_INTERNAL_ERROR was introduced and tested as an active/live/hot unplug config device detach error code in I3055cd7641de92ab188de73733ca9288a9ca730a. VIR_ERR_INVALID_ARG was introduced and tested as an inactive/persistent/cold unplug config device detach error code in I09230fc47b0950aa5a3db839a070613c9c817576. This change introduces support for the new VIR_ERR_DEVICE_MISSING error code while also retaining coverage for these codes until MIN_LIBVIRT_VERSION is bumped past v4.1.0. The majority of this change is test code motion with the existing tests being modified to run against either the active or inactive versions of the above error codes for the time being. test_detach_device_with_retry_operation_internal and test_detach_device_with_retry_invalid_argument_no_live have been removed as they duplicate the logic within the now refactored _test_detach_device_with_retry_second_detach_failure. [1] https://libvirt.org/git/?p=libvirt.git;a=commit;h=bb189c8e8c93f115c13fa3bfffdf64498f3f0ce1 [2] https://libvirt.org/git/?p=libvirt.git;a=commit;h=126db34a81bc9f9f9710408f88cceaa1e34bbbd7 [3] https://libvirt.org/git/?p=libvirt.git;a=commit;h=2f54eab7c7c618811de23c60a51e910274cf30de Closes-Bug: #1887946 Change-Id: I7eb86edc130d186a66c04b229d46347ec5c0b625 (cherry picked from commit 902f09af251d2b2e56fb2f2900a3510baf38a508) (cherry picked from commit 93058ae1b8bc1b1728f08b9e606b68318751fc3b) (cherry picked from commit 863d6ef7601302901fa3368ea8457b3564eeb501) (cherry picked from commit 76428c1a6a7796391957a3e83207f85cfe924505) (cherry picked from commit 74b053f47a659a0250d051020d6c8b4e3c256e7d)
* libvirt: Remove reference to transient domain when detaching devicesLee Yarwood2021-01-213-12/+15
| | | | | | | | | | | | | | | | | | | | | When detaching a device from a domain we first attempt to remove the device from both the persistent and live configs before looping to ensure the device has really been detached from the running live config. Previously when this failed we logged an error message that suggested that this was due to issues detaching the device from a transient domain, however this is not the case as the domain is persistent. This change simply updates the error and associated comments to only reference the live config of the domain. Additionally a DEBUG line claiming that a device has been successfully detached is now only logged once the device is removed from the live config, hopefully avoiding any confusion from this line been logged each time an attempt is made to detach the device. Change-Id: If869470216600c303d47cf79f12c4fc88abcf813 (cherry picked from commit 636c7461dee4002571da6e99986eb17e9a28b0f4)
* sync_guest_time: use the proper errnoChen Hanxiao2021-01-212-1/+2
| | | | | | | | | | | In qemuDomainSetTime, VIR_ERR_OPERATION_UNSUPPORTED is used to report qemu doesn't support it. [1]: https://github.com/libvirt/libvirt/blob/228ae70938d0cb85353e35f744fbc494de619481/src/qemu/qemu_driver.c#L19437 Change-Id: I84ddb9c434625fd4a57a4f54d0856044e1c56f3f Signed-off-by: Chen Hanxiao <chenhx@certusnet.com.cn> (cherry picked from commit a991471f3e14298a8b32d1b5d566c895cea1c8e4)
* [stable-only] Cap bandit to 1.6.2Lee Yarwood2020-12-161-1/+1
| | | | | | | | | | | | | | | | The 1.6.3 [1] release has dropped support for py2 [2] so cap to 1.6.2 when using py2. [1] https://github.com/PyCQA/bandit/releases/tag/1.6.3 [2] https://github.com/PyCQA/bandit/pull/615 Depends-On: https://review.opendev.org/c/openstack/swift/+/766494 Conflicts: test-requirements.txt Closes-Bug: #1907438 Change-Id: Ie5221bf37c6ed9268a4aa0737ffcdd811e39360a
* Merge "[stable-only] Use a separate transaction for reading after race" into ↵Zuul2020-11-032-5/+14
|\ | | | | | | stable/queens
| * [stable-only] Use a separate transaction for reading after racemelanie witt2020-11-022-5/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | As part of data migration code to ensure a Project/User record, integrated placement creates a record if it does not exist. However, during a race situation, the logic to read back a record written by a racing request fails because a change written in a separate transaction will not be reflected in the current transaction when the isolation level is REPEATABLE_READ (the default): https://dev.mysql.com/doc/refman/8.0/en/innodb-transaction-isolation-levels.html This changes the read after catching DBDuplicateEntry to occur in a separate transaction so it can pick up the change written by the racing parallel request. Note: this is a stable-only change because the placement code containing the bug was temporary data-transitioning code that no longer exists in placement after Queens. Closes-Bug: #1731668 Change-Id: Ic90beaaa9848a4f39f4223f31a55cd2c681959cd
* | Merge "[stable-only] Add functional test for bug 1731668" into stable/queensZuul2020-11-031-0/+85
|\ \ | |/
| * [stable-only] Add functional test for bug 1731668melanie witt2020-11-021-0/+85
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This reproduces the bug to demonstrate the problem in a real MySQL database (the bug cannot be reproduced using sqlite) and verify that the fix works properly. The bug has to do with parallel transactions and isolation between transactions and the sqlite database does not have any isolation between operations on the same database connection: https://www.sqlite.org/isolation.html and we can't use separate in-memory database connections to sqlite for each transaction because each separate connection creates its own copy of the database. What we want is one copy but isolated transactions writing and reading from that one copy. Note: this is a stable-only change because the placement code containing the bug was temporary data-transitioning code that no longer exists in placement after Queens. Related-Bug: #1731668 Change-Id: I93d34c68bf89511dfeb53a4776c478b88463f24f
* | Merge "Follow up for cherry-pick check for merge patch" into stable/queensZuul2020-11-031-1/+1
|\ \ | |/
| * Follow up for cherry-pick check for merge patchmelanie witt2020-11-021-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This is a follow up to change I8e4e5afc773d53dee9c1c24951bb07a45ddc2f1a which fixed an issue with validation when the topmost patch after a Zuul rebase is a merge patch. We need to also use the $commit_hash variable for the check for stable-only patches, else it will incorrectly fail because it is checking the merge patch's commit message. Change-Id: Ia725346b65dd5e2f16aa049c74b45d99e22b3524 (cherry picked from commit 1e10461c71cb78226824988b8c903448ba7a8a76) (cherry picked from commit f1e4f6b078baf72e83cd7341c380aa0fc511519e) (cherry picked from commit e676a480544b3fa71fcaa984a658e2131b7538c5) (cherry picked from commit 115b43ed3e9514d9e4fb41da5582f0b185ecd10a) (cherry picked from commit cde42879a497cd2b91f0cf926e0417fda07b3c31) (cherry picked from commit 3c774435502a339f202e94ae15d637e49a19d4ce)
* | Merge "[placement] Add status and links fields to version document at /" ↵Zuul2020-10-155-1/+37
|\ \ | |/ |/| | | into stable/queens
| * [placement] Add status and links fields to version document at /Chris Dent2020-09-115-1/+37
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | According to the spec [1] the version discovery doc must have a status and links for each version. For the primary version the status value should be 'CURRENT'. For placement the version discovery doc and "self" are the same thing, so the provided "self" href looks redundant, but it makes keystoneauth1 happy when doing version discovery. In placement, since there is only one version at the moment, set status to CURRENT. Add a gabbi test that verifies the presence of both fields and values. Without these fields, use of placement with a client that follows the documented version discovery process will fail to work. As the version doc is not considered microversioned[2] and in any case this is making version discovery work where it didn't before, this is not a candidate for a microversion and can be backported to the beginning of placement's history if we like. I've updated the api-ref docs. In the process I made the max microversion in the sample discovery doc a bit more realistic and in alignment with these modern times. Changes: placement-api-ref/source/get-root.json NOTE(stephenfin): Modified the root API sample to reflect the max placement API version in Queens. [1] http://specs.openstack.org/openstack/api-wg/guidelines/microversion_specification.html#version-discovery [2] http://eavesdrop.openstack.org/irclogs/%23openstack-sdks/%23openstack-sdks.2018-06-13.log.html#t2018-06-13T13:40:12 Change-Id: Ie602ab1768efbf103563d8f6b9d28965fc81021a Closes-Bug: #1776668 (cherry picked from commit 1a5a3a9bc8409349ab817b4858ee54bf2a036dab)
* | Merge "compute: Don't delete the original attachment during pre LM rollback" ↵Zuul2020-10-073-8/+24
|\ \ | | | | | | | | | into stable/queens
| * | compute: Don't delete the original attachment during pre LM rollbackLee Yarwood2020-09-223-8/+24
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | I0bfb11296430dfffe9b091ae7c3a793617bd9d0d introduced support for live migration with cinderv3 volume attachments during Queens. This initial support handled failures in pre_live_migration directly by removing any attachments created on the destination and reverting to the original attachment ids before re-raising the caught exception to the source compute. It also added rollback code within the main _rollback_live_migration method but missed that this would also be called during a pre_live_migration rollback. As a result after a failure in pre_live_migration _rollback_live_migration will attempt to delete the source host volume attachments referenced by the bdm before updating the bdms with the now non-existent attachment ids, leaving the volumes in an `available` state in Cinder as they have no attachment records associated with them anymore. This change aims to resolve this within _rollback_volume_bdms by ensuring that the current and original attachment_ids are not equal before requesting that the current attachment referenced by the bdm is deleted. When called after a failure in pre_live_migration this should result in no attempt being made to remove the original source host attachments from Cinder. Note that the following changes muddy the waters slightly here but introduced no actual changes to the logic within _rollback_live_migration: * I0f3ab6604d8b79bdb75cf67571e359cfecc039d8 reworked some of the error handling in Rocky but isn't the source of the issue here. * Ibe9215c07a1ee00e0e121c69bcf7ee1b1b80fae0 reworked _rollback_live_migration to use the provided source_bdms. * I6bc73e8c8f98d9955f33f309beb8a7c56981b553 then refactored _rollback_live_migration, moving the logic into a self contained _rollback_volume_bdms method. Closes-Bug: #1889108 Change-Id: I9edb36c4df1cc0d8b529e669f06540de71766085 (cherry picked from commit 2102f1834a6ac9fd870bfb457b28a2172f33e281) (cherry picked from commit 034b2fa8fea0e34fed95a2ba728e4387ce4e78de) (cherry picked from commit c6c3483a41c2a53bcfafdfe3475283b0379f7f1d) (cherry picked from commit 6007c41aa830e1d1e227a8c66285b2eb32fe9a7c) (cherry picked from commit b18e93a2a486cc91e3867cefd68d223359d14bed)
* | | Merge "Add regression tests for bug #1889108" into stable/queensZuul2020-10-071-0/+122
|\ \ \ | |/ /
| * | Add regression tests for bug #1889108Lee Yarwood2020-09-221-0/+122
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | NOTE(lyarwood): nova.virt.fake.set_nodes() is required on stable/queens to avoid duplicate hostnames. Related-Bug: #1889108 Change-Id: Ib9dbc792dc918e7ea45915e2c1dbd96be82ef562 (cherry picked from commit 4c970f499c31370495d84c91a10319d308d13fb9) (cherry picked from commit 6db72002a65f30ac44b8df0a642b400ea272247e) (cherry picked from commit 6a9bb79fc088f4f888373a6ab2c8a70f143aa20d) (cherry picked from commit 06d9d0d70542f2f9846ca8f40aef531cec0329a2) (cherry picked from commit 7b2662c85ca304d5d9cf026858ec4102a477c36e)
* | | Merge "compute: refactor volume bdm rollback error handling" into stable/queensZuul2020-10-072-27/+178
|\ \ \ | |/ /
| * | compute: refactor volume bdm rollback error handlingLee Yarwood2020-09-222-27/+178
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Previously any exception while rolling back the connection_info and attachment_id of volume bdms would result in the overall attempt to rollback a LM failing. This change refactors this specific bdm rollback logic into two self contained methods that ignore by default errors where possible to allow the LM rollback attempt to continue. Change-Id: I6bc73e8c8f98d9955f33f309beb8a7c56981b553 (cherry picked from commit 9524a5a1b5745f6064f88cbfbf5bbfae3a973bef) (cherry picked from commit 377dc5bda9369e50c0c4a893564fc218b4b31fb1) (cherry picked from commit 07a04ee1715173d2f291bd56f40db690194f409b) (cherry picked from commit a6188ecd79223db0b5a264ad99e044fa2c5c4194)
* | | Merge "compute: Use source_bdms to reset attachment_ids during LM rollback" ↵Zuul2020-10-073-24/+34
|\ \ \ | |/ / | | | | | | into stable/queens
| * | compute: Use source_bdms to reset attachment_ids during LM rollbackLee Yarwood2020-09-223-24/+34
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | As we now provide the original source bdms during rollback we can also use them to reset any volume attachment ids to the ids used by the source compute host. Change-Id: Ibe9215c07a1ee00e0e121c69bcf7ee1b1b80fae0 (cherry picked from commit 0eea5041c4047bf3ab8bf71973926d80592e5e5c) (cherry picked from commit 8b865378b8d238abaac620d31b98f0ff2c355941) (cherry picked from commit b8a1f08bc828b25871d5db2071e103330e248f6c)
* | | Merge "Robustify attachment tracking in CinderFixtureNewAttachFlow" into ↵Zuul2020-10-061-20/+37
|\ \ \ | |/ / | | | | | | stable/queens
| * | Robustify attachment tracking in CinderFixtureNewAttachFlowMatt Riedemann2020-09-221-20/+37
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Cinder allows more than one attachment record on a non-multiattach volume as long as only one attachment is "connected" (has a host connector). When you create an empty (no connector) attachment for an in-use volume, the volume status changes to "attaching". If you try to update the empty attachment before deleting the previous attachment, Cinder will return a 400 like: Invalid volume: Volume b2aba195-6570-40c4-82bb-46d3557fceeb status must be available or downloading to reserve, but the current status is attaching. This change refactors the attachment tracking in the CinderFixtureNewAttachFlow fixture to be able to track the connector per attachment and if code tries to update an attachment on an already connected volume it will fail. Change-Id: I369f82245465e96fc15d4fc71a79a8a71f6f2c6d (cherry picked from commit 1d3ca5a3a07fdfff0d61ac11c390dfd4acab23d7) (cherry picked from commit 1e1bbdc4cdd0104c214134ef964e8621eab3de9c) (cherry picked from commit c1b372fc9264be8f7feb23fc939cfbe254da6eec)
* | | Merge "Improve CinderFixtureNewAttachFlow" into stable/queensZuul2020-10-061-3/+19
|\ \ \ | |/ /
| * | Improve CinderFixtureNewAttachFlowMatt Riedemann2020-09-221-3/+19
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This does three things: 1. Implements the attachment_complete method in order to fail if code is trying to complete an attachment that does not exist. 2. Adds logging in the various attachment CRUD methods to aid in debugging test failures. 3. Mirrors the method signature for is_microversion_supported to make sure code is at least calling it properly. Change-Id: If6a36d23768877bfa820ed44b610bfb113df5464 (cherry picked from commit 576a4e5260c4bc813474dead4eec19bd2a1cc680) (cherry picked from commit f81d1a5ce400e756836497d26ea5bd5f7c7c14a9) (cherry picked from commit b84eb40a66ccd74b8862cfa8708c9d3eda68a3c4
* | | Merge "compute: Allow snapshots to be created from PAUSED volume backed ↵Zuul2020-10-062-1/+6
|\ \ \ | |/ / |/| | | | | instances" into stable/queens
| * | compute: Allow snapshots to be created from PAUSED volume backed instancesLee Yarwood2020-08-262-1/+6
| |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Iabeb44f843c3c04f767c4103038fcf6c52966ff3 allowed snapshots to be created from PAUSED non-volume backed instances but missed the volume backed use case. This change simply adds PAUSED to the list of acceptable vm_states when creating a snapshot from a volume backed instance in addition to the already supported ACTIVE, STOPPED and SUSPENDED vm_states. Closes-Bug: #1878583 Change-Id: I9f95a054de9d43ecaa50ff7ffc9343490e212d53 (cherry picked from commit cfde53e4b402e71d7f53b6e0ab232854dba160dc) (cherry picked from commit a270eeeb9b1a65045c3a8bf3cfad5eee6415f63c) (cherry picked from commit c93ca609568bac73210f39207c821867620b2f0e) (cherry picked from commit 04a8399f1d0ce38bb3089c6c4cb3e11da924b2ae) (cherry picked from commit 35c1846d5cbdf10b08de1ffcd454a67662d32917)
* | libvirt: Provide VIR_MIGRATE_PARAM_PERSIST_XML during live migrationLee Yarwood2020-09-182-6/+93
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The VIR_MIGRATE_PARAM_PERSIST_XML parameter was introduced in libvirt v1.3.4 and is used to provide the new persistent configuration for the destination during a live migration: https://libvirt.org/html/libvirt-libvirt-domain.html#VIR_MIGRATE_PARAM_PERSIST_XML Without this parameter the persistent configuration on the destination will be the same as the original persistent configuration on the source when the VIR_MIGRATE_PERSIST_DEST flag is provided. As Nova does not currently provide the VIR_MIGRATE_PARAM_PERSIST_XML param but does provide the VIR_MIGRATE_PERSIST_DEST flag this means that a soft reboot by Nova of the instance after a live migration can revert the domain back to the original persistent configuration from the source. Note that this is only possible in Nova as a soft reboot actually results in the virDomainShutdown and virDomainLaunch libvirt APIs being called that recreate the domain using the persistent configuration. virDomainReboot does not result in this but is not called at this time. The impact of this on the instance after the soft reboot is pretty severe, host devices referenced in the original persistent configuration on the source may not exist or could even be used by other users on the destination. CPU and NUMA affinity could also differ drastically between the two hosts resulting in the instance being unable to start etc. As MIN_LIBVIRT_VERSION is now > v1.3.4 this change simply includes the VIR_MIGRATE_PARAM_PERSIST_XML param using the same updated XML for the destination as is already provided to VIR_MIGRATE_PARAM_DEST_XML. Conflicts: nova/tests/unit/virt/libvirt/test_driver.py nova/tests/unit/virt/test_virt_drivers.py nova/virt/libvirt/driver.py nova/virt/libvirt/guest.py NOTE(lyarwood): Conflicts as If0a091a7441f2c3269148e40ececc3696d69684c (libvirt: Bump MIN_{LIBVIRT,QEMU}_VERSION for "Rocky"), Id9ee1feeadf612fa79c3d280cee3a614a74a00a7 (libvirt: Remove usage of migrateToURI{2} APIs) and I3af68f745ffb23ef2b5407ccec0bebf4b2645734 (Remove mox in test_virt_drivers.py) are not present on stable/queens. As a result we can now add the parameter directly in _live_migration_operation before calling down into guest.migrate. Co-authored-by: Tadayoshi Hosoya <tad-hosoya@wr.jp.nec.com> Closes-Bug: #1890501 Change-Id: Ia3f1d8e83cbc574ce5cb440032e12bbcb1e10e98 (cherry picked from commit 1bb8ee95d4c3ddc3f607ac57526b75af1b7fbcff) (cherry picked from commit bbf9d1de06e9991acd968fceee899a8df3776d60) (cherry picked from commit 6a07edb4b29d8bfb5c86ed14263f7cd7525958c1) (cherry picked from commit b9ea91d17703f5b324a50727b6503ace0f4e95eb) (cherry picked from commit c438fd9a0eb1903306a53ab44e3ae80660d8a429)
* | Removed the host FQDN from the exception messagePraharshitha Metla2020-09-033-3/+3
|/ | | | | | | | | | | | | | | | | Deletion of an instance after disabling the hypervisor by a non-admin user leaks the host fqdn in fault msg of instance.Removing the 'host' field from the error message of HypervisorUnavaiable cause it's leaking host fqdn to non-admin users. The admin user will see the Hypervisor unavailable exception msg but will be able to figure on which compute host the guest is on and that the connection is broken. Change-Id: I0eae19399670f59c17c9a1a24e1bfcbf1b514e7b Closes-Bug: #1851587 (cherry picked from commit a89ffab83261060bbb9dedb2b8de6297b2d07efd) (cherry picked from commit ff82601204e9d724b3032dc94c49fa5c8de2699b) (cherry picked from commit c5abbd17b5552209e53ad61713c4787f47f463c6) (cherry picked from commit d5ff9f87c8af335e1f83476319a2540fead5224c) (cherry picked from commit 8c4af53d7754737f6857c25820a256487c45e676)
* Merge "objects: Update keypairs when saving an instance" into stable/queensZuul2020-08-114-8/+116
|\
| * objects: Update keypairs when saving an instanceTakashi NATSUME2020-07-314-8/+116
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The keypair of a server is updated when rebuilding the server with a keypair. This function has been added since API microversion 2.54. However the 'keypairs' of the instance object is not saved when saving the instance object currently. Make the instance object update the 'keypairs' field when saving the instance object. Change-Id: I8a2726b39d0444de8c35480024078a97430f5d0c Closes-Bug: #1843708 Co-authored-by: Stephen Finucane <stephenfin@redhat.com> (cherry picked from commit 086796021b189c3ac64805ed8f6bde833906d284) (cherry picked from commit aed86ee5d6289edf1baf9fe0b2a9e509031fdd25) (cherry picked from commit b971dc82cb524fe86284c95ec671e2bad1c2874f) (cherry picked from commit 0bc5a4ecb524a73aacb5d0dd2887799885bdbb14) (cherry picked from commit aa7a6939d5177c0dd8c9f5a7bf7975264d2f5a2a)
* | Merge "zuul: remove legacy-tempest-dsvm-neutron-dvr-multinode-full" into ↵Zuul2020-08-031-15/+0
|\ \ | | | | | | | | | stable/queens
| * | zuul: remove legacy-tempest-dsvm-neutron-dvr-multinode-fullLuigi Toscano2020-07-231-15/+0
| |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The job was part of the neutron experimental queue but then removed during the ussuri lifecycle. See https://review.opendev.org/#/c/693630/ Conflicts: .zuul.yaml The content of .zuul.yaml changed slightly. Change-Id: I04717b95dd44ae89f24bd74525d1c9607e3bc0fc (cherry picked from commit bce4a3ab97320bdc2a6a43e2a961a0aa0b8ffb63) (cherry picked from commit cf399a363ca530151895c4b7cf49ad7b2a79e01b) (cherry picked from commit b1ead1fb2adf25493e5cab472d529fde31f985f0) (cherry picked from commit 7b005f37853a56e3ec6da455008fa5ef0d03c21b) (cherry picked from commit e3093d42f46af810f316421a9b59eafe94039807)
* | ironic: add instance_uuid before any other spawn activityJim Rollenhagen2020-07-285-18/+221
|/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In the baremetal use case, it is necessary to allow a remote source of truth assert information about a physical node, as opposed to a client asserting desired configuration. As such, the prepare_networks_before_block_device_mapping virt driver method was added, however in doing so network VIF attaching was moved before actual hardware reservation. As ironic only supports users to have a number of VIFs limited by the number of network interfaces in the physical node, VIF attach actions cannot be performed without first asserting control over the node. Adding an "instance_uuid" upfront allows other ironic API consumers to be aware that a node is now in use. Alternatively it also allows nova to become aware prior to adding network information on the node that the node may already be in use by an external user. Co-Authored-By: Julia Kreger <juliaashleykreger@gmail.com> Conflicts: nova/tests/unit/compute/test_compute_mgr.py NOTE(melwitt): The conflict is because change I755b6fdddc9d754326cd9c81b6880581641f73e8 is not in Queens. Closes-Bug: #1766301 Change-Id: I87f085589bb663c519650f307f25d087c88bbdb1 (cherry picked from commit e45c5ec819cfba3a45367bfe7dd853769c80d816)
* Merge "fix scsi disk unit number of the attaching volume when cdrom bus is ↵Zuul2020-07-212-5/+51
|\ | | | | | | scsi" into stable/queens
| * fix scsi disk unit number of the attaching volume when cdrom bus is scsiKevin Zhao2020-07-202-5/+51
| | | | | | | | | | | | | | | | | | | | | | | | | | | | From Image Meta Properties: hw_cdrom_bus=scsi, and use virtio-scsi mode, it will also need a disk address for it. So we need to calculate the disk address when call the function to get the next unit of scsi controller. Closes-Bug: #1867075 Change-Id: Ifd8b249de3e8f96fa13db252f0abe2b1bd950de0 Signed-off-by: Kevin Zhao <kevin.zhao@linaro.org> (cherry picked from commit c8d6767cf8baaf3cc81496c83db10c8ae72fce06) (cherry picked from commit 11b2b7f0b3a8c09216cd8ebfea8b4cd059605290) (cherry picked from commit 86328d11468af66d95587b53ce28f65ed92c46d7) (cherry picked from commit 3b2c6ccf261ddb810473954559fa1dd1454e9f09)
* | Merge "Check cherry-pick hashes in pep8 tox target" into stable/queensZuul2020-07-212-0/+43
|\ \
| * | Check cherry-pick hashes in pep8 tox targetDan Smith2020-07-202-0/+43
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | NOTE(elod.illes): This is a combination of 2 commits: the cherry-pick hash checker script and a fix for the script. 1. Check cherry-pick hashes in pep8 tox target This adds a tools/ script that checks any cherry-picked hashes on the current commit (or a provided commit) to make sure that all the hashes exist on at least master or stable/.* branches. This should help avoid accidentally merging stable backports where one of the hashes along the line has changed due to conflicts. 2. Fix cherry-pick check for merge patch Cherry-pick check script validates the proposed patch's commit message. If a patch is not on top of the given branch then Zuul rebases it to the top and the patch becomes a merge patch. In this case the script validates the merge patch's commit message instead of the original patch's commit message and fails. This fix selects the parent of the patch if it is a merge patch. (cherry picked from commit c7c48c6f52c9159767b60a4576ba37726156a5f7) (cherry picked from commit 02f213b831d8e1d4a1d8ebb18d1260571fe20b84) (cherry picked from commit 7a5111ba2943014b6fd53a5fe7adcd9bc445315e) Change-Id: I4afaa0808b75cc31a8dd14663912c162281a1a42 (cherry picked from commit aebc829c4e0d39a160eaaa5ad949c1256c8179e6) (cherry picked from commit 5cacfaab82853241022d3a2a0734f82dae59a34b) (cherry picked from commit d307b964ce380f2fa57debc6c4c8346ac8736afe) (cherry picked from commit c3dd9f86f13a86c901443054de5ad3ab57953901) (cherry picked from commit f1ab10b8252bab4123c55a9fc10583710f347cef)
* | | Merge "Reject boot request for unsupported images" into stable/queensZuul2020-07-214-0/+52
|\ \ \ | |/ / |/| |
| * | Reject boot request for unsupported imagesBrian Rosmaita2020-07-174-0/+52
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Nova has never supported direct booting of an image of an encrypted volume uploaded to Glance via the Cinder upload-volume-to-image process, but instead of rejecting such a request, an 'active' but unusable instance is created. This patch allows Nova to use image metadata to detect such an image and reject the boot request. Change-Id: Idf84ccff254d26fa13473fe9741ddac21cbcf321 Related-bug: #1852106 Closes-bug: #1863611 (cherry picked from commit 963fd8c0f956bdf5c6c8987aa5d9f836386fd5ed) (cherry picked from commit 240d0309023fcaf20df44f819e9b3e14af97f526) (cherry picked from commit 6e71909b0b8ad8d20d0863e714cad2a7b120f658) (cherry picked from commit 02551d6d6a3baee49309cffbc3bef2508fcafe72)
* | | libvirt: Don't delete disks on shared storage during evacuateMatthew Booth2020-07-165-93/+192
|/ / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When evacuating an instance between compute hosts on shared storage, during the rebuild operation we call spawn() on the destination compute. spawn() currently assumes that it should cleanup all resources on failure, which results in user data being deleted in the evacuate case. This change modifies spawn in the libvirt driver such that it only cleans up resources it created. Conflicts: nova/virt/libvirt/driver.py NOTE(lyarwood): Conflicts due to I51673e58fc8d5f051df911630f6d7a928d123a5b ("Revert resize: wait for events according to hybrid plug") not being present in stable/queens. Co-Authored-By: Lee Yarwood <lyarwood@redhat.com> Closes-Bug: #1550919 Change-Id: I764481966c96a67d993da6e902dc9fc3ad29ee36 (cherry picked from commit 497360b0ea970f1e68912be8229ef8c3f5454e9e) (cherry picked from commit 8b48ca672d9c0eb108c71b7f9f3f089d9ecf688a) (cherry picked from commit 1a320f2a0e0918de6afcce5cf23b7de178ec3a49) (cherry picked from commit a7d8aa699793e1d60ece4e03920e6041337f9a43) (cherry picked from commit ae7602c1206de23439d6c3609b5872831138aa99)
* | Merge "libvirt: Fix misleading debug msg "Instance is running"" into ↵Zuul2020-07-151-1/+1
|\ \ | | | | | | | | | stable/queens
| * | libvirt: Fix misleading debug msg "Instance is running"Matthew Booth2020-07-151-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | We were logging "Instance is running" after guest creation, but before the instance is running. The log message we emit when the instance is actually running is "Instance spawned successfully". Change-Id: I53ef1fb6a612fc55fa60f3a50f8710c8bf5caba4 (cherry picked from commit 339c29f98051edac3f3ee63f1fd6887c5fc08d2e)