Commit Graph

58085 Commits

Author SHA1 Message Date
Lee Yarwood c11f4e5336 nova-multi-cell: Skip test_cold_migrate_unshelved_instance
Change-Id: I494bf6b10ffb2f54ac4d6079760b44178d82b3fd
Related-Bug: #1906428
2020-12-02 14:05:53 +00:00
Zuul f0efcae697 Merge "remove python warnning from tox" 2020-12-01 18:09:49 +00:00
Zuul 16cabdd100 Merge "doc: Fix rendering in the PTL guide" 2020-11-30 13:41:58 +00:00
Zuul b012361a53 Merge "Revert "zuul: Skip test_attach_scsi_disk_with_config_drive in nova-ceph-multistore"" 2020-11-30 10:23:11 +00:00
Zuul 007537a29e Merge "Replace md5 with oslo version" 2020-11-28 14:47:43 +00:00
Ghanshyam Mann 4bea68f12b Revert "zuul: Skip test_attach_scsi_disk_with_config_drive in nova-ceph-multistore"
This reverts commit 836e13cd57.

Reason for revert: depends-on patch fixed the test.

Change-Id: I999336dff277954e7621489cc7f5e486962ee2a5
Depends-On: https://review.opendev.org/c/openstack/tempest/+/764407
2020-11-28 14:36:49 +00:00
Zuul e2e7a917d5 Merge "zuul: Add devstack-plugin-ceph-compute-local-ephemeral to experimental" 2020-11-28 12:22:38 +00:00
Zuul 217498dd57 Merge "compute: Don't detach volumes when RescheduledException raised without retry" 2020-11-28 11:55:12 +00:00
Zuul f526685104 Merge "Support sys.argv in wsgi app" 2020-11-28 06:07:39 +00:00
Lee Yarwood 76360e566b nova-live-migration: Disable *all* virt services during negative tests
libvirtd was being restarted on the controller during negative
evacuation tests that rely on the service being to cause an
evacuation failure.

This change adds various virt services to the list of services stopped
and now disabled on the host to ensure these don't cause systemd to
restart libvirtd:

* virtlogd.service
* virtlogd-admin.socket
* virtlogd.socket
* virtlockd.service
* virtlockd-admin.socket
* virtlockd.socket

Closes-Bug: #1903979
Change-Id: Ic83252bbda76c205bcbf0eef184ce0b201e224fc
2020-11-27 13:35:42 +00:00
Lee Yarwood 7f7a7a163e zuul: Add devstack-plugin-ceph-compute-local-ephemeral to experimental
This job tests the recently introduced direct download of rbd hosted
Glance images into a file based imagecache.

Depends-On: https://review.opendev.org/748212
Change-Id: I0933447e6caa0013f0b26dbf6532ff1976197e80
2020-11-27 13:33:16 +00:00
Lee Yarwood 26c46a409f compute: Don't detach volumes when RescheduledException raised without retry
I8b1c05317734e14ea73dc868941351bb31210bf0 introduced a crude call to
_cleanup_volumes within _do_build_and_run_instance when handling a
RescheduledException exception raised from _build_and_run_instance
without any retry information provided from the scheduler.

This situation can arise when using the 'availability_zone' parameter to
skip the scheduler by providing both a target availability_zone and host
in the format of `$availability_zone:$host`. If the instance is unable
to build on the compute the failure will eventually lead to
_cleanup_volumes calling DriverVolumeBlockDevice.detach that will either
detach (cinderv2) or delete the associated volume attachments (cinderv3)
moving the volume to an `available` state, assuming it isn't
multi-attached etc.

The issue with this is that this behaviour is in stark contrast to that
of volumes associated with instances that have failed to schedule. In
that case the volumes remain marked as reserved and associated with the
ERROR'd out instance until the instance itself is deleted.

This change aims to align both cases by removing the call to
_cleanup_volumes and in doing so keeping any volumes in a `reserved`
state until the underlying instance is deleted.

Note that leaving these volumes associated with ERROR'd out instances is
now safe after I4dc6c8bd3bb6c135f8a698af41f5d0e026c39117 landed and now
ensures that ports and volumes associated with such an instance are
correctly cleaned up.

Closes-Bug: #1899649
Change-Id: I5dda9e8bca5fbaae77ece12b67176945ca4d9a4c
2020-11-27 13:32:16 +00:00
Lee Yarwood 836e13cd57 zuul: Skip test_attach_scsi_disk_with_config_drive in nova-ceph-multistore
Related-Bug: #1905725
Change-Id: Ia108a7ac04defe742efcac09e7c0d61b08ab4e6d
2020-11-27 09:11:34 +00:00
Zuul 5dbfbe692f Merge "Fix config option default value for sample config file" 2020-11-25 17:23:36 +00:00
Zuul c9b88cef90 Merge "releasenotes: Add fixes note for bug #1882521" 2020-11-25 16:10:54 +00:00
Takashi Natsume 9c0ea4a901 doc: Fix rendering in the PTL guide
Change-Id: I87c21431d8e286af793178ac934cc8f13cece523
Signed-off-by: Takashi Natsume <takanattie@gmail.com>
2020-11-25 23:14:59 +09:00
Zuul e035ff4079 Merge "Use _evacuate_server helper in func test" 2020-11-25 11:45:11 +00:00
Balazs Gibizer d38b7e13a6 Support sys.argv in wsgi app
At least uwsgi supports passing command line arguments to python wsgi
apps by specifying them as --pyargv for to uwsgi binary. Then the wsgi
app can access them normally via sys.argv.

This patch makes sure that nova-api and nova-metadata-api passes
sys.argv to oslo.config and therefore specifying config files for
these services now possible.

For example the following line in the systemclt service file makes sure
that the nova-api service reads both the nova.conf and the
nova-extra.conf

ExecStart = /usr/local/bin/uwsgi --procname-prefix nova-api \
  --ini /etc/nova/nova-api-uwsgi.ini \
  --pyargv "--config-file=/etc/nova/nova.conf
    --config-file=/etc/nova/nova-extra.conf"

Change-Id: If4783adda92da33d512d7c2834f0bb2e2a9b9654
Related-Bug: #1871482
2020-11-25 12:22:41 +01:00
Ghanshyam Mann 454b8d30f4 Fix config option default value for sample config file
There are multiple places where nova set the new default
value for other (than nova) namespace config option for
example oslo lib config options. Examples:

- https://github.com/openstack/nova/blob/20572809f2d8fefd72a7a059c4e82462a0d66262/nova/config.py#L62
- https://github.com/openstack/nova/blob/20572809f2d8fefd72a7a059c4e82462a0d66262/nova/policy.py#L48

and these defaults are reflected in code also which is working
as expected. But when config sample file is generated via
oslo-config-generator tool (tox -egenconfig) then these defaults
which are set by Nova are not reflected as this tool take the
raw defaults. To solve this issue oslo config provide a option
to add hook to reflect the new default in config generator
- https://docs.openstack.org/oslo.config/latest/cli/generator.html#modifying-defaults-from-other-namespaces

We already doing it for middleware cors option
- https://github.com/openstack/nova/blob/20572809f2d8fefd72a7a059c4e82462a0d66262/setup.cfg#L41

Fixing existing default value and if we find more or any future
change for default value, we need to add those config generator hook.

Change-Id: Ib0e926aec069dfb4ffd1bbfe8506d62464511b51
Closes-Bug: #1904250
2020-11-25 00:05:08 +00:00
Zuul e26a805d15 Merge "virt: Remove 'change_instance_metadata' API" 2020-11-23 18:14:17 +00:00
Zuul 5ce25fea3c Merge "Ignore InstanceNotFound exception when host rejoin cluster" 2020-11-23 16:28:38 +00:00
Zuul 28a0dfb11d Merge "doc: Update the PTL guide" 2020-11-23 15:45:44 +00:00
Zuul 2855f9eb9d Merge "Fix the instance_uuid for test" 2020-11-23 15:44:38 +00:00
Zuul ab90c7af56 Merge "Add os-volume_attachments reference docs" 2020-11-23 12:58:41 +00:00
Zuul c3a7377097 Merge "Reproduce bug 1897528" 2020-11-23 12:58:06 +00:00
Zuul e16800cc0a Merge "Add missing exception" 2020-11-19 14:48:27 +00:00
Rocky ed756d07b1 Fix the instance_uuid for test
Change-Id: Id204c768e1dc01a44aa0addbcb77ad1e7e165919
2020-11-18 23:20:16 +11:00
Zuul cc0ab6b20e Merge "[docs] Fix a placement client's command" 2020-11-18 10:33:15 +00:00
Zuul 4d4abdbf25 Merge "[Trivial]Add missing white space in the log message" 2020-11-18 10:33:04 +00:00
Zuul ffb916e0a1 Merge "Set instance host and drop migration under lock" 2020-11-18 10:32:56 +00:00
Zuul 41317458c7 Merge "Reproduce bug 1896463 in func env" 2020-11-18 10:29:06 +00:00
Zuul 9fe9e4696f Merge "api-ref: Move 'os-agents' API to obsolete section" 2020-11-17 14:51:49 +00:00
Zuul ac06267715 Merge "Fix the vGPU dynamic options race" 2020-11-17 14:51:35 +00:00
Zuul e20b1f72f3 Merge "Restore retrying the RPC connection to conductor" 2020-11-17 14:51:25 +00:00
Stephen Finucane 30067be9bd virt: Remove 'change_instance_metadata' API
This was used to propagate the metadata changes to the hypervisor. For
all non-XenAPI drivers, we still allow updating instance metadata via
the API (i.e. '/servers/{server_id}/metadata') but this simply changes
what is exposed via the metadata API.

Change-Id: Ibd0ffd9906e7d7f22a9233539091d450e8023f07
Signed-off-by: Stephen Finucane <stephenfin@redhat.com>
2020-11-17 11:42:08 +00:00
Stephen Finucane 160ed6ff65 Add missing exception
Change Idd49b0c70caedfcd42420ffa2ac926a6087d406e added support for
discovery of PMEM devices by the libvirt driver. Some error handling
code in this was expected to raise a 'GetPMEMNamespacesFailed'
exception, however, a typo meant the exception was actually called
'GetPMEMNamespaceFailed' (singular). This exception was later removed in
change I6fd027fb51823b8a8a24ed7b864a2191c4e8e8c0 because it had no
references.

Re-introduce the exception, this time with the correct name, and add
some unit tests to prevent us regressing.

Change-Id: I3b597a46314a1b29a952fc0f7a9c4537341e37b8
Signed-off-by: Stephen Finucane <stephenfin@redhat.com>
Closes-Bug: #1904446
2020-11-17 11:38:57 +00:00
Stephen Finucane e13e8c8cd4 api-ref: Move 'os-agents' API to obsolete section
Follow up for change I9512f605dd2b3b0e88c951ed086250d57056303d.

Change-Id: Ia627bab8ed911baf329e0bda385beb2ffcbbe7d6
Signed-off-by: Stephen Finucane <stephenfin@redhat.com>
2020-11-17 11:25:07 +00:00
Balazs Gibizer 976ac722d3 Reproduce bug 1897528
The nova-compute fails to start if the hypervisor has PCI addresses
32bit domain.

Change-Id: I48dcb7faa17fe9f8346445a1746cff5845baf358
Related-Bug: #1897528
2020-11-16 11:16:57 +01:00
zhufl 2c28b74340 [Trivial]Add missing white space in the log message
This is to add missing white space in the log message.

Change-Id: I4098178e73134c91697c3ac8205ffe8346937f3c
2020-11-16 17:29:23 +08:00
Zuul 43b8df3ae8 Merge "Remove compute service level check for qos ops" 2020-11-15 08:19:55 +00:00
Zuul b16050eeab Merge "Remove [database]connection defaulting" 2020-11-14 18:42:59 +00:00
Zuul 2486987720 Merge "objects: Remove Agent, AgentList" 2020-11-14 14:42:25 +00:00
Zuul ff3170fbd6 Merge "Fix unplugging VIF when migrate/resize VM" 2020-11-14 11:51:22 +00:00
Zuul eb6ce97544 Merge "api: Remove 'os-agents' API" 2020-11-14 10:06:44 +00:00
Zuul eadd32657f Merge "Add functional-py39 testing" 2020-11-14 05:36:35 +00:00
Takashi Natsume a1ec6e69fa doc: Update the PTL guide
Add a description to update the contributor guide
in the PTL guide.

Change-Id: I1e292a98ed72cf181a944c2bb20ff3a4d0bdd600
Signed-off-by: Takashi Natsume <takanattie@gmail.com>
2020-11-14 13:56:42 +09:00
Balazs Gibizer 433bee58bc Restore retrying the RPC connection to conductor
Before Ie15ec8299ae52ae8f5334d591ed3944e9585cf71 if the compute was
started before the conductor then the compute retried the connection
until the conductor was up. The Ie15ec8299ae52ae8f5334d591ed3944e9585cf71
break this behavior as the service version check runs before this RPC
retry mechanism and therefore the compute simply fails to start without
a retry if no conductor is started.

This patch moves the service version check after the RPC connection
retry mechanism.

Change-Id: Iad0ba1a02868eebc2f43b1ac843fcc5096cd5c47
Closes-Bug: #1904181
2020-11-13 18:02:00 +01:00
Radosław Piliszek 52c8137b4b [docs] Fix a placement client's command
For amending a single value, `--amend` switch is required to be
used. Otherwise Placement will return 400 about required
properties being missing.

Change-Id: Ia94be98dea22f97bc89201ee2a0a1a4e6b54c875
2020-11-13 15:26:46 +01:00
Zuul 20572809f2 Merge "functional: Wait for revert resize to complete" 2020-11-13 13:40:14 +00:00
Stephen Finucane 1d23b358d6 functional: Wait for revert resize to complete
When reverting a resize, we need to wait for the migration status to
change to 'reverted', but we also need to wait for the relevant
versioned notification to be emitted. The reason for this is noted in a
couple of places, including the '_revert_resize' helper in the
'nova.tests.functional.integrated_helpers.InstanceHelperMixin' module:

  [T]he migration status is changed to "reverted" in the dest host
  revert_resize method but the allocations are cleaned up in the source
  host finish_revert_resize method so we need to wait for the
  finish_revert_resize method to complete.

Two tests in the 'test_cross_cell_migrate' test module were not doing
this wait, resulting in intermittent failures in CI due to the races.
Resolve this now.

Change-Id: I3ec6cae19b362ac9cc311a979f680cf64db4f458
Signed-off-by: Stephen Finucane <stephenfin@redhat.com>
Closes-Bug: #1904051
2020-11-12 19:41:27 +00:00