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

Eliminate possible infinite loop in exec #9890

Merged
merged 1 commit into from Jun 16, 2015

Conversation

ncdc
Copy link
Member

@ncdc ncdc commented Jun 16, 2015

If a user starts an exec session with a shell and leaves it idle long
enough, they will eventually hit the Kubelet's HTTP server's read/write
timeout of 5 minutes. At this time, the StartExec call to Docker exits,
but if the user requested a TTY, the exec'd process does not exit.
After StartExec finishes, we try to determine the exit code of the
exec'd process, but in this case, we'll never get it. This change exits
the loop after 5 tries if the process is still running.

If a user starts an exec session with a shell and leaves it idle long
enough, they will eventually hit the Kubelet's HTTP server's read/write
timeout of 5 minutes. At this time, the StartExec call to Docker exits,
but if the user requested a TTY, the exec'd process does not exit.
After StartExec finishes, we try to determine the exit code of the
exec'd process, but in this case, we'll never get it. This change exits
the loop after 5 tries if the process is still running.
@k8s-bot
Copy link

k8s-bot commented Jun 16, 2015

Can one of the admins verify that this patch is reasonable to test? (reply "ok to test", or if you trust the user, reply "add to whitelist")

If this message is too spammy, please complain to ixdy.

@smarterclayton
Copy link
Contributor

LGTM - should be candidate for 1.0 due to leaking goroutines

@ncdc
Copy link
Member Author

ncdc commented Jun 16, 2015

And post 1.0, we should try to find something other than 'docker exec' if possible.

@saad-ali
Copy link
Member

@k8s-bot test this please

@k8s-bot
Copy link

k8s-bot commented Jun 16, 2015

GCE e2e build/test passed for commit 7748a02.

saad-ali added a commit that referenced this pull request Jun 16, 2015
Eliminate possible infinite loop in exec
@saad-ali saad-ali merged commit f7cb6e9 into kubernetes:master Jun 16, 2015
@ncdc ncdc deleted the fix-exec-infinite-loop branch February 13, 2017 17: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

5 participants