Open gmpify opened 6 days ago
I took a look at the code in depth today. And yes there are some problems in the code. I'll describe both the grpc and mysqld problems separately.
For the grpc port, vttestserver
is accepting the grpc related flags like grpc_port
, grpc_bind_address
, grpc_max_connection_age
and so on, but it doesn't pass them onto the vtcombo
binary. It only sets the grpc_port
and that too with a value of the baseport + 1. This is causing vtcombo to start the grpc on all addresses and not on just the one you specified. The fix for this would be to pass the arguments forward from vttestserver to vtcombo when it initializes it.
For the MySQL port, it doesn't look like mysqlctl
and mysqlctld
even support starting a MySQL on a non-default hostname. It only accepts the mysql_port
flag, that vttestserver is passing on. It uses this value to put into the my.cnf
file as port=<value>
before starting MySQL. However it doesn't yet populate the host
field. So, if this is required, then we'd have to augment both of those commands first, and then make vttestserver pass in the newly created flag.
In the command mysql_bind_host
, is the hostname that vtcombo is going to be using to start listening for MySQL queries and not the MySQL hostname to start MySQL on. We don't have a flag for that at all.
Feature Description
We'd like to run vttestserver bound on a specific IP interface. When we run vttestserver, it correctly binds vtcombo and vtgate to the specified interface. But the underlying mysqld and GRPC server would still bind to
0.0.0.0
.How to reproduce:
Use Case(s)
With this feature we could also run multiple instances of vttestserver on the same machine, each of them bound to a separate IP interface.