[UI] Database does not come up if the version is changed

Description

Install all operators using cli. From the UI, create a mysql database of 1 standalone small node, version is 8.0.31-23.2. Create some data in the mysql database.

Then using edit change the database version to 8.0.27-18.1. Mysql doesn't allow downgrading from 8.0.31 to 8.0.27, hence the database pods don't come up. 

MySQL init process in progress... 2023-08-30T12:14:03.642894Z 0 [Warning] [MY-011068] [Server] The syntax 'wsrep_slave_threads' is deprecated and will be removed in a future release. Please use wsrep_applier_threads instead. 2023-08-30T12:14:03.644719Z 0 [Warning] [MY-000000] [WSREP] Node is not a cluster node. Disabling pxc_strict_mode 2023-08-30T12:14:03.645274Z 0 [Warning] [MY-010918] [Server] 'default_authentication_plugin' is deprecated and will be removed in a future release. Please use authentication_policy instead. 2023-08-30T12:14:03.645294Z 0 [System] [MY-010116] [Server] /usr/sbin/mysqld (mysqld 8.0.27-18.1) starting as process 144 2023-08-30T12:14:03.647311Z 0 [Warning] [MY-013746] [Server] A deprecated TLS version TLSv1 is enabled for channel mysql_main 2023-08-30T12:14:03.647327Z 0 [Warning] [MY-013746] [Server] A deprecated TLS version TLSv1.1 is enabled for channel mysql_main 2023-08-30T12:14:03.649367Z 0 [Warning] [MY-010068] [Server] CA certificate /etc/mysql/ssl-internal/ca.crt is self signed. 2023-08-30T12:14:03.649407Z 0 [System] [MY-013602] [Server] Channel mysql_main configured to support TLS. Encrypted connections are now supported for this channel. 2023-08-30T12:14:03.650424Z 0 [Warning] [MY-013245] [Server] The SSL library function CRYPTO_set_mem_functions failed. This is typically caused by the SSL library already being used. As a result the SSL memory allocation will not be instrumented. 2023-08-30T12:14:03.653329Z 1 [System] [MY-013576] [InnoDB] InnoDB initialization has started. 2023-08-30T12:14:04.219942Z 1 [ERROR] [MY-013171] [InnoDB] Cannot boot server version 80027 on data directory built by version 80031. Downgrade is not supported MySQL init process in progress... 2023-08-30T11:46:40.163236Z 1 [ERROR] [MY-010334] [Server] Failed to initialize DD Storage Engine 2023-08-30T11:46:40.163481Z 0 [ERROR] [MY-010020] [Server] Data Dictionary initialization failed. 2023-08-30T11:46:40.163826Z 0 [ERROR] [MY-010119] [Server] Aborting 2023-08-30T11:46:40.164439Z 0 [System] [MY-010910] [Server] /usr/sbin/mysqld: Shutdown complete (mysqld 8.0.27-18.1)  Percona XtraDB Cluster (GPL), Release rel18, Revision ac35177, WSREP version 26.4.

Same issue is observed when the mongodb version is edited from 4.4 to 6.0.5.4. The mongodb pod goes into CrashLoopBackOff and its logs display

{"t":{"$date":"2023-08-30T12:29:36.409+00:00"},"s":"F",  "c":"CONTROL",  "id":20573,   "ctx":"initandlisten","msg":"Wrong mongod version","attr":{"error":"UPGRADE PROBLEM: Found an invalid featureCompatibilityVersion document (ERROR: Location4926900: Invalid featureCompatibilityVersion document in admin.system.version: { _id: \"featureCompatibilityVersion\", version: \"4.4\" }. See https://docs.mongodb.com/master/release-notes/5.0-compatibility/#feature-compatibility. :: caused by :: Invalid feature compatibility version value, expected '5.0' or '5.3' or '6.0. See https://docs.mongodb.com/master/release-notes/5.0-compatibility/#feature-compatibility.). If the current featureCompatibilityVersion is below 5.0, see the documentation on upgrading at https://docs.mongodb.com/master/release-notes/5.0/#upgrade-procedures."}}

Environment

None

Attachments

3
  • 06 Sep 2023, 11:22 AM
  • 04 Sep 2023, 08:18 AM
  • 04 Sep 2023, 08:16 AM

Activity

Manish Chawla September 6, 2023 at 11:23 AM

Now in edit database, the database version is disabled for edit

Hence closing this issue. Thanks Andrew and for fixing this issue.

Manish Chawla September 4, 2023 at 8:20 AM

Thanks Andrew, it is working on the backend side

But this also needs to be done on the front end and the database version should be disabled for edit like storage class

Andrei Minkin August 31, 2023 at 2:17 PM

Done on the BE side and disabled an ability to change engine version.

Diogo Recharte August 31, 2023 at 1:11 PM
Edited

I don't think we should allow it. I would even go a step further like Andrew was suggesting and I would disable upgrading as well for this release. For now, the version the user sets on creation time should be immutable.

Andrei Minkin August 31, 2023 at 11:52 AM

Right now we can make the version field disabled on the FE side. On the API level this behaviour will exist until https://perconadev.atlassian.net/browse/EVEREST-256#icft=EVEREST-256 will be solved 

Done

Details

Assignee

Reporter

Sprint

Fix versions

Affects versions

Priority

Smart Checklist

Created August 31, 2023 at 11:39 AM
Updated September 6, 2023 at 11:24 AM
Resolved September 6, 2023 at 11:24 AM

Flag notifications