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 2021/10/14 07:36:22 UTC

[GitHub] [apisix] yocaning opened a new issue #5234: bug: etcd cache

yocaning opened a new issue #5234:
URL: https://github.com/apache/apisix/issues/5234


   ### Issue description
   
   if you have own etcd cache like this:
       authorizations_etcd, error = core.config.new("/authorizations", {
           automatic = true,
           item_schema = app_scheme
       })
   
   if the key authorizations dont have a key value (init_dir),the etcd cache dont load when apisix restart 
   
   ### Environment
   
   - apisix version (cmd: `apisix version`):
   - OS (cmd: `uname -a`):
   - OpenResty / Nginx version (cmd: `nginx -V` or `openresty -V`):
   - etcd version, if have (cmd: run `curl http://127.0.0.1:9090/v1/server_info` to get the info from server-info API):
   - apisix-dashboard version, if have:
   - the plugin runner version, if the issue is about a plugin runner (cmd: depended on the kind of runner):
   - luarocks version, if the issue is about installation (cmd: `luarocks --version`):
   
   
   ### Steps to reproduce
   
   1.authorizations_etcd, error = core.config.new("/authorizations", {
           automatic = true,
           item_schema = app_scheme
       })
   2.restart apisix
   3. the authorizations_etcd dont have data
   
   ### Actual result
   
   when restart apisix.   load the etcd cache data
   
   ### Error log
   
   --- dont have  nodes array
   {"key":"\/gateway\/authorizations\/AKIDz8krbsJ5yKBZQpn74WFkmLPx3EXAMPLE1","createdIndex":26295,"modifiedIndex":26473,"value":{"secret":"AKIDz8krbsJ5yKBZQpn74WFkmLPx3EXAMPLE11","username":"yyy"}}
   
   ---- --other key ex:routes:  (hava nodes array)
   {"key":"\/gateway\/routes","nodes":[{"key":"\/ioa-gateway\/routes\/00000000000000025212","createdIndex":25213,"modifiedIndex":25247,"value":{"update_time":1634119249,"methods":["GET","POST"],"id":"00000000000000025212","upstream":{"type":"roundrobin","hash_on":"vars","nodes":{"9.135:11111":1},"pass_host":"pass"},"create_time":1634118070,"status":1,"plugins":{"cors":{"allow_credential":false,"allow_origins":"*","max_age":5,"expose_headers":"*","allow_methods":"*","allow_headers":"*"}}
   
   ### Expected result
   
   _No response_


-- 
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 closed issue #5234: bug: etcd cache

Posted by GitBox <gi...@apache.org>.
tzssangglass closed issue #5234:
URL: https://github.com/apache/apisix/issues/5234


   


-- 
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] yocaning commented on issue #5234: bug: etcd cache

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


   > Is this the code you implemented yourself? If so, I'll turn this issue into a discussion and we'll discuss it in the discussion.
   
   yes 


-- 
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 #5234: bug: etcd cache

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


   Is this the code you implemented yourself?  If so, I'll turn this issue into a discussion and we'll discuss it in the discussion.


-- 
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