When trying to iterate over APIs plugins it fails.
Error is
kong-01.dev | 2017/08/01 15:44:02 [error] 318#0: *7356 lua entry thread aborted: runtime error: /usr/local/share/lua/5.1/kong/core/plugins_iterator.lua:74: attempt to index local 'schema' (a nil value)
kong-01.dev | stack traceback:
kong-01.dev | coroutine 0:
kong-01.dev | /usr/local/share/lua/5.1/kong/core/plugins_iterator.lua: in function '(for generator)'
kong-01.dev | /usr/local/share/lua/5.1/kong.lua:348: in function 'access'
kong-01.dev | access_by_lua(nginx-kong.conf:89):2: in function <access_by_lua(nginx-kong.conf:89):1>, client: 172.20.1.18, server: kong, request: "PUT /v1/session HTTP/1.1", host: "dev-api.localapp.ch"
After looking at the commit baf69f1f230c77300f3a94be7fc72643caef1e9d I supposed the code perf optimisation failed at some point.
Replacing the file with the previous version and reloading kong did the trick.
Hi @thochra!
Thank you so much for the report! This was indeed an issue with rc2. I just pushed a fix for this at #2760. Thank you for giving 0.11.0rc2 a try and reporting your findings, much appreciated.
Thank you for the quick action !
Best, Thomas
Hi @thochra , we have merged the change in our next branch. Could you please check that it works correctly in your setup, so we can close this issue? Thanks!
Hi @kikito, over the tests I did everything behaved as expected.
Thank you guys !
Note: Here how I patched it in my Dockerfile
FROM kong:0.10.3
RUN yum remove -y kong-$KONG_VERSION
ENV KONG_VERSION 0.11.0rc2
RUN yum install -y wget https://github.com/Mashape/kong/releases/download/$KONG_VERSION/kong-$KONG_VERSION.el7.noarch.rpm && \
yum clean all
# Fixing issue https://github.com/Mashape/kong/issues/2756
RUN curl 'https://raw.githubusercontent.com/Mashape/kong/810fad6f92d57e36a9f1a08ee21528548e6efa2c/kong/core/plugins_iterator.lua' \
-o /usr/local/share/lua/5.1/kong/core/plugins_iterator.lua
RUN curl 'https://raw.githubusercontent.com/Mashape/kong/810fad6f92d57e36a9f1a08ee21528548e6efa2c/kong/kong.lua' \
-o /usr/local/share/lua/5.1/kong/kong.lua
Great, considering this resolved then! Thank you again for the report, extremely helpful for us!