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

Make Agent Register request asynchronous #961

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

mkemel
Copy link
Member

@mkemel mkemel commented Oct 14, 2024

The "Register" agent->controller method call could get stuck when the IP address configured as ControllerHost does not exist. This timeout of about 2 seconds could completely occupy the event loop and would not allow other calls on the DBus API of the Agent.

Making the "Register" method call asynchronous we allow the event loop to stay unoccupied and be able to accept SwitchController request.

Resolves: #950

@coveralls
Copy link

coveralls commented Oct 14, 2024

Coverage Status

coverage: 20.492% (-62.9%) from 83.416%
when pulling 9766448 on mkemel:async-register
into 08745e4 on eclipse-bluechi:main.

@mkemel mkemel force-pushed the async-register branch 4 times, most recently from 8790825 to 4995715 Compare October 15, 2024 15:41
@mkemel mkemel marked this pull request as ready for review October 15, 2024 15:48
@mkemel mkemel requested a review from mwperina October 16, 2024 07:03
@mkemel
Copy link
Member Author

mkemel commented Oct 16, 2024

Ready for review.
I think if everything's fine this can be merged, and I will add an integration test for that after the shutdown.

GH Integration tests failing at the prepare stage currently, probably infra issue

@mkemel
Copy link
Member Author

mkemel commented Oct 16, 2024

/packit test --labels valgrind

Copy link
Contributor

@ArtiomDivak ArtiomDivak left a comment

Choose a reason for hiding this comment

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

LGTM

src/agent/agent.c Outdated Show resolved Hide resolved
The "Register" agent->controller method call could get stuck
when the IP address configured as ControllerHost does not exist.
This timeout of about 2 seconds could completely occupy the event
loop and would not allow other calls on the DBus API of the Agent.

Making the "Register" method call asynchronous we allow the event
loop to stay unoccupied and be able to accept SwitchController
request.

Resolves: eclipse-bluechi#950
Signed-off-by: Mark Kemel <[email protected]>
@mkemel mkemel marked this pull request as draft October 16, 2024 10:30
@mkemel
Copy link
Member Author

mkemel commented Oct 16, 2024

Moved the PR back to draft, found a memory issue
Will handle after shutdown

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.

Failed to call SwitchController DBus method to bluechi-agent
3 participants