Skip to content

fix: invalid error after passive health check is changed#5589

Merged
spacewander merged 3 commits into
apache:masterfrom
shuaijinchao:bugfix/healthcheck
Nov 24, 2021
Merged

fix: invalid error after passive health check is changed#5589
spacewander merged 3 commits into
apache:masterfrom
shuaijinchao:bugfix/healthcheck

Conversation

@shuaijinchao

@shuaijinchao shuaijinchao commented Nov 23, 2021

Copy link
Copy Markdown
Member

What this PR does / why we need it:

FIX #4077

Pre-submission checklist:

  • Did you explain what problem does this PR solve? Or what new features have been added?
  • Have you added corresponding test cases?
  • Have you modified the corresponding document?
  • Is this PR backward compatible? If it is not backward compatible, please discuss on the mailing list first

Comment thread t/admin/health-check.t


=== TEST 13: number type timeout
=== TEST 13: only active

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Suggested change
=== TEST 13: only active
=== TEST 13: change active & passive to only active

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

The purpose of this test is to verify that the default passive configuration will be added in the case of active only. I think this title description is not very accurate, what do you think?

Comment thread apisix/schema_def.lua
},
unhealthy = {
http_statuses = { 429, 500, 503 },
tcp_failures = 0,

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Is it necessary to set a zero default? Do we need to update the doc?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Changing the value to 0 will disable the passive health check, which is necessary when only the active check is configured, documentation needs to be updated

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

document updated

@spacewander
spacewander merged commit 54a0e11 into apache:master Nov 24, 2021
bd1dtn pushed a commit to bd1dtn/apisix that referenced this pull request Dec 1, 2021
bzp2010 pushed a commit to bzp2010/apisix that referenced this pull request Dec 30, 2021
spacewander added a commit to spacewander/incubator-apisix that referenced this pull request Sep 2, 2022
This issue is introduced in the bugfix:
apache#5589

This PR fixes the bug added by that bugfix, and also
introduce a new test (TEST 6) to cover issue
apache#4077.

The fix of that issue is submitted in
api7/lua-resty-healthcheck#5
which fixes the bug in an appropriate way.

Signed-off-by: spacewander <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

passive healthcheck not working after configuration changing

5 participants