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

bug: error in checking schema with etcd change event handling #11267

Closed
bzp2010 opened this issue May 20, 2024 · 0 comments · Fixed by #11268
Closed

bug: error in checking schema with etcd change event handling #11267

bzp2010 opened this issue May 20, 2024 · 0 comments · Fixed by #11268
Assignees
Labels
bug Something isn't working

Comments

@bzp2010
Copy link
Contributor

bzp2010 commented May 20, 2024

Current Behavior

This bug was discovered by @juzhiyuan and confirmed by @nic-6443. Thanks for their keen observations!

When APISIX is initially started, it loads the full configuration from etcd, and when there are any changes to the configuration in etcd, APISIX will get a change event to update its memory cache.

When loading full configuration and processing change events, APISIX will check the correctness of configuration entries to weed out configurations that do not conform to the schema specification.

When checking for change events, if an event in the event set does not pass the check, it will issue an error and interrupt subsequent event processing, so some configuration changes will not be loaded and applied to the data plane.

This is wrong, it should just issue the log and skip this event and move on to the others. When the user fixes the configuration, it will go through the check and apply it in a new event.

Expected Behavior

Only incorrect events should be skipped and the correct configuration that follows should be applied correctly.

Error Logs

No logging, logging is interrupted when an error is triggered.

Steps to Reproduce

  1. Modify multiple resources and introduce some error entries in them.
  2. you will find that there are correct configurations that should be applied that are not loaded correctly.

Environment

  • APISIX version (run apisix version): at least 2.0 to latest
  • Operating system (run uname -a): independent
  • OpenResty / Nginx version (run openresty -V or nginx -V): independent
  • etcd version, if relevant (run curl http://127.0.0.1:9090/v1/server_info): independent
  • APISIX Dashboard version, if relevant: independent
  • Plugin runner version, for issues related to plugin runners: independent
  • LuaRocks version, for installation issues (run luarocks --version): independent
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
Archived in project
Development

Successfully merging a pull request may close this issue.

1 participant