You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@apisix.apache.org by GitBox <gi...@apache.org> on 2022/08/01 07:50:30 UTC

[GitHub] [apisix] crazyMonkey1995 opened a new issue, #7583: bug: Incompatible redirect plugin parameters after upgrade to 2.15

crazyMonkey1995 opened a new issue, #7583:
URL: https://github.com/apache/apisix/issues/7583

   ### Current Behavior
   
   redirect plugin parameters incompatible
   
   ### Expected Behavior
   
   _No response_
   
   ### Error Logs
   
   failed to check the configuration of plugin redirect err: value should match only one schema, but matches none
   
   ### Steps to Reproduce
   
   1、create route in version 2.14
   2、upgrade version to 2.15
   3、route init error
   
   Here is the bug:
   
   ### Environment
   
   - APISIX version (run `apisix version`): 2.15
   - Operating system (run `uname -a`):
   - OpenResty / Nginx version (run `openresty -V` or `nginx -V`):
   - etcd version, if relevant (run `curl http://127.0.0.1:9090/v1/server_info`):
   - APISIX Dashboard version, if relevant:
   - Plugin runner version, for issues related to plugin runners:
   - LuaRocks version, for installation issues (run `luarocks --version`):
   


-- 
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: notifications-unsubscribe@apisix.apache.org.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [apisix] Yullin commented on issue #7583: bug: Incompatible redirect plugin parameters after upgrade to 2.15

Posted by "Yullin (via GitHub)" <gi...@apache.org>.
Yullin commented on issue #7583:
URL: https://github.com/apache/apisix/issues/7583#issuecomment-1473083758

   When I upgrade apisix from 2.13.1 to 2.15.3, I got the same issue:
   ```
   2023/03/17 10:55:23 [error] 52#52: *1 [lua] config_etcd.lua:243: load_full_data(): failed to check item data of [/apisix/routes] err:failed to check the configuration of plugin redirect err: value should match only one schema, but matches none ,val: {"uri":"\/*","plugins_check":"other","host":"foo.com","labels":{"env":"xxxxx"},"status":1,"upstream":{"name":"nodes","scheme":"https","pass_host":"pass","nodes":{"192.168.1.180:443":1,"192.168.1.237:443":1},"type":"roundrobin","hash_on":"vars"},"priority":1,"enable_websocket":false,"create_time":1677062316,"id":"00000000000001029445","update_time":1677119638,"remote_addrs":["192.168.0.0\/16"],"plugins":{"redirect":{"append_query_string":false,"ret_code":302,"http_to_https":true,"encode_uri":false}},"methods":["GET","POST","PUT","DELETE","OPTIONS"]}, context: init_worker_by_lua*
   ```


-- 
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: notifications-unsubscribe@apisix.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [apisix] spacewander closed issue #7583: bug: Incompatible redirect plugin parameters after upgrade to 2.15

Posted by GitBox <gi...@apache.org>.
spacewander closed issue #7583: bug: Incompatible redirect plugin parameters after upgrade to 2.15
URL: https://github.com/apache/apisix/issues/7583


-- 
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: notifications-unsubscribe@apisix.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [apisix] soulbird commented on issue #7583: bug: Incompatible redirect plugin parameters after upgrade to 2.15

Posted by GitBox <gi...@apache.org>.
soulbird commented on issue #7583:
URL: https://github.com/apache/apisix/issues/7583#issuecomment-1200850691

   See #7394 and #7433 


-- 
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: notifications-unsubscribe@apisix.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [apisix] spacewander commented on issue #7583: bug: Incompatible redirect plugin parameters after upgrade to 2.15

Posted by GitBox <gi...@apache.org>.
spacewander commented on issue #7583:
URL: https://github.com/apache/apisix/issues/7583#issuecomment-1200966849

   I think the fix is incorrect.
   ```
   "redirect": {
               "http_to_https": true,
               "append_query_string": true
           }
   ```
   should be rejected.
   
   But
   ```
    "redirect":{
           "http_to_https":true,
           "append_query_string":false
       }
   ```
   should be OK.


-- 
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: notifications-unsubscribe@apisix.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [apisix] crazyMonkey1995 commented on issue #7583: bug: Incompatible redirect plugin parameters after upgrade to 2.15

Posted by GitBox <gi...@apache.org>.
crazyMonkey1995 commented on issue #7583:
URL: https://github.com/apache/apisix/issues/7583#issuecomment-1200861690

   > See #7394 and #7433
   
   
   Actually, I know this bug has been fixed, but what I mean is that the compatibility may not be very good, imagine: I used this plugin in an old version, http_to_https is set to true, append_query_string is set to false, this should be no problem , but after the upgrade, I need to reconfigure the parameters of the plugin (remove the append_query_string parameter), and the logic of parameter verification is changed to judge that these two parameters cannot be true at the same time instead of coexisting, isn't it better?


-- 
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: notifications-unsubscribe@apisix.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [apisix] tzssangglass commented on issue #7583: bug: Incompatible redirect plugin parameters after upgrade to 2.15

Posted by GitBox <gi...@apache.org>.
tzssangglass commented on issue #7583:
URL: https://github.com/apache/apisix/issues/7583#issuecomment-1200950360

   @crazyMonkey1995, thank you for your feedback.
   
   in 2.14.1, if we config `redirect` plugin like:
   
   ```
   "plugins": {
       "redirect": {
           "http_to_https": true
       }
   }
   ```
   
   it will be stored in etcd as:
   
   ```
   "plugins":{
       "redirect":{
           "http_to_https":true,
           "encode_uri":false,
           "append_query_string":false,
           "ret_code":302
       }
   },
   ```
   
   if we upgrade APISIX to 2.15.0, would get error like:
   
   ```
   config_etcd.lua:243: load_full_data(): failed to check item data of [/apisix/routes] err:failed to check the configuration of plugin redirect err: value should match only one schema, but matches none ,val: {\"host\":\"foo.com\",\"plugins\":{\"redirect\":{\"http_to_https\":true,\"encode_uri\":false,\"append_query_string\":false,\"ret_code\":302}},\"status\":1,\"uri\":\"\/hello\",\"id\":\"1\",\"priority\":0,\"create_time\":1659345713,\"update_time\":1659345713}, context: init_worker_by_lua*" (req 0)
   # 2022/08/01 17:22:29 [info] 6059\#6059: *2 [lua] plugin.lua:746: check_single_plugin_schema(): check plugin schema, name: redirect, configurations: {"append_query_string":false,"ret_code":302,"http_to_https":true,"encode_uri":false}, context: init_worker_by_lua*
   ```


-- 
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: notifications-unsubscribe@apisix.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [apisix] crazyMonkey1995 commented on issue #7583: bug: Incompatible redirect plugin parameters after upgrade to 2.15

Posted by GitBox <gi...@apache.org>.
crazyMonkey1995 commented on issue #7583:
URL: https://github.com/apache/apisix/issues/7583#issuecomment-1200901432

   By th way, the append_query_string parameter of the old version has a default value of false, which means that whether I submit this parameter or not, this parameter will be generated in etcd, and an error will occur after upgrading to the new version!


-- 
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: notifications-unsubscribe@apisix.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org