Backport of [Feature] Invalidate session check if associated session is deleted into release/1.21.x#22233
Merged
srahul3 merged 3 commits intoMar 20, 2025
Conversation
bf30f34 to
044d9b8
Compare
github-team-consul-core-pr-approver
approved these changes
Mar 20, 2025
Collaborator
github-team-consul-core-pr-approver
left a comment
There was a problem hiding this comment.
Auto approved Consul Bot automated PR
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Backport
This PR is auto-generated from #22227 to be assessed for backporting due to the inclusion of the label backport/1.21.
The below text is copied from the body of the original PR.
Background
The ESM is also requested to go agentless, being agentless it becomes challenging to keep track of the health of the artificial node.
Proposal
This pull request introduces a new feature to support Consul Session to update the state of the health-checks. The constraint is, the health-check needs to be of type
sessionand bothsessionand thehealth-checkshall belong to common parent node.The idea is to use the sessions to keep track of health status. During partition of ESM crash, the session is deleted and hence, the changes in this PR enables to make the associated
sessionchecks to be critical. On thus event, the other ESM instance picks up the leadership and re-distribute the responsibility among remaining health ESM instances.There is need for a regular session to be created with name
<session-name>There is new check which is proposed of type
Type="session"andDefinition.SessionName=<session-name>.** Code sequence **
session. This session health-check also has a field which suggest the session name. If this check's session name matches with this session name, the check's name is marked critical.Testing
Unit test added
PR Checklist
Overview of commits