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

add a rate limiter to config auto-reload #12490

Merged
merged 108 commits into from
Apr 4, 2022
Merged

Conversation

dhiaayachi
Copy link
Contributor

@dhiaayachi dhiaayachi commented Mar 2, 2022

This add a coalesce timer to auto config reload to reduce the risk that we reload incomplete configuration or DDOS Consul by modifying the config file.
The coalesce timer is implemented as a Watcher interface that wrap the original file watcher.

@vercel vercel bot temporarily deployed to Preview – consul April 1, 2022 17:07 Inactive
@vercel vercel bot temporarily deployed to Preview – consul April 1, 2022 17:14 Inactive
@vercel vercel bot temporarily deployed to Preview – consul-ui-staging April 1, 2022 17:14 Inactive
agent/agent.go Outdated Show resolved Hide resolved
Co-authored-by: R.B. Boyer <4903+rboyer@users.noreply.github.com>
@vercel vercel bot temporarily deployed to Preview – consul April 2, 2022 01:02 Inactive
@vercel vercel bot temporarily deployed to Preview – consul-ui-staging April 2, 2022 01:02 Inactive
@vercel vercel bot temporarily deployed to Preview – consul April 2, 2022 01:05 Inactive
@vercel vercel bot temporarily deployed to Preview – consul-ui-staging April 2, 2022 01:05 Inactive
@dhiaayachi dhiaayachi requested a review from rboyer April 2, 2022 01:06
@vercel vercel bot temporarily deployed to Preview – consul-ui-staging April 4, 2022 13:10 Inactive
@vercel vercel bot temporarily deployed to Preview – consul April 4, 2022 13:10 Inactive
Copy link
Contributor

@kisunji kisunji left a comment

Choose a reason for hiding this comment

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

LGTM! Small nits

agent/config/ratelimited_file_watcher.go Outdated Show resolved Hide resolved
agent/config/ratelimited_file_watcher_test.go Outdated Show resolved Hide resolved
Co-authored-by: Chris S. Kim <ckim@hashicorp.com>
@vercel vercel bot temporarily deployed to Preview – consul April 4, 2022 14:14 Inactive
@vercel vercel bot temporarily deployed to Preview – consul-ui-staging April 4, 2022 14:14 Inactive
@dhiaayachi dhiaayachi dismissed rboyer’s stale review April 4, 2022 15:30

This need to go in for the release, I addressed all @rboyer comments and had @kisunji take a look

@dhiaayachi dhiaayachi merged commit 83720e5 into main Apr 4, 2022
@dhiaayachi dhiaayachi deleted the config-autoreload/rate-limiter branch April 4, 2022 15:31
@hc-github-team-consul-core
Copy link
Contributor

🍒 If backport labels were added before merging, cherry-picking will start automatically.

To retroactively trigger a backport after merging, add backport labels and re-run https://circleci.com/gh/hashicorp/consul/622677.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
pr/no-changelog PR does not need a corresponding .changelog entry pr/no-metrics-test
Projects
None yet
Development

Successfully merging this pull request may close these issues.

8 participants