Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Backport XSI-1626, CA-392163 #5613

Merged
merged 3 commits into from
May 7, 2024

Conversation

lindig
Copy link
Contributor

@lindig lindig commented May 3, 2024

Avoid leaking (SR-IOV) PCI slots when a VM start fails; also clear out temporary reservations on xapi startup.

Christian Lindig added 3 commits April 30, 2024 10:21
Clear all (stale) scheduled assignments for: VM, PCI, VGPU objects on
startup. We were missing the latter two.

Signed-off-by: Christian Lindig <[email protected]>
As part of a start, resources are allocated for a VM in "scheduled_to.."
fields. These need to be cleared if the start fails. It turned out that
this was incomplete for PCI slots and those were leaking. This patch
tries to be more systematical about it.

Signed-off-by: Christian Lindig <[email protected]>
Signed-off-by: Christian Lindig <[email protected]>
@lindig lindig requested a review from robhoes May 3, 2024 10:45
(Db.VM.get_VGPUs ~__context ~self:vm)

let clear_reserved_netsriov_vfs_on ~__context ~vm =
let clear_vif_reservations ~__context ~vm =
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

While the code preserves the different behaviour for clearing vif reservations, it's strange that a separate function is needed at all for this instead of clearing all reservations whenever possible

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@robhoes had a comment about this. It is because the VIF mechanism is not following the scheduled/permanent assignment pattern.

@lindig lindig merged commit dc0c046 into xapi-project:1.249-lcm May 7, 2024
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants