Repository navigation
Reload notification webhooks without restarting SILO - #249
Open
mrjavadseydi wants to merge 6 commits into
Open
mrjavadseydi wants to merge 6 commits into
mrjavadseydi wants to merge 6 commits into
Conversation
Signed-off-by: mr javad seydi <[email protected]>
Member
|
Thank you for the implementation and multi-node test details. Keeping this open for next-cycle review; webhook hot reload is not part of 20261018000000. Review will focus on queued/in-flight delivery, failed configuration changes, peer reloads, and resource cleanup on the final revision. The live-reload behavior and queue-directory restriction also need companion-site documentation. This PR covers |
Retire a replaced webhook client only after its in-flight requests finish, so the old certificate manager and idle connections are released without cutting off a POST that is still running. Cancel outstanding HTTP work before Close waits on the target lock, so a slow queue write cannot delay shutdown of network requests. Validate changed existing targets without reopening their live queue store, while new targets still open queue_dir before the config is saved. Log per-peer errors from the dynamic config reload signal instead of discarding them. Signed-off-by: mr javad seydi <[email protected]>
Signed-off-by: mr javad seydi <[email protected]>
Signed-off-by: mr javad seydi <[email protected]>
config.New shares the process-wide default KVS slice, so Set on it leaked enable=invalid into later tests and broke TestPoolsMultipartConditionalInitiateLifecycle in a full ./cmd run. Signed-off-by: mr javad seydi <[email protected]>
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.
Contribution Licensing (no CLA, inbound=outbound, DCO required)
This pull request contributes to PGSTY SILO (
pgsty/silo). Code contributionsare accepted under AGPL-3.0-or-later, the same license as the server.
This project does not use a CLA or require a separate Apache-2.0 license grant.
By submitting this pull request I represent that I have the right to contribute
the code changes under this repository's
GNU Affero General Public License v3.0 or later
and retain copyright in my original work. Existing copyright and license
notices remain intact; separately licensed material keeps its applicable terms.
Every commit must carry a DCO
Signed-off-bytrailer(
git commit -s) certifying theDeveloper Certificate of Origin — see
CONTRIBUTING.md.
Description
Adding a notification webhook currently needs a server restart before its ARN is available. This makes
notify_webhookchanges take effect through the existing admin config API and peer reload path. Adding, updating, disabling, re-enabling and removing a webhook no longer needs a restart.Existing targets keep their identity and disk queue when their endpoint, token, client certificate or queue limit changes. Unchanged targets keep their current resources. In-flight POSTs finish with their original settings; later sends and retries use the updated settings.
Reload and removal avoid holding the target-list lock during HTTP delivery. Shutdown cancels outstanding requests before waiting for queue replay to stop. Invalid replacements leave the running targets intact, and config validation does not replay queued events.
Motivation and Context
Changing a webhook endpoint or adding an integration should not require restarting a storage node. Slow receivers also need to stay isolated: one blocked POST should not hold up registration, removal or notification metrics for every target on that node.
The tests cover these cases, along with reloads during startup, environment overrides and concurrent TLS initialization and shutdown.
How to test this PR?
Local checks on macOS arm64 with Go 1.27.2:
Also tested four local SILO nodes with the maintained PGSTY mcli: register a webhook and bucket rule, PUT through each node, change the endpoint and token, disable and re-enable the target, reject invalid settings, and remove a target. Events reached the expected receiver and all server PIDs stayed unchanged. With a POST deliberately blocked, registration, removal and a cluster metrics scrape still completed. A rejected queue-directory change left the saved config and working webhook intact.
The full Linux suite is left to CI. The optional
typoscheck was skipped because the binary was not installed locally.Compatibility impact
notify_webhookkeys,MINIO_NOTIFY_WEBHOOK_*variables and notification ARNs stay unchanged. Other notification backends retain their existing reload behavior.queue_diron an active webhook is rejected before the config is saved. Drain the queue and disable or remove the target before moving it to another directory.Documentation impact: the public operations docs should describe live webhook reloads and the queue-directory restriction. Those docs belong to
pgsty/silo.pgsty.com; no documentation files are changed here.Types of changes
Checklist:
git commit -s) per the DCOmake verifierspassesmake buildpasspgsty/silo.pgsty.comto follow)