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

CA-373551: register for host events rather than task in events_from_xapi #4870

Merged
merged 2 commits into from
Dec 12, 2022

Conversation

robhoes
Copy link
Member

@robhoes robhoes commented Dec 12, 2022

No description provided.

Signed-off-by: Rob Hoes <rob.hoes@citrix.com>
A recent change registered for events on the task that was used by the
events_from_xapi thread in xapi_xenops. This is so that the event loop
can be woken up by injecting an event into this task, without the need
to logout its session (as previously done). The problem is that this
introduced a task in the DB that is forever "pending", which has
unwanted side-effects. For example, it gets GC'ed after 24 hours, and
also gets destroyed if the coordinator is restarted.

Switch to registering the host object for the localhost instead, which
should be more stable.

Signed-off-by: Rob Hoes <rob.hoes@citrix.com>
Copy link
Member

@psafont psafont left a comment

Choose a reason for hiding this comment

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

With his change now the loop is woken every time a field from that host object is changed. Even with the increased rate, this seems benign.

@robhoes robhoes marked this pull request as ready for review December 12, 2022 16:03
Copy link
Contributor

@edwintorok edwintorok left a comment

Choose a reason for hiding this comment

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

These events will probably also be visible to xencenter, but if they're not too frequent it shouldn't be a problem.

@robhoes robhoes merged commit 2784cf6 into xapi-project:master Dec 12, 2022
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