Skip to content

Enable -mysql_server_version in vttestserver, and utilize it in vttestserver container images#7474

Merged
dkhenry merged 3 commits intovitessio:masterfrom
planetscale:vttestserver-mysql-server-version
Feb 9, 2021
Merged

Enable -mysql_server_version in vttestserver, and utilize it in vttestserver container images#7474
dkhenry merged 3 commits intovitessio:masterfrom
planetscale:vttestserver-mysql-server-version

Conversation

@mcronce
Copy link

@mcronce mcronce commented Feb 9, 2021

Description

Exposes the -mysql_server_version parameter in vttestserver, and changes the vitess/vttestserver container images to set it appropriately.

Related Issue(s)

Checklist

  • Should this PR be backported?
  • Tests were added or are not required
  • Documentation was added or is not required

Deployment Notes

N/A - only impacts new vttestserver runs

Impacted Areas in Vitess

Components that this PR will affect:

  • Query Serving
  • VReplication
  • Cluster Management
  • Build/CI
  • VTAdmin

Mike Cronce added 2 commits February 9, 2021 12:57
…erverVersion downstream

Signed-off-by: Mike Cronce <mc@planetscale.com>
Signed-off-by: Mike Cronce <mc@planetscale.com>
USER vitess

CMD /vt/bin/vttestserver -port $PORT -keyspaces $KEYSPACES -num_shards $NUM_SHARDS -mysql_bind_host ${MYSQL_BIND_HOST:-127.0.0.1}
CMD /vt/bin/vttestserver -port $PORT -keyspaces $KEYSPACES -num_shards $NUM_SHARDS -mysql_bind_host ${MYSQL_BIND_HOST:-127.0.0.1} -mysql_server_version 5.7.9-vitess
Copy link
Collaborator

Choose a reason for hiding this comment

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

It will be nice to allow users to override this with an env variable.
We can default to 5.7.9-Vitess which is the internal default as well.

Copy link
Author

Choose a reason for hiding this comment

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

Done

USER vitess

CMD /vt/bin/vttestserver -port $PORT -keyspaces $KEYSPACES -num_shards $NUM_SHARDS -mysql_bind_host ${MYSQL_BIND_HOST:-127.0.0.1}
CMD /vt/bin/vttestserver -port $PORT -keyspaces $KEYSPACES -num_shards $NUM_SHARDS -mysql_bind_host ${MYSQL_BIND_HOST:-127.0.0.1} -mysql_server_version 8.0.0-vitess
Copy link
Collaborator

Choose a reason for hiding this comment

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

We should probably use a current mysql version - say 8.0.21.
To make this more usable, how about adding an env variable similar to the others and defaulting to 8.0.21-Vitess?

Copy link
Author

Choose a reason for hiding this comment

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

Done

if args.VSchemaDDLAuthorizedUsers != "" {
vt.ExtraArgs = append(vt.ExtraArgs, []string{"-vschema_ddl_authorized_users", args.VSchemaDDLAuthorizedUsers}...)
}
if *servenv.MySQLServerVersion != "" {
Copy link
Collaborator

Choose a reason for hiding this comment

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

This is cool. I thought we would have to add an arg.

Copy link
Author

Choose a reason for hiding this comment

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

That was what I tried first, but it failed because this one was already being pulled in :)

…and change the :mysql80 default from 8.0.0-vitess to 8.0.21-vitess

Signed-off-by: Mike Cronce <mc@planetscale.com>
Copy link
Collaborator

@deepthi deepthi left a comment

Choose a reason for hiding this comment

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

LGTM

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

vttestserver: Allow override of mysql_server_version

5 participants