-
Notifications
You must be signed in to change notification settings - Fork 38
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
Add to check the liveness for connection with controller #920
Conversation
576d0f9
to
28a82bf
Compare
Hi @dofmind, This PR comprises of a new feature to be added to BlueChi. It is highly recommended to file a new issue before creating a PR. This way we can discuss it upfront and keep the review of the PR(s) concise. About the feature itself: |
This adds a new heartbeat signal for internal DBus to controller, also adds a new option to agent: ControllerHeartbeatThreshold. The controller emits the heartbeat signal like agent. The agent writes last seen timestamp for connection with controller if it receives the heartbeat signal from controller, and the agent periodically checks the last seen timestamp for connection with controller, and if it was sent before ControllerHeartbeatThreshold, the agent treats it as disconnected. If ControllerHeartbeatThreshold value is 0, it is disabled to check the liveness for connection with controller, and the default value is 0. Signed-off-by: Joonyoung Shim <[email protected]>
28a82bf
to
f188374
Compare
An integration test is to verify if the agent gets disconnected when did not receive heartbeat since threshold from controller. Signed-off-by: Joonyoung Shim <[email protected]>
f188374
to
19ba4a4
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
This PR is that agent can detect disconnection with controller faster, like controller.
Also includes an integration test to test this feature.
This adds a new heartbeat signal for internal DBus to controller, also
adds a new option to agent: ControllerHeartbeatThreshold.
The controller emits the heartbeat signal like agent. The agent writes
last seen timestamp for connection with controller if it receives the
heartbeat signal from controller, and the agent periodically checks the
last seen timestamp for connection with controller, and if it was sent
before ControllerHeartbeatThreshold, the agent treats it as
disconnected.
If ControllerHeartbeatThreshold value is 0, it is disabled to check the
liveness for connection with controller, and the default value is 0.