Backport of feature - [NET-4005] - [Supportability] Reloadable Configuration - enable_debug into release/1.14.x#17967
Merged
asheshvidyut merged 9 commits intorelease/1.14.xfrom Jun 30, 2023
Conversation
078f1c4 to
96ecd7b
Compare
96ecd7b to
078f1c4
Compare
github-team-consul-core-pr-approver
approved these changes
Jun 30, 2023
Collaborator
github-team-consul-core-pr-approver
left a comment
There was a problem hiding this comment.
Auto approved Consul Bot automated PR
asheshvidyut
approved these changes
Jun 30, 2023
…n-enable-debug/usually-dear-hog
added 2 commits
June 30, 2023 17:55
…y-dear-hog' of ssh://github.com/hashicorp/consul into backport/f-reloadable-configuration-enable-debug/usually-dear-hog
asheshvidyut
approved these changes
Jun 30, 2023
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 #17565 to be assessed for backporting due to the inclusion of the label backport/1.14.
🚨
The person who merged in the original PR is:
@absolutelightning
This person should manually cherry-pick the original PR into a new backport PR,
and close this one when the manual backport PR is merged in.
The below text is copied from the body of the original PR.
Description
Making enable_debug a Reloadable Configuration
Summary of customer problem and expectations:
In order to capture pprof to analyze Golang heap, CPU, goroutine, and trace profiling "enable_debug" must be set in the configuration and for it to take effect, Consul process must be restarted. Thereafter the "consul debug" command with the appropriate flags can be run to capture the pprof. Having the ability to apply this update to the configuration through "consul reload" would ensure cluster stability.
What currently happens or is possible:
Currently the Consul process must be restarted for this configuration to take effect.
In this PR - I am making enable_debug a reloadable configuration and adding http handlers before the enableDebug flag check. Earlier we use to check for enable debug and then add http handlers. Now I am adding http handlers and checking for enableDebug and checkACLDisabled() inside the handler when the handler is already attached.
Testing & Reproduction steps
Replicate the issue by -
make dev./bin/consul agent --config-file=server.jsonhttp://localhost:8500/v1/agent/self-> observerEnableDebugis falseenable_debug: truein the server.json file./bin/consul reloadhttp://localhost:8500/v1/agent/selfsee - EnableDebug flag does not change to trueTesting
make dev./bin/consul agent --config-file=server.jsonhttp://localhost:8500/v1/agent/self-> observerEnableDebugis falseenable_debug: truein the server.json file./bin/consul reloadhttp://localhost:8500/v1/agent/selfsee - EnableDebug flag changes to true./bin/consul debug -capture pprofPR Checklist
Overview of commits