Add MariaDB major version upgrade support (OSPRH-31231)#492
Conversation
|
Skipping CI for Draft Pull Request. |
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: zzzeek The full list of commands accepted by this bot can be found here. DetailsNeeds approval from an approver in each of these files:Approvers can indicate their approval by writing |
| mkdir -p /usr/libexec && ln -s /usr/sbin/mysqld /usr/libexec/mysqld && \ | ||
| mkdir -p /usr/lib64/galera && ln -s /usr/lib64/galera-4/libgalera_smm.so /usr/lib64/galera/libgalera_smm.so | ||
|
|
||
| USER mysql |
| #!/bin/bash | ||
| set +eu | ||
|
|
||
| if [ "$(id -u)" != "$(id -u mysql)" ]; then |
There was a problem hiding this comment.
this is all stuff I added when i was testing with an image that didn't have "USER: mysql" in it. i think it's good to have for this kind of thing though.
|
I have a public image with mariadb 10.11 on top of RHEL9 at quay.io/rhn_engineering_mbayer/openstack-mariadb:10.11-test-4 |
eced4c7 to
97af633
Compare
Adds spec.targetVersion to the Galera CR so the openstack-operator can signal a major version upgrade (e.g. "10.11"). When targetVersion differs from the deployed version recorded in status.clusterProperties, the controller adds TargetVersion to the ClusterProperties hash, triggering a full cluster stop via the existing StopRequired mechanism. On restart, an upgrade init container runs mysql_version_upgrade.sh before mysql_bootstrap.sh, starting mysqld in standalone mode and calling mariadb-upgrade against the node's PVC. Once the cluster bootstraps with the new image, status.clusterProperties["TargetVersion"] is advanced to match spec, removing the init container from subsequent StatefulSet reconciles. Also adds hack/Containerfile.mariadb-10.11 for building a CentOS 9 based test image with MariaDB 10.11 community packages, to be used for prototyping and validating the upgrade path until a production RHEL 10 image is available. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Adds spec.targetVersion to the Galera CR so the openstack-operator can signal a major version upgrade (e.g. "10.11"). When targetVersion differs from the deployed version recorded in status.clusterProperties, the controller adds TargetVersion to the ClusterProperties hash, triggering a full cluster stop via the existing StopRequired mechanism. On restart, an upgrade init container runs mysql_version_upgrade.sh before mysql_bootstrap.sh, starting mysqld in standalone mode and calling mariadb-upgrade against the node's PVC. Once the cluster bootstraps with the new image, status.clusterProperties["TargetVersion"] is advanced to match spec, removing the init container from subsequent StatefulSet reconciles.
Also adds hack/Containerfile.mariadb-10.11 for building a CentOS 9 based test image with MariaDB 10.11 community packages, to be used for prototyping and validating the upgrade path until a production RHEL 10 image is available.