Skip to content

Conversation

github-actions[bot]
Copy link

@github-actions github-actions bot commented Nov 3, 2023

This PR contains a snapshot of yoga from upstream.

notartom and others added 30 commits April 30, 2022 12:59
Previously, the libvirt driver's live migration rollback code would
unconditionally refer to migrate_data.vifs. This field would only be
set if the Neutron multiple port bindings extension was in use. When
it is not in use, the reference would fail with a NotImplementedError.
This patch wraps the migrate_data.vifs reference in a conditional that
checks if the vifs field is actually set. This is the only way to do
it, as in the libvirt driver we do not have access to the network
API's has_port_binding_extension() helper.

Closes-bug: 1969980
Change-Id: I48ca6a77de38e3afaa44630e6ae1fd41d2031ba9
(cherry picked from commit aa1b0a7)
Related-Bug: #1983753
Change-Id: Ic6566272b8c5af57cd1c73c73b3cba6cd265bebe
(cherry picked from commit 6d602c6)
Nova uses the RequestSpec.pci_request in the PciPassthroughFilter to
decide if the PCI devicesm, requested via the pci_alias in the flavor
extra_spec, are available on a potential target host. During resize the
new flavor might contain different pci_alias request than the old flavor
of the instance. In this case Nova should use the pci_alias from the new
flavor to scheduler the destination host of the resize. However this
logic was missing and Nova used the old pci_request value based on the
old flavor. This patch adds the missing logic.

Closes-Bug: #1983753
Closes-Bug: #1941005
Change-Id: I73c9ae27e9c42ee211a53bed3d849650b65f08be
(cherry picked from commit a93092e)
Related-Bug: #1941005
Related-Bug: #1983753
Change-Id: I16ed1143ead3779c87698aa29bac005678db2993
(cherry picked from commit 82cdfa2)
Change-Id: I1348cca8cbd8b1142dab8507c8aa1b9baf01e73c
(cherry picked from commit 4fb4f68)
(cherry picked from commit c3489ed)
We have many places where we implement singleton behavior for the
placement client. This unifies them into a single place and
implementation. Not only does this DRY things up, but may cause us
to initialize it fewer times and also allows for emitting a common
set of error messages about expected failures for better
troubleshooting.

Change-Id: Iab8a791f64323f996e1d6e6d5a7e7a7c34eb4fb3
Related-Bug: #1846820
(cherry picked from commit c178d93)
Conductor creates a placement client for the potential case where
it needs to make a call for certain operations. A transient network
or keystone failure will currently cause it to abort startup, which
means it is not available for other unrelated activities, such as
DB proxying for compute.

This makes conductor test the placement client on startup, but only
abort startup on errors that are highly likely to be permanent
configuration errors, and only warn about things like being unable
to contact keystone/placement during initialization. If a non-fatal
error is encountered at startup, later operations needing the
placement client will retry initialization.

Conflicts:
    nova/tests/unit/conductor/test_conductor.py

NOTE(melwitt): The conflict is because change
Id5b04cf2f6ca24af8e366d23f15cf0e5cac8e1cc
(Use unittest.mock instead of third party mock) is not in Yoga.

Closes-Bug: #1846820
Change-Id: Idb7fcbce0c9562e7b9bd3e80f2a6d4b9bc286830
(cherry picked from commit 232684b)
After a baremetal instance is deleted, and its allocation is removed
in placement, the ironic node might start cleaning. Eventually nova
will notice and update the inventory to be reserved.
During this window, a new instance may have already picked this
ironic node.

When that race happens today the build fails with an error:
"Failed to reserve node ..."

This change tries to ensure the remaining alternative hosts are
attempted before aborting the build.
Clearly the race is still there, but this makes it less painful.

Related-Bug: #1974070
Change-Id: Ie5cdc17219c86927ab3769605808cb9d9fa9fa4d
(cherry picked from commit 8a47606)
(cherry picked from commit d71e9f6)
When instance task state is 'deleting' or 'migrating', then
get_vnc_console throws 500 error, as InstanceInvalidState
exception is not handled there.

This change handles InstanceInvalidState in api layer in
get_vnc_console call.

Closes-Bug: #1968618
Change-Id: Ia738a0972b050f549f446c85171d3f33e60ada4f
(cherry picked from commit ec40d5a)
(cherry picked from commit 7185516)
As of now, when attempting to rescue a volume-based instance
using an image without the hw_rescue_device and/or hw_rescue_bus
properties set, the rescue api call fails (as non-stable rescue
for volume-based instances are not supported) leaving the instance
in error state.

This change checks for hw_rescue_device/hw_rescue_bus image
properties before attempting to rescue and if the property
is not set, then fail with proper error message, without changing
instance state.

Related-Bug: #1978958
Closes-Bug: #1926601
Change-Id: Id4c8c5f3b32985ac7d3d7c833b82e0876f7367c1
(cherry picked from commit 6eed55b)
(cherry picked from commit d00a848)
Previously Nova was unable to remove deleted projects from flavor's
access lists. This patch lifts described limitation and improves
logic of nova/api/openstack/identity.py library by introducing two
separate kinds of exceptions:

- webob.exc.HTTPInternalServerError is raised when Keystone identity
  service version 3.0 was not found.
- webob.exc.HTTPBadRequest is raised when specified project is not
  found.

Closes-bug: #1980845
Change-Id: Icbf3bdd944f9a6c38f25ddea0b521ca48ee87a7f
(cherry picked from commit 8c6daaa)
(cherry picked from commit 2ea2b55)
The 'force' parameter of os-brick's disconnect_volume() method allows
callers to ignore flushing errors and ensure that devices are being
removed from the host.

We should use force=True when we are going to delete an instance to
avoid leaving leftover devices connected to the compute host which
could then potentially be reused to map to volumes to an instance that
should not have access to those volumes.

We can use force=True even when disconnecting a volume that will not be
deleted on termination because os-brick will always attempt to flush
and disconnect gracefully before forcefully removing devices.

Closes-Bug: #2004555

Change-Id: I3629b84d3255a8fe9d8a7cea8c6131d7c40899e8
(cherry picked from commit db45554)
(cherry picked from commit efb0198)
(cherry picked from commit 8b4b991)
When the [service_user] section is configured in nova.conf, nova will
have the ability to send a service user token alongside the user's
token. The service user token is sent when nova calls other services'
REST APIs to authenticate as a service, and service calls can sometimes
have elevated privileges.

Currently, nova does not however have the ability to send a service user
token with an admin context. This means that when nova makes REST API
calls to other services with an anonymous admin RequestContext (such as
in nova-manage or periodic tasks), it will not be authenticated as a
service.

This adds a keyword argument to service_auth.get_auth_plugin() to
enable callers to provide a user_auth object instead of attempting to
extract the user_auth from the RequestContext.

The cinder and neutron client modules are also adjusted to make use of
the new user_auth keyword argument so that nova calls made with
anonymous admin request contexts can authenticate as a service when
configured.

Related-Bug: #2004555

Change-Id: I14df2d55f4b2f0be58f1a6ad3f19e48f7a6bfcb4
(cherry picked from commit 41c64b9)
(cherry picked from commit 1f78142)
(cherry picked from commit 0d6dd6c)
Make the host class look under '/sys/fs/cgroup/cgroup.controllers' for support of the cpu controller. The host will try searching through cgroupsv1 first, just like up until now, and in the case that fails, it will try cgroupsv2 then. The host will not support the feature if both checks fail.

This new check needs to be mocked by all tests that focus on this piece of code, as it touches a system file that requires privileges. For such thing, the CGroupsFixture is defined to easily add suck mocking to all test cases that require so.

I also removed old mocking at test_driver.py in favor of the fixture from above.

Conflicts:
    nova/tests/unit/virt/libvirt/test_driver.py

NOTE(auniyal):
- as new cgroup fixture is added, removed old mocking in few more unit test cases in test_driver
- did not remove test_guest_cpu_shares_with_multi_vcpu from test_driver

Partial-Bug: #2008102
Change-Id: I99b57c27c8a4425389bec2b7f05af660bab85610
(cherry picked from commit 973ff4f)
(cherry picked from commit eb3fe4d)
(cherry picked from commit 9e86be5)
validate-backport job started to fail as only old stable branch naming
is accepted. This patch extends the script to allow numbers and dot as
well in the branch names (like stable/2023.1).

Change-Id: Icbdcd5d124717e195d55d9e42530611ed812fadd
(cherry picked from commit fe125da)
(cherry picked from commit 09f85a8)
(cherry picked from commit abd9a34)
Unfortunatly when we merged Ie166f3b51fddeaf916cda7c5ac34bbcdda0fd17a we
forgot that subnets can have no segment_id field.

Change-Id: Idb35b7e3c69fe8efe498abe4ebcc6cad8918c4ed
Closes-Bug: #2018375
(cherry picked from commit 6d7bd6a)
(cherry picked from commit 6b8d9d4)
(cherry picked from commit 77db642)
yusuke-okada and others added 5 commits June 6, 2023 10:30
The late anti-affinity check runs in the compute manager to avoid
parallel scheduling requests to invalidate the anti-affinity server
group policy. When the check fails the instance is re-scheduled.
However this failure counted as a real instance boot failure of the
compute host and can lead to de-prioritization of the compute host
in the scheduler via BuildFailureWeigher. As the late anti-affinity
check does not indicate any fault of the compute host itself it
should not be counted towards the build failure counter.
This patch adds new build results to handle this case.

Closes-Bug: #1996732
Change-Id: I2ba035c09ace20e9835d9d12a5c5bee17d616718
Signed-off-by: Yusuke Okada <okada.yusuke@fujitsu.com>
(cherry picked from commit 56d320a)
(cherry picked from commit 1b56714)
(cherry picked from commit 2f1d657)
As of I8ca059a4702471d4d30ea5a06079859eba3f5a81 validations
are now requried for test_rebuild_volume_backed_server.
Validations are also required for any volume attach/detach based test
in general due to know qemu issues.

This patch just turns them back on to unblock the gate.

Closes-Bug: #2025813
Change-Id: Ia198f712e2ad277743aed08e27e480208f463ac7
(cherry picked from commit 6f56c5c)
(cherry picked from commit 976364f)
(cherry picked from commit e5eb65e)
@github-actions github-actions bot requested a review from a team as a code owner November 3, 2023 13:00
@github-actions github-actions bot added automated Automated action performed by GitHub Actions synchronisation labels Nov 3, 2023
jovial
jovial previously approved these changes Nov 3, 2023
@jovial jovial enabled auto-merge November 3, 2023 13:01
@jovial jovial closed this Nov 3, 2023
auto-merge was automatically disabled November 3, 2023 13:06

Pull request was closed

@jovial jovial reopened this Nov 3, 2023
This is not supported on Python 3.8 [1]. I have no idea why this was not
failing CI.

[1] https://docs.python.org/3.9/library/stdtypes.html#str.removeprefix

Change-Id: I225e9ced0f75c415b1d2fee05440291e3d8635c0
Signed-off-by: Stephen Finucane <sfinucan@redhat.com>
(cherry picked from commit 3ccf82e)
(cherry picked from commit 2d011ac32c132fa5c4d03f8167c2be3648d5d123)
@jovial
Copy link

jovial commented Nov 3, 2023

@jovial jovial merged commit 3cedfd1 into stackhpc/yoga Nov 3, 2023
@jovial jovial deleted the upstream/yoga-2023-11-03 branch November 3, 2023 14:58
jovial added a commit to stackhpc/stackhpc-kayobe-config that referenced this pull request Nov 3, 2023
jovial added a commit to stackhpc/stackhpc-kayobe-config that referenced this pull request Nov 6, 2023
* Build nova from StackHPC fork

We need to include some fixes that haven't landed upstream yet.

* Bump nova tag

Includes:
- stackhpc/nova#55
- stackhpc/nova#56

* Add release notes
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
automated Automated action performed by GitHub Actions synchronisation
Projects
None yet
Development

Successfully merging this pull request may close these issues.