The Wayback Machine - https://web.archive.org/web/20201110183617/https://github.com/vitessio/vitess/issues/6290
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

SIGHUP kills vtgate if no auth is configured #6290

Open
gedgar opened this issue Jun 9, 2020 · 0 comments
Open

SIGHUP kills vtgate if no auth is configured #6290

gedgar opened this issue Jun 9, 2020 · 0 comments

Comments

@gedgar
Copy link
Contributor

@gedgar gedgar commented Jun 9, 2020

Overview of the Issue

While you can send vtgate a SIGHUP to reload it's mysql_auth_server_static_file JSON credentials file, I noticed during some testing that a SIGHUP will actually kill vtgate entirely if mysql_auth_server_impl is set to none or if both mysql_auth_server_static_file and mysql_auth_server_static_string are empty.

Reproduction Steps

  1. Launch the local example
  2. Confirm vtgate is running w/ mysql_auth_server_impl none:
ps aux | grep [v]tgate
gary     17067  0.1  0.3 1940404 43372 pts/2   Rl   11:21   0:00 vtgate -topo_implementation etcd2 -topo_global_server_address localhost:2379 -topo_global_root /vitess/global -log_dir /home/gary/vtdataroot/tmp -log_queries_to_file /home/gary/vtdataroot/tmp/vtgate_querylog.txt -port 15001 -grpc_port 15991 -mysql_server_port 15306 -mysql_server_socket_path /tmp/mysql.sock -cell zone1 -cells_to_watch zone1 -tablet_types_to_wait MASTER,REPLICA -gateway_implementation discoverygateway -service_map grpc-vtgateservice -pid_file /home/gary/vtdataroot/tmp/vtgate.pid -mysql_auth_server_impl none
  1. Send SIGHUP
    kill -1 $(pgrep vtgate)
  2. Note that vtgate has been killed and is no longer running.

Binary version

Version: 945e105aa (Git branch 'master') built on Tue Jun 9 11:20:38 PDT 2020 by gary@xj13 using go1.14 linux/amd64

Log Fragments

I didn't notice anything relevant/useful in Vitess' logs.
strace of vtgate being killed by via SIGHUP:

--- SIGHUP {si_signo=SIGHUP, si_code=SI_USER, si_pid=13723, si_uid=1000} ---
rt_sigprocmask(SIG_UNBLOCK, [HUP], NULL, 8) = 0
getpid()                                = 17067
gettid()                                = 17067
tgkill(17067, 17067, SIGHUP)            = 0
--- SIGHUP {si_signo=SIGHUP, si_code=SI_TKILL, si_pid=17067, si_uid=1000} ---
rt_sigaction(SIGHUP, {sa_handler=SIG_DFL, sa_mask=~[], sa_flags=SA_RESTORER|SA_ONSTACK|SA_RESTART|SA_SIGINFO, sa_restorer=0x7f4222daa890}, NULL, 8) = 0
rt_sigprocmask(SIG_UNBLOCK, [HUP], NULL, 8) = 0
getpid()                                = 17067
gettid()                                = 17067
tgkill(17067, 17067, SIGHUP)            = 0
--- SIGHUP {si_signo=SIGHUP, si_code=SI_TKILL, si_pid=17067, si_uid=1000} ---
+++ killed by SIGHUP +++
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
2 participants
You can’t perform that action at this time.