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

Don't exit container if bash is running [skip ui] #29871

Merged
merged 3 commits into from Jul 31, 2019

Conversation

uponthesun
Copy link

@uponthesun uponthesun commented Jul 23, 2019

With this change, if you "ssh" into the drone container (i.e. ssh onto the instance and bash into the container), the container will stay alive until you exit bash. This makes it easier to debug tests without having to worry about the test finishing and losing everything.

One issue: if you close your ssh session without exiting bash, the bash process within the container will still be alive. (For example, if you closed your laptop.) Root cause (I think) - terminating the session kills the docker exec process on the host, but that doesn't kill the bash process in the container: moby/moby#9098

We may be okay with this, given that it will eventually hit the 3-hour timeout we have configured on our drone repository settings, and that sshing in isn't super common.

@uponthesun uponthesun changed the title Don't exit container if bash is running [skip ui] [WIP] Don't exit container if bash is running [skip ui] Jul 25, 2019
@uponthesun uponthesun changed the title [WIP] Don't exit container if bash is running [skip ui] Don't exit container if bash is running [skip ui] Jul 31, 2019
@uponthesun uponthesun merged commit 7546e2e into staging Jul 31, 2019
@uponthesun uponthesun deleted the drone-ssh-keep-alive branch July 31, 2019 18:25
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.

None yet

2 participants