Kong 0.14.1 backed by Datastax Enterprise Cassandra 6.0.2 fails to start


#1

I am trying to get Kong 0.14.1 working with a DSE Cassandra back end and it fails to start with the message

kong start --vv
Error:
/usr/local/share/lua/5.1/kong/cmd/start.lua:71: /usr/local/share/lua/5.1/kong/cmd/start.lua:60: nginx: [error] init_by_lua error: /usr/local/share/lua/5.1/kong/init.lua:206: could not load routes: [Invalid] table schema_columns does not exist
stack traceback:
[C]: in function ‘assert’
/usr/local/share/lua/5.1/kong/init.lua:206: in function ‘init’
init_by_lua:3: in main chunk

stack traceback:
[C]: in function ‘error’
/usr/local/share/lua/5.1/kong/cmd/start.lua:71: in function ‘cmd_exec’
/usr/local/share/lua/5.1/kong/cmd/init.lua:87: in function </usr/local/share/lua/5.1/kong/cmd/init.lua:87>
[C]: in function ‘xpcall’
/usr/local/share/lua/5.1/kong/cmd/init.lua:87: in function </usr/local/share/lua/5.1/kong/cmd/init.lua:44>
/usr/local/bin/kong:7: in function ‘file_gen’
init_worker_by_lua:47: in function <init_worker_by_lua:45>
[C]: in function ‘xpcall’
init_worker_by_lua:54: in function <init_worker_by_lua:52>

The kong.conf file has the database set to cassandra along with cassandra contact_points, keyspace, username, password & replication factor. A migration has been run before starting kong and it created and updated the keyspace.

We have been using 0.13.1 with this config without issue and I have updated to use 0.14.1 and the issue occurs with a new install or an upgrade.

Any help would be appreciated.


#2

After further investigation it appears that the startup code for cassandra in share/lua/5.1/kong/db/strategies/cassandra/init.lua has a new function called is_partitioned that checks for major version == 3. Datastax Enterprise has the release_version in the system.local table as 4.0.0.604 and hence this fails.

Raised incident https://github.com/Kong/kong/issues/3837