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

heartbeat: use leader's ACL token when failing heartbeat #24241

Merged
merged 1 commit into from
Oct 17, 2024

Conversation

tgross
Copy link
Member

@tgross tgross commented Oct 17, 2024

In #23838 we updated the Node.Update RPC handler we use for heartbeats to be more strict about requiring node secrets. But when a node goes down, it's the leader that sends the request to mark the node down via Node.Update (to itself), and this request was missing the leader ACL needed to authenticate to itself.

Add the leader ACL to the request and update the RPC handler test for disconnected-clients to use ACLs, which would have detected this bug. Also added a note to the Authenticate comment about how that authentication path requires the leader ACL.

Fixes: #24231
Ref: https://hashicorp.atlassian.net/browse/NET-11384

Copy link
Member

@shoenig shoenig left a comment

Choose a reason for hiding this comment

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

LGTM!

In #23838 we updated the `Node.Update` RPC handler we use for heartbeats to be
more strict about requiring node secrets. But when a node goes down, it's the
leader that sends the request to mark the node down via `Node.Update` (to
itself), and this request was missing the leader ACL needed to authenticate to
itself.

Add the leader ACL to the request and update the RPC handler test for
disconnected-clients to use ACLs, which would have detected this bug. Also added
a note to the `Authenticate` comment about how that authentication path requires
the leader ACL.

Fixes: #24231
Ref: https://hashicorp.atlassian.net/browse/NET-11384
@tgross
Copy link
Member Author

tgross commented Oct 17, 2024

Forgot changelog. Added that and will merge when CI is green.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

(1.9.0) missed heartbeats don't mark nodes down
3 participants