aiven/aiven-operator

Unable to upgrade to new major version of Postgres

Closed this issue · 1 comments

We attempted to upgrade to a new major version of postgres (14->15), by editing the .spec.user_config.pg_version field.
The change was accepted, but nothing happened in the console.
Checking the logs of the aiven-operator revealed that a missing pre-condition caused the upgrade to fail:

aiven-operator-7bc759484f-4g6ch aiven-operator 1.7062750644760764e+09	ERROR	Reconciler error	{"controller": "postgresql", "controllerGroup": "aiven.io", "controllerKind": "PostgreSQL", "PostgreSQL": {"name":"postgresql-basseng-evaluering","namespace":"basseng"}, "namespace": "basseng", "name": "postgresql-basseng-evaluering", "reconcileID": "2d9331d0-2bcc-4968-8863-f59dc53ab8f5", "error": "unable to create or update instance at aiven: unable to create or update aiven instance: failed to update service: 400: {\"errors\":[{\"message\":\"Upgrade check result missing, please run upgrade_check task\",\"status\":400}],\"message\":\"Upgrade check result missing, please run upgrade_check task\"} - "}

A bit more readable:

{
  "message": "Upgrade check result missing,please run upgrade_check task",
  "status": 400
}

Clicking the "Upgrade version" button in the console and selecting the target version triggered an upgrade check.
When the check was completed, the operator continued with the upgrade, while we could cancel the dialog in the console.

The operator seems to be missing some kind of upgrade check feature that can only be triggered through the console/API.

Hi @mortenlj, thanks you for reporting the issue. This capability is currently missing, I have created a ticket in our internal backlog to track this. In the meantime, you can use Aiven Console (instructions: https://docs.aiven.io/docs/products/postgresql/howto/upgrade) to update the database to the latest version.

Please note that we recently released Postgres 16 (https://aiven.io/blog/enhanced-performance-with-postgresql-16). Operator support for v16 was added in (#601, unreleased). We have scheduled a new release for next week.