-
Notifications
You must be signed in to change notification settings - Fork 4.5k
bugfix: Prevent default TCP checks from being re-added on reload/restart #23088
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
bugfix: Prevent default TCP checks from being re-added on reload/restart #23088
Conversation
…art (#23088) * fix(agent): prevents default TCP checks from being re-added on service reload when they were explicitly disabled or when custom checks were specified during initial registration.
…art (#23088) * fix(agent): prevents default TCP checks from being re-added on service reload when they were explicitly disabled or when custom checks were specified during initial registration.
|
📣 Hi @anilvpatel! a backport is missing for this PR [23088] for versions [1.18,1.20,1.21] please perform the backport manually and add the following snippet to your backport PR description: |
2 similar comments
|
📣 Hi @anilvpatel! a backport is missing for this PR [23088] for versions [1.18,1.20,1.21] please perform the backport manually and add the following snippet to your backport PR description: |
|
📣 Hi @anilvpatel! a backport is missing for this PR [23088] for versions [1.18,1.20,1.21] please perform the backport manually and add the following snippet to your backport PR description: |
Description
This PR fixes an issue where default TCP checks were being re-added on service reload or agent restart, even when they were explicitly disabled or replaced with custom checks during the initial service registration.
With this change, the agent now consistently preserves the original sidecar check configuration, ensuring default checks are added only when intended.
Testing & Reproduction steps
Start the consul agent
consul agent -dev -data-dir=/tmp/consul/dataRegister below hello service definition
consul services register hello-service.jsonAs as sidecar service contains the checks, it does not added the default TCP checks
http://127.0.0.1:8500/v1/health/service/service-hello-sidecar-proxy?dc=dc1consul reload or restart the agent
consul reloadAfter reload, its inconsistence and defaults TCP checks are added
http://127.0.0.1:8500/v1/health/service/service-hello-sidecar-proxy?dc=dc1PR Checklist
PCI review checklist
I have documented a clear reason for, and description of, the change I am making.
If applicable, I've documented a plan to revert these changes if they require more than reverting the pull request.
If applicable, I've documented the impact of any changes to security controls.
Examples of changes to security controls include using new access control methods, adding or removing logging pipelines, etc.