-
Notifications
You must be signed in to change notification settings - Fork 4.8k
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
fix(plugins/acme): fix certificate renew failure issue #12773
Conversation
d234f07
to
6f7ddf7
Compare
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.
Please refine the changelog as customers might unable to understand it.
6f7ddf7
to
4691588
Compare
cb3a560
to
9eba0af
Compare
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.
One more question: there are two backport labels, did we decided to backport this fix?
Do we have test case to verify this issue is fixed? |
This issue was reproduced using my personal domain name + EC2 instance and was verified after the fix. |
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.
In general, we should add tests for bugfix before merging.
The test for this ticket requires binding a public IP address to a domain name, and then configuring it according to the instructions in https://docs.konghq.com/hub/kong-inc/acme/how-to/ . Afterward, send a PATCH request (also in this document), and we will see this error log in Kong's logs:
After fixing it, if we execute it again, there will be no error log output, and the API will still return |
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.
It seems that it is hard to write a test case for this PR, so I approve it.
9eba0af
to
6544037
Compare
Missing tests, converted to a draft. |
Using client.renew_certificate directly as the callback function in ngx_timer_at causes the parameter value to not be the plugin's config. KAG-4008
6544037
to
286eb94
Compare
Successfully created backport PR for |
Successfully created backport PR for |
Successfully created cherry-pick PR for |
Summary
Fix ACME renewal bug.
Using
client.renew_certificate
directly as the callback function inngx_timer_at
causes the parameter value to not be the plugin's config.Checklist
changelog/unreleased/kong
orskip-changelog
label added on PR if changelog is unnecessary. README.mdIssue reference
KAG-4008
Fix #12442