Skip to content

Conversation

@lindig
Copy link
Contributor

@lindig lindig commented Apr 29, 2024

Clear all (stale) scheduled assignments for: VM, PCI, VGPU objects on startup. We were missing the latter two.

Clear all (stale) scheduled assignments for: VM, PCI, VGPU objects on
startup. We were missing the latter two.

Signed-off-by: Christian Lindig <christian.lindig@cloud.com>
@lindig lindig requested a review from robhoes April 29, 2024 14:51
Db.VM.set_scheduled_to_be_resident_on ~__context ~self ~value:Ref.null
)
(Db.VM.get_all ~__context)
(* Clear all assignments that are only scheduled *)
Copy link
Member

Choose a reason for hiding this comment

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

I understand these scheduled_* fields are used only by the coordinator to remember something within XAPI calls. So it will be safe to clean all of these fields when the xapi on coordinator is in starting up, as at the moment no any xapi calls are in progress.

Copy link
Contributor

@Vincent-lau Vincent-lau left a comment

Choose a reason for hiding this comment

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

there are two functions clear_scheduled_to_be_resident_on and clear_reserved_netsriov_vfs_on in message_forwarding which does a similar job. Is it easy to merge these together?

@lindig
Copy link
Contributor Author

lindig commented Apr 30, 2024

I will think about that for another PR because this will prevent stale PCI slots that are cleaned up in the code here.

@robhoes robhoes merged commit 7cbe1c5 into xapi-project:master Apr 30, 2024
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.

4 participants