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

Update system-mysql internal DB from MySQL 5.7 to 8.0 #682

Merged
merged 5 commits into from Mar 22, 2022

Conversation

miguelsorianod
Copy link
Contributor

@miguelsorianod miguelsorianod commented Nov 3, 2021

The change of image also implies an automated upgrade from
MySQL 5.7 to 8.0 when coming from an older 3scale installation
where 5.7 is used. There is no need for a custom upgrade procedure.

The data migration is performed automatically when changing the image.

On the product side, the image to be set will be:
registry.redhat.io/rhscl/mysql-80-rhel7:8.0

JIRA: https://issues.redhat.com/browse/THREESCALE-7786
which depends on https://issues.redhat.com/browse/THREESCALE-6825

Verification steps

Deploy 3scale with the APIManager

k apply -f - <<EOF
apiVersion: apps.3scale.net/v1alpha1
kind: APIManager
metadata:
  name: apimanager
spec:
  wildcardDomain: ns.apps.example.com

Wait for the deployment to be ready

oc wait --for=condition=available apimanager/apimanager --timeout=-1s

Check mysql 8 is running

oc exec -t dc/system-mysql -- /opt/rh/rh-mysql80/root/usr/libexec/mysqld --version
/opt/rh/rh-mysql80/root/usr/libexec/mysqld  Ver 8.0.21 for Linux on x86_64 (Source distribution)

@miguelsorianod miguelsorianod added the work in progress Don't merge, there's still work to do. label Nov 3, 2021
@miguelsorianod
Copy link
Contributor Author

At the moment this cannot be merged due to system's pre-hook pod is failing to start after this changes.
This issue has been identified in https://issues.redhat.com/browse/THREESCALE-6825 and this issue cannot be merged until that issue is resolved and this PR is tested again after those changes to verify that all works. The PR will need to be tested with both the upstream and product image, including the upgrade between mysql 5.7 and 8

eguzki
eguzki previously approved these changes Nov 8, 2021
Copy link
Member

@eguzki eguzki left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this was a very easy one :)

@eguzki
Copy link
Member

eguzki commented Nov 8, 2021

starting command line or env vars... all remain the same from 5.7 to 8? Seems like 5.8 more than 8.0 :)

@miguelsorianod
Copy link
Contributor Author

starting command line or env vars... all remain the same from 5.7 to 8? Seems like 5.8 more than 8.0 :)

It should remain the same. It's 8.0. MySQL 5.8 does not exist.

@eguzki eguzki changed the title [DON'T MERGE] Update system-mysql internal DB from MySQL 5.7 to 8.0 Update system-mysql internal DB from MySQL 5.7 to 8.0 Mar 7, 2022
@eguzki eguzki requested review from KevFan and MStokluska March 7, 2022 17:10
@eguzki eguzki dismissed their stale review March 7, 2022 17:11

I take the ownership of the PR

@eguzki eguzki removed the work in progress Don't merge, there's still work to do. label Mar 7, 2022
miguelsorianod and others added 5 commits March 14, 2022 16:05
The change of image also implies an automated upgrade from
MySQL 5.7 to 8.0 when coming from an older 3scale installation
where 5.7 is used. There is no need for a custom upgrade procedure.
@codeclimate
Copy link

codeclimate bot commented Mar 14, 2022

An error occurred when fetching issues.

View more on Code Climate.

@eguzki
Copy link
Member

eguzki commented Mar 16, 2022

@MStokluska added verification steps

@MStokluska
Copy link
Contributor

Reviewed code and tested in an upgrade scenario on my cluster. Looks good to me.
/lgtm

@MStokluska
Copy link
Contributor

/approve

Copy link
Contributor

@MStokluska MStokluska left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me, verified changes on cluster and code looks good as well

@eguzki eguzki merged commit 3883469 into master Mar 22, 2022
@eguzki eguzki deleted the upgrade-systemmysql57to8 branch March 22, 2022 09:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants