Commit Graph

59771 Commits

Author SHA1 Message Date
Amit Uniyal 1495d802c6 Updated Suspend definition in server concepts doc
Closes-Bug: #1943881
Change-Id: Icb8de13f665c340cd5d863654f8ad981de21293d
2022-08-02 04:18:10 +00:00
Zuul 0bea7f6b6b Merge "Add a workaround to skip hypervisor version check on LM" 2022-07-27 13:46:29 +00:00
Kashyap Chamarthy 00ed8a232b Add a workaround to skip hypervisor version check on LM
When turned on, this will disable the version-checking of hypervisors
during live-migration.  This can be useful for operators in certain
scenarios when upgrading.  E.g. if you want to relocate all instances
off a compute node due to an emergency hardware issue, and you only have
another old compute node ready at the time.

Note, though: libvirt will do its own internal compatibility checks, and
might still reject live migration if the destination is incompatible.

Closes-Bug: #1982853

Change-Id: Iec387dcbc49ddb91ebf5cfd188224eaf6021c0e1
Signed-off-by: Kashyap Chamarthy <kchamart@redhat.com>
2022-07-27 12:20:03 +02:00
René Ribaud 09239fc2ea Allow unshelve to a specific host (REST API part)
This adds support to the REST API, in a new microversion, for specifying
a destination host to unshelve server action when the server
is shelved offloaded.
This patch also supports the ability to unpin the availability_zone of an
instance that is bound to it.

Note that the functional test changes are due to those tests using the
"latest" microversion 2.91.

Implements: blueprint unshelve-to-host
Change-Id: I9e95428c208582741e6cd99bd3260d6742fcc6b7
2022-07-22 10:22:34 +02:00
René Ribaud a263fa46f8 Allow unshelve to a specific host (Compute API part)
This patch introduce changes to the compute API that will allow
PROJECT_ADMIN to unshelve an shelved offloaded server to a specific host.
This patch also supports the ability to unpin the availability_zone of an
instance that is bound to it.

Implements: blueprint unshelve-to-host
Change-Id: Ieb4766fdd88c469574fad823e05fe401537cdc30
2022-07-22 10:22:24 +02:00
Zuul bcb96f362a Merge "libvirt: Remove unnecessary TODO" 2022-07-19 11:47:39 +00:00
Zuul 9d8a8d8ed8 Merge "libvirt: Ignore LibvirtConfigObject kwargs" 2022-07-19 11:27:26 +00:00
Zuul bf347a17c0 Merge "Add a proper schema version to network_data.json" 2022-07-19 09:22:42 +00:00
Zuul f90fd95f5e Merge "Adds link in releasenotes for hw machine type bug" 2022-07-19 08:48:54 +00:00
Stephen Finucane 2709e30956 Fix compatibility with jsonschema 4.x
This changed one of the error messages we depend on [1].

[1] https://github.com/python-jsonschema/jsonschema/commit/641e9b8c

Change-Id: I643ec568ee2eb2ec1a555f813fd2f1acff915afa
Signed-off-by: Stephen Finucane <sfinucan@redhat.com>
2022-07-18 12:30:25 +01:00
Stephen Finucane e1a925772b Remove unused requirement
We no longer support Python 3.6 so there's no need for Python 3.6-only
dependencies.

Change-Id: I139e454a2c6e49a1d5229c90a56d518b0d96ca57
Signed-off-by: Stephen Finucane <sfinucan@redhat.com>
2022-07-18 12:30:25 +01:00
Zuul ef18d36bf8 Merge "etc: Highlight absence of packages from config gen" 2022-07-18 05:12:09 +00:00
Zuul 700db274c6 Merge "Update the file for IPv4-only or IPv6-only network" 2022-07-18 05:00:34 +00:00
Zuul e413ac015f Merge "libvirt: remove default cputune shares value" 2022-07-15 11:25:40 +00:00
Stephen Finucane f08b71f3ab libvirt: Remove unnecessary TODO
The 'guest.os_mach_type' property is set to the value returned by
'libvirt.utils.get_machine_type'. This will attempt to pull a machine
type from image metadata and fallback to a sensible default. As such, we
never need to worry about 'guest.os_mach_type' being unset on x86 hosts.

Change-Id: Ibc6d3dcaaa704599b7963bf97bdd901788f5af45
Signed-off-by: Stephen Finucane <stephenfin@redhat.com>
2022-07-15 04:10:58 +08:00
Stephen Finucane f708feee35 libvirt: Ignore LibvirtConfigObject kwargs
We were mostly ignoring these except for a few limited examples. Do it
for everything.

Change-Id: Id55e1a8f3559386e27c5cb6a0fde94a4a69e7ea9
Signed-off-by: Stephen Finucane <stephenfin@redhat.com>
2022-07-15 04:10:58 +08:00
Dmitry Tantsur 4fdc0807b4 Add a proper schema version to network_data.json
What we have there is not a schema URI. Having a proper URI allows
auto-detection of the schema version (draft-07 in this case).

Change-Id: I208a05c7ba64a21ed8cde7bc1ebae2b5878109e0
2022-07-14 17:59:21 +02:00
Artom Lifshitz f77a9fee5b libvirt: remove default cputune shares value
Previously, the libvirt driver defaulted to 1024 * (# of CPUs) for the
value of domain/cputune/shares in the libvirt XML. This value is then
passed directly by libvirt to the cgroups API. Cgroups v2 imposes a
maximum value of 10000 that can be passed in. This makes Nova
unable to launch instances with more than 9 CPUs on hosts that run
cgroups v2, like Ubuntu Jammy or RHEL 9.

Fix this by just removing the default entirely. Because there is no
longer a guarantee that domain/cputune will contain at least a shares
element, we can stop always generating the former, and only generate
it if it will actually contain something.

We can also make operators's lives easier by leveraging the fact that
we update the XML during live migration, so this patch also adds a
method to remove the shares value from the live migration XML if one
was not set as the quota:cpu_shares flavor extra spec.

For operators that *have* set this extra spec to something greater
than 10000, their flavors will have to get updates, and their
instances resized.

Partial-bug: 1978489
Change-Id: I49d757f5f261b3562ada27e6cf57284f615ca395
2022-07-14 11:55:40 -04:00
Stephen Finucane 8133092907 Remove use of pkg_resources
Use of this library has significant performance implications. While
we're probably not too badly affected, we don't actually need to use it
here. The 'parse_version' utility it exposes is intended to parse
PEP440-compliant version identifiers, not the simple microversions
placement uses, which the 'microversion_parse' library can competently
parse for us.

Change-Id: I9b7281caec6fa53600dea316492d052787cf799b
Signed-off-by: Stephen Finucane <stephenfin@redhat.com>
2022-07-14 15:20:55 +01:00
Stephen Finucane 786a09ad7a etc: Highlight absence of packages from config gen
We manage the configuration of the oslo.messaging configuration options
ourselves. As a result, there's no reason to include this in
nova-config-generator.conf. Indicate this for others than might get
confused like I did.

Change-Id: I7419788d1d54979b5a2c1eb701895c635aac42ee
Signed-off-by: Stephen Finucane <sfinucan@redhat.com>
2022-07-14 09:53:52 +01:00
Zuul de65131f92 Merge "zuul: Put Centos9 Stream job periodic-weekly and experimental" 2022-07-12 17:54:11 +00:00
Amit Uniyal 467bbee758 Adds link in releasenotes for hw machine type bug
Change-Id: Icdc96b1773bfaf224b9adf1a82cc1ebb75af67e3
2022-07-12 13:02:11 +00:00
Zuul 9a8dcb35c9 Merge "Optimize _local_delete calls by compute unit tests" 2022-07-12 09:46:54 +00:00
Zuul f163db90a1 Merge "Catch an exception in power off procedure" 2022-07-12 09:46:46 +00:00
Sylvain Bauza 4fb2aa4682 zuul: Put Centos9 Stream job periodic-weekly and experimental
This patch is a followup on 45c0a3884b

As agreed on the Nova weekly meeting [1], we won't put back C9S job to voting
and we'll rather put it on both experimental and periodic-weekly pipelines.
In order to insure we will monitor the status of those runs, we'll check
the status of the job during every Nova meeting happening weekly.

In order to trigger potential race conditions, it was acted to provide an
experimental job for C9S too.

[1] https://meetings.opendev.org/meetings/nova/2022/nova.2022-07-05-16.00.log.html#l-52

Change-Id: I2de4d90202fd7e735026150f79409d51f2d70e0e
2022-07-12 09:58:39 +02:00
Zuul 4bead404fe Merge "Remove return from rpc cast" 2022-07-10 12:06:25 +00:00
Zuul 90c0c687a4 Merge "Retry attachment delete API call for 504 Gateway Timeout" 2022-07-08 12:30:56 +00:00
Sean Mooney cbf9b2b873 update nova-next and nova-ovs-hybrid-plug to disable linuxbridge
neutron now declares linuxbridge experimental and requires
it to be enabled by a new config option. We do not set
that in these jobs so the neutron server fails to load
since we enable the linux bridge mech driver.

we do not actully use linuxbridge in these jobs so this patch
just disables the mech driver.

Change-Id: I129a850c3327498d26d899c7709f5749622afdd8
Closes-Bug: #1980948
2022-07-07 12:46:32 +01:00
Zuul 512fbdfa99 Merge "Adds validation for hw machine type in host caps" 2022-07-01 15:24:20 +00:00
Zuul b597cb49a8 Merge "ignore deleted server groups in validation" 2022-06-30 16:37:43 +00:00
Amit Uniyal 7b9312ef8e Adds validation for hw machine type in host caps
Added function '_check_machine_type' which accept host
capabilities (caps) and machine type as param and look
for machine type in host caps object, if machine type
is not found raises exception InvalidMachineType

Closes-Bug: #1933097
Change-Id: I59d22c0342d6b0f3c0398ce62ec177dae39b5677
2022-06-27 11:37:56 +00:00
Zuul c53ec4e488 Merge "Change TooOldComputeService upgrade check code to failure" 2022-06-23 11:06:01 +00:00
OpenStack Proposal Bot c4cd6ee461 Imported Translations from Zanata
For more information about this automatic import see:
https://docs.openstack.org/i18n/latest/reviewing-translation-import.html

Change-Id: I8d9a8dff4ef8767fff4517c55cd5676d263c9aac
2022-06-22 03:52:44 +00:00
Sean Mooney cd2c2f359b ignore deleted server groups in validation
This change simply catches the exception raised when
we lookup a servergroup via a hint and the validation
upcall is enabled.

Change-Id: I858b4da35382a9f4dcf88f4b6db340e1f34eb82d
Closes-Bug: #1890244
2022-06-21 19:13:55 +01:00
Sean Mooney 84a84f7f2f add repoducer test for bug 1890244
This change adds a test to simulate validating
a instnace group policy where the group has been
deleted but is still referenced in the scheduler hint.

Change-Id: I803e6286a773d9e53639ab0cd449fc72bb3be613
Related-Bug: #1890244
2022-06-21 12:04:20 +01:00
Zuul ebe08834f3 Merge "tests: Add test for bug #1936278" 2022-06-20 15:20:03 +00:00
Rajesh Tailor 7824471b79 Remove return from rpc cast
This change removes return statement from rpc cast method calls.
As rpc cast are asynchronous, so doesn't return anything.

Change-Id: I766f64f2c086dd652bc28b338320cc94ccc48f1f
2022-06-18 16:23:26 +05:30
Sylvain Bauza 45c0a3884b zuul: Temporarly put Centos9 Stream job non-voting
Due to the bug below, all the nova patches are failing. I accordingly
propose to make the job non-voting as it would allow our gate to ressurect.

Of course, this is a transient solution and we need a proper fix for the
job in order to have Centos 9 Stream support back in place ASAP.

When the job is back OK, please make it voting again by reverting this patch.

Change-Id: I5c3fff65fd6d9e4f3632d1ec62ae3f1f9cfbe626
Related-Bug: #1979047
2022-06-17 12:04:13 +02:00
Zuul 93a65f06df Merge "Record SRIOV PF MAC in the binding profile" 2022-06-13 17:25:14 +00:00
Takashi Kajinami 8f4b740ca5 Retry attachment delete API call for 504 Gateway Timeout
When cinder-api runs behind a load balancer(eg haproxy), the load
balancer can return 504 Gateway Timeout when cinder-api does not
respond within timeout. This change ensures nova retries deleting
a volume attachment in that case.

Also this change makes nova ignore 404 in the API call. This is
required because cinder might continue deleting the attachment even if
the load balancer returns 504. This also helps us in the situation
where the volume attachment was accidentally removed by users.

Closes-Bug: #1978444
Change-Id: I593011d9f4c43cdae7a3d53b556c6e2a2b939989
2022-06-13 17:32:35 +09:00
Pierre Riteau 9af4c6115f Change TooOldComputeService upgrade check code to failure
The TooOldComputeService upgrade check currently produces a warning,
which may be missed if the upgrade process only checks the exit code of
the upgrade check command.

Since this can lead to Nova control services failing to start, make the
upgrade check a failure instead, so it results in a non-zero exit code.

Closes-Bug: #1956983
Change-Id: Ia3ce6a0b0b810667ac0a66502a43038fe43c5aed
2022-06-09 20:56:26 +02:00
Alexey Stupnikov f551447804 Optimize _local_delete calls by compute unit tests
_fake_do_delete function from nova/tests/unit/compute/test_api.py is
called with reservations=None argument. This argument is no longer used
in _local_delete. Since_fake_do_delete function is not really used
because it only contains pass statement, we can replace it with no op
call implemented using lambda function.

Change-Id: Idf9686afeadc2d000c3bc255e809c914967a063f
2022-06-02 17:32:37 +02:00
Zuul d869163608 Merge "Fix typos" 2022-06-01 10:50:15 +00:00
Zuul 6f0c7891fb Merge "Fix typos in help messages" 2022-06-01 10:50:06 +00:00
Zuul e00f53aa8b Merge "docs: Correct path used for config on Hyper-V" 2022-05-30 16:54:55 +00:00
Zuul f2855239b7 Merge "Fix race condition in _get_pci_passthrough_devices" 2022-05-30 16:54:38 +00:00
Zuul d7c6ea2b56 Merge "Accept both 1 and Y as AMD SEV KVM kernel param value" 2022-05-30 16:54:30 +00:00
Zuul b2f5ca667b Merge "Add missing condition" 2022-05-30 16:54:22 +00:00
Zuul 6906e17f79 Merge "Fix duplicates keys" 2022-05-30 16:54:13 +00:00
wnark 4d6cce1d10 docs: Correct path used for config on Hyper-V
Because in the above description:

  To install nova-compute, run:

  PS C:\> cd c:\nova
  PS C:\> python setup.py install

The file is downloaded to c:\nova. After executing `python setup.py
install` in this directory, the etc directory is generated under
`c:\nova`. Correct the path.

Closes-Bug: #1964548
Change-Id: Ibf0c1b56f235fffae65afbbcee30056bae965afe
2022-05-30 14:40:00 +01:00