bug: etcd cache
#5241
Replies: 2 comments 1 reply
-
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. |
Beta Was this translation helpful? Give feedback.
0 replies
-
yes |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
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
):uname -a
):nginx -V
oropenresty -V
):curl http://127.0.0.1:9090/v1/server_info
to get the info from server-info API):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
Beta Was this translation helpful? Give feedback.
All reactions