Skip to content

Schema violation error during kong config db_import when upgrading from 2.4.1 to 2.8.4 #14740

@hmh2014

Description

@hmh2014

Current Behavior
When upgrading Kong from version 2.4.1 to 2.8.4, I encountered a schema violation error during the data import process using kong config db_import.

Error Details:
Error:
/usr/local/share/lua/5.1/kong/cmd/config.lua:123: Failed importing:
[cassandra] schema violation (no_broadcast_crud_event: unknown field)
stack traceback:
[C]: in function 'error'
/usr/local/share/lua/5.1/kong/cmd/config.lua:123: in function 'cmd_exec'
/usr/local/share/lua/5.1/kong/cmd/init.lua:89: in function </usr/local/share/lua/5.1/kong/cmd/init.lua:89>
[C]: in function 'xpcall'
/usr/local/share/lua/5.1/kong/cmd/init.lua:89: in function </usr/local/share/lua/5.1/kong/cmd/init.lua:89>
[C]: in function 'xpcall'
/usr/local/share/lua/5.1/kong/cmd/init.lua:89: in function </usr/local/share/lua/5.1/kong/cmd/init.lua:46>
/usr/local/bin/kong:9: in function 'file_gen'
init_worker_by_lua:51: in function <init_worker_by_lua:49>
[C]: in function 'xpcall'
init_worker_by_lua:58: in function <init_worker_by_lua:56>

Steps To Reproduce

  1. Export data from Kong 2.4.1 using kong config db_export -c /etc/kong/kong.conf
    2.Upgrade Kong to version 2.8.4
    3.Initialize new Cassandra keyspace with kong migrations bootstrap -c /etc/kong/kong.conf
    4.Attempt to import data using kong config db_import kong.yml -c /etc/kong/kong.conf
    5.Encounter the schema violation error

Environment
Source Kong Version: 2.4.1
Target Kong Version: 2.8.4
Database: Cassandra
Deployment Mode: Hybrid Mode (Control Plane + Data Plane)

Investigation
The exported kong.yml file does not contain the no_broadcast_crud_event field
The error suggests that Kong 2.8.4's import process is encountering this field internally
This appears to be a compatibility issue between Kong 2.4.1's export format and 2.8.4's import process

Metadata

Metadata

Assignees

No one assigned

    Labels

    pending author feedbackWaiting for the issue author to get back to a maintainer with findings, more details, etc...

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions