Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Control Plane fails to pull information from database pending "migrations finish" command #12861

Closed
1 task done
lays147 opened this issue Apr 15, 2024 · 2 comments
Closed
1 task done
Labels

Comments

@lays147
Copy link

lays147 commented Apr 15, 2024

Is there an existing issue for this?

  • I have searched the existing issues

Kong version ($ kong version)

3.6.1

Current Behavior

After deploying a new container version based on kong:3.6.1-ubuntu in the hybrid deployment, the control plane starts but apparently is unable to retrieve the configurations in the database since it logs an error that "migration finish" should be run, however it starts successfully and dispatches the update of the Data Plane, with no configuration at all.

image

Expected Behavior

The control plane should not start whether there's any database error, or it should not dispatch any updates to the Data Plane if there's any database error.

Steps To Reproduce

  1. Build a new docker image based on kong:3.6.1-ubuntu
  2. Deploy kong in hibrid mode with pending migrations on the database
  3. The control plane starts, but logs an error pending "migration finish" but it stays healthy
  4. Data plane connects to CP to retrieve the config, and it gets nothing. All proxy routes fails with 404

Anything else?

Debugging more of my logs, I found an issue with the ddtrace plugin configuration that impacted the Data Plane, and Kong didn't show any logs that this error impacted the whole process of configuration the Data Plane.

However, I'll persist with this issue here, because I had the same problem in my staging environment where the ddtrace was not used.

@samugi samugi added the core/db label Apr 19, 2024
@StarlightIbuki
Copy link
Contributor

This is an expected behavior of Kong. When Kong migrates to the new version, it applies a technique called blue-green deployment, which allows a seamless transition to the new version.
After kong migrations up, the cluster enters a state where DPs of the old version and new version can coexist, and the database should be able to support both of them; the kong migrations finish cleans up the database, which should be called after the migration process is done and old version DPs are no longer running.

@StarlightIbuki
Copy link
Contributor

It is not an error, but a message that should not be ignored by the admin, thus the error level.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants