Closed tnixa closed 4 years ago
Testing this further and ctrl-c doesn't work on local windows git bash terminal or command prompt terminal. I tried to backlevel Docker Desktop to 2.1.0.5 and the problem was still there. I backleveled appsody to 0.5.4 and the problem went away (ctrl-c was killing the container). I then went up to appsody 0.5.5 and the problem came back. So it appears something was introduced in appsody 0.5.5 to cause ctrl-c to not work properly
More testing today, and we found the issue is intermittent. It doesn't matter which version of appsody cli or controller or docker, the problem comes and goes.
The root cause is that the windows docker client immediately kills the container on ctrl-c rather than sending the signal inside and waiting for graceful cleanup. Our appsody cli tries to call docker stop
, however the main thread ends so quickly that sometimes docker stop
gets called and sometimes it doesn't.
I've implemented a fix in the CLI https://github.com/appsody/appsody/pull/875 which tells the main thread to wait if a signal processing thread is active. This resolves the issue on windows and does not impact other platforms as far as we know.
Alternatives we considered is passing -i
to docker run
which seems to change the way windows docker sends the signals. However we are not sure of other side effects which may occur when doing this.
Describe the bug I am sshing to my windows 10 system as jenkinstest user (non-Azure) and I have the shell set to git bash for ssh and when I do an appsody run and then do a ctrl-c to exit out of the run the container does not get removed...
To Reproduce Steps to reproduce the behavior:
ssh jenkinstest@9.10.255.188
mkdir express
cd express
appsody init nodejs-express
appsody run
Environment Details (please complete the following information):
If applicable please specify: