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

Do not do mysql_flavor detection for external/unmanaged tablets #5225

Merged
merged 3 commits into from
Sep 26, 2019

Conversation

morgo
Copy link
Contributor

@morgo morgo commented Sep 25, 2019

Skips the panic for flavor detection for external tablets.

Manually tested with:

/home/morgo/vitess/bin/vttablet -topo_implementation etcd2 -topo_global_server_address localhost:2379 -topo_global_root /vitess/global -tablet-path zone1-0000000102 -tablet_hostname '' -init_keyspace commerce -init_shard 0 -init_tablet_type rdonly  -service_map grpc-queryservice,grpc-tabletmanager,grpc-updatestream -pid_file /tmp/vtdataroot/vt_0000000102/vttablet.pid -vtctld_addr http://morgox1:15000/ -db_host 127.0.0.1 -db_port 5726

Without this patch I will get a panic, which is a regression in behavior introduced by flavor detection:

panic: could not auto-detect MySQL version. You may need to set VT_MYSQL_ROOT so a mysqld binary can be found, or set the environment variable MYSQL_FLAVOR if mysqld is not available locally:
	VT_MYSQL_ROOT: /tmp
	VTROOT: 
	vtenv.VtMysqlRoot(): /tmp
	MYSQL_FLAVOR: 
	

goroutine 1 [running]:
vitess.io/vitess/go/vt/mysqlctl.NewMysqld(0x21a70e0, 0x0)
	/home/morgo/vitess/src/vitess.io/vitess/go/vt/mysqlctl/mysqld.go:165 +0x735
main.main()
	/home/morgo/vitess/src/vitess.io/vitess/go/cmd/vttablet/vttablet.go:120 +0x51a

Signed-off-by: Morgan Tocker [email protected]

Skips the panic for flavor detection

Signed-off-by: Morgan Tocker <[email protected]>
@morgo morgo requested a review from sougou as a code owner September 25, 2019 21:32
Signed-off-by: Morgan Tocker <[email protected]>
Signed-off-by: Morgan Tocker <[email protected]>
@morgo morgo added this to the v4.0 milestone Sep 26, 2019
@sougou sougou merged commit cd572b0 into master Sep 26, 2019
@sougou sougou deleted the morgo-external-vttablet branch September 26, 2019 16:47
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.

2 participants