vitessio / vitess

Vitess is a database clustering system for horizontal scaling of MySQL.
http://vitess.io
Apache License 2.0
18.51k stars 2.09k forks source link

Vitess Operator (VitessCluster) - setting mysql80Compatible and using mysql80 images still results in mysqld 5.7 #8602

Closed jai closed 3 years ago

jai commented 3 years ago

Hi - not sure if I'm missing something on how to set up Vitess Operator to use MySQL 8.0?

Ref Slack thread: https://vitess.slack.com/archives/CNE9WP677/p1628481964005800

Overview of the Issue

Using the Vitess Operator to set up a VitessCluster with the following spec:

apiVersion: planetscale.com/v2
kind: VitessCluster
metadata:
  name: test-mysql8-retest-05
spec:
  images:
    vtctld: vitess/lite:mysql80
    vtgate: vitess/lite:mysql80
    vttablet: vitess/lite:mysql80
    vtbackup: vitess/lite:mysql80
    mysqld:
      mysql80Compatible: vitess/lite:mysql80
    mysqldExporter: prom/mysqld-exporter:v0.11.0
...

The mysqld version running on the vttablet and vtctld Pods still return their version as 5.7.

Reproduction Steps

Steps to reproduce this issue, example:

  1. Create a VitessCluster resource using the above spec/images
  2. Connect in to the terminal of any vttablet or vtctld Pod
  3. Run the following command and receive the given output:
    $ /usr/sbin/mysqld --version
    /usr/sbin/mysqld  Ver 5.7.31 for Linux on x86_64 (MySQL Community Server (GPL))

Binary version

Using the Vitess operator.yaml from main

Operating system and Environment details

Running on AWS EKS.

deepthi commented 3 years ago

Looks like something has changed in the autobuild config on docker. All vitess/lite images off main are being built with mysql57 instead of the correct flavor. I have fixed the configuration and queued up new builds. v11.0.0-mysql80 was built with the correct underlying mysql.

jai commented 3 years ago

Thanks @deepthi - what would you think about me PR'ing/adding examples to the examples folder to include a mysql8 cluster? or let me know if another location would be more appropriate.

I'd probably want to add a mention on the Vitess Operator for Kubernetes page as well.

deepthi commented 3 years ago

I think both examples and website docs will be good. Thank you for volunteering!

deepthi commented 3 years ago

I just checked the most recent docker build for mysql80 and it built with the correct steps, so it should be good now.

jai commented 3 years ago

Yes, now running MySQL Ver 8.0.23

$ /usr/sbin/mysqld --version
/usr/sbin/mysqld  Ver 8.0.23 for Linux on x86_64 (MySQL Community Server - GPL)
jai commented 3 years ago

Thanks for the help @deepthi !

jai commented 3 years ago

@deepthi created issue here: https://github.com/vitessio/vitess/issues/8627 - I can't assign myself though, appreciate if you can assign me?

droslean commented 2 years ago

@jai Can you explain at least, how you solved this issue?