-
Notifications
You must be signed in to change notification settings - Fork 4.9k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(balancer) use correct upstream object in event handler
In the upstream event handler, `create_balancer` was being called with the object received via the event, which contains "id" and "name" only, and not the entire entity table containing the rest of the upstream fields. This caused it create a healthchecker with an empty configuration (ignoring the user's configuration), which then fell back into the lua-resty-healthcheck defaults. This fix obtains the proper entity object from the id and passes it to `create_balancer`. A regression test is included, which spawns two Kong instances and reproduces the error scenario described by @mengskysama. Fixes #3304.
- Loading branch information
Showing
2 changed files
with
146 additions
and
10 deletions.
There are no files selected for viewing
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
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