Kong 2.0.1 DB-Less schema validation issue

Hi Team,
I see the below issue is reproducible in kong 2.0.1.


Our kong service is running as pods in kubernetes.

Steps to reproduce:

  1. Write db-less config with any plugin/services/routes with missed required field.
  2. kong reload

Appropriate logs are produced in error.log file:
2020/05/26 08:05:34 [error] 54#0: init_by_lua error: /usr/local/share/lua/5.1/kong/init.lua:382: error parsing declarative config file /etc/kong/kong.yml:
in ‘services’:

  • in entry 1 of ‘services’:
    in ‘host’: required field missing
    stack traceback:
    [C]: in function ‘error’
    /usr/local/share/lua/5.1/kong/init.lua:382: in function ‘init’
    init_by_lua:3: in main chunk

But Kong gets reloaded without throwing similar error message:
[root@xyz-apigateway-ingress-data-plane /]# kong reload -v
2020/05/26 08:05:34 [verbose] Kong: 1.2.1
2020/05/26 08:05:34 [verbose] reading config file at /usr/local/kong/.kong_env
2020/05/26 08:05:34 [verbose] prefix in use: /usr/local/kong
2020/05/26 08:05:34 [verbose] preparing nginx prefix directory at /usr/local/kong
2020/05/26 08:05:34 [info] Kong reloaded

Can anybody help on this?

Thanks!

I just re-opened the Github issue. Let’s continue the conversation on the Github issue instead of here. Thanks!

Thanks for the investigation! Will follow up on Github.