nic-6443 opened a new pull request, #13514:
URL: https://github.com/apache/apisix/pull/13514

   ### Description
   
   After upgrading to 3.15.0, deployments running `proxy_mode: http&stream` get 
the error log flooded on every config sync with warnings like:
   
   ```
   stream [lua] plugin.lua:983: check_single_plugin_schema(): skipping check 
schema for disabled or unknown plugin [cors]. Enable the plugin or modify 
configuration
   ```
   
   for plugins that are explicitly enabled in `config.yaml`.
   
   The root cause is a subsystem boundary problem in the `plugin_metadata` 
checker. `plugin.init_worker()` registers the `/plugin_metadata` watcher with 
`checker = check_plugin_metadata` in both the http and the stream subsystems, 
but `_M.load()` only populates `local_plugins_hash` with http plugins when 
running in the http subsystem. So in stream workers, 
`check_single_plugin_schema()` can't find any http plugin and reports every 
http plugin's metadata as "disabled or unknown". The same happens in http 
workers for stream-only plugins (e.g. `mqtt-proxy`). The warning itself was 
introduced by #12655 (before that, such entries were skipped silently), which 
turned this pre-existing mismatch into a log flood. There is no functional 
impact since the entries are skipped with `skip_disabled_plugin = true`, but 
the warnings are misleading and noisy.
   
   This PR makes `check_plugin_metadata` treat plugins that are known to the 
deployment but belong to the other subsystem as not applicable and skip them 
silently:
   
   - a plugin found in `stream_local_plugins_hash` (populated in both 
subsystems) is skipped without warning;
   - in the stream subsystem, where http plugins are never loaded, the 
configured `plugins` name list from the local config is consulted instead;
   - genuinely unknown plugin names still warn as before.
   
   Additionally, a `plugin_metadata` entry with a missing/non-string `id` now 
logs `ignore invalid plugin_metadata entry: <content>` instead of the confusing 
`disabled or unknown plugin [nil]`.
   
   #### Which issue(s) this PR fixes:
   
   Fixes #13305
   
   ### Checklist
   
   - [x] I have explained the need for this PR and the problem it solves
   - [x] I have explained the changes or the new features added to this PR
   - [x] I have added tests corresponding to this change
   - [ ] I have updated the documentation to reflect this change
   - [x] I have verified that this change is backward compatible (If not, 
please discuss on the [APISIX mailing 
list](https://github.com/apache/apisix/tree/master#community) first)
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to