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

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

Merged

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>
@@ -55,4 +55,4 @@ COPY --from=builder --chown=vitess:vitess /vt/install /vt
VOLUME /vt/vtdataroot
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
Member

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

@@ -55,4 +55,4 @@ COPY --from=builder --chown=vitess:vitess /vt/install /vt
VOLUME /vt/vtdataroot
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
Member

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

@@ -247,6 +247,9 @@ func VtcomboProcess(env Environment, args *Config, mysql MySQLManager) *VtProces
if args.VSchemaDDLAuthorizedUsers != "" {
vt.ExtraArgs = append(vt.ExtraArgs, []string{"-vschema_ddl_authorized_users", args.VSchemaDDLAuthorizedUsers}...)
}
if *servenv.MySQLServerVersion != "" {
Copy link
Member

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
Member

@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