leopardslab / clocal-azure

🔬 Emulation engine for Azure
Apache License 2.0
76 stars 123 forks source link

Fix service exit (mySQL) #92

Open JosephSemrai opened 4 years ago

JosephSemrai commented 4 years ago

Previous Behavior

WindowsTerminal_Uy6AJTkmOR The terminal would hang on the process, and sometimes, the Docker container would not be killed.

New Behavior

Code_RxZsO57pkl

Upon detecting an exec_die event, we will attach to the container, pipe the output to the console, and send a command that shuts mysqld down, solving the previous issue of it not wanting to shut down. We then send a stop signal to the container which gracefully attempts to shut down all other daemons and services (and serves as a fallback were the command above not to work), and then exit the process using the previous exit() function.

Related Issue

closes #60

Testing and Maintenance