-
Notifications
You must be signed in to change notification settings - Fork 4.4k
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
Backport of feature - [NET-4005] - [Supportability] Reloadable Configuration - enable_debug into release/1.14.x #17967
Merged
absolutelightning
merged 9 commits into
release/1.14.x
from
backport/f-reloadable-configuration-enable-debug/usually-dear-hog
Jun 30, 2023
Merged
Conversation
This file contains 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
hc-github-team-consul-core
force-pushed
the
backport/f-reloadable-configuration-enable-debug/usually-dear-hog
branch
2 times, most recently
from
June 30, 2023 03:00
078f1c4
to
96ecd7b
Compare
hc-github-team-consul-core
force-pushed
the
backport/f-reloadable-configuration-enable-debug/usually-dear-hog
branch
from
June 30, 2023 03:00
96ecd7b
to
078f1c4
Compare
github-team-consul-core-pr-approver
approved these changes
Jun 30, 2023
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.
Auto approved Consul Bot automated PR
absolutelightning
approved these changes
Jun 30, 2023
…n-enable-debug/usually-dear-hog
…y-dear-hog' of ssh://github.com/hashicorp/consul into backport/f-reloadable-configuration-enable-debug/usually-dear-hog
absolutelightning
approved these changes
Jun 30, 2023
absolutelightning
deleted the
backport/f-reloadable-configuration-enable-debug/usually-dear-hog
branch
June 30, 2023 13:26
jmurret
changed the title
Backport of feature - [NET - 4005] - [Supportability] Reloadable Configuration - enable_debug into release/1.14.x
Backport of feature - [NET-4005] - [Supportability] Reloadable Configuration - enable_debug into release/1.14.x
Jul 7, 2023
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.json
http://localhost:8500/v1/agent/self
-> observerEnableDebug
is falseenable_debug: true
in the server.json file./bin/consul reload
http://localhost:8500/v1/agent/self
see - EnableDebug flag does not change to trueTesting
make dev
./bin/consul agent --config-file=server.json
http://localhost:8500/v1/agent/self
-> observerEnableDebug
is falseenable_debug: true
in the server.json file./bin/consul reload
http://localhost:8500/v1/agent/self
see - EnableDebug flag changes to true./bin/consul debug -capture pprof
PR Checklist
Overview of commits