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

Enable sig-proxy by default in run and attach #2426

Merged
merged 2 commits into from Oct 29, 2013

Conversation

Projects
None yet
4 participants
@vieux
Collaborator

vieux commented Oct 29, 2013

@tianon

This comment has been minimized.

Show comment
Hide comment
@tianon

tianon Oct 29, 2013

Member

Can we rebase this now that master includes links? :)

Member

tianon commented Oct 29, 2013

Can we rebase this now that master includes links? :)

@tianon

This comment has been minimized.

Show comment
Hide comment
@tianon

tianon Oct 29, 2013

Member

Rebased with permission from @shykes; testing now.

Member

tianon commented Oct 29, 2013

Rebased with permission from @shykes; testing now.

@tianon

This comment has been minimized.

Show comment
Hide comment
@tianon

tianon Oct 29, 2013

Member

Shouldn't this proxy with something simple like docker run -i -t tianon/debian bash ? Here's my output:

tianon@host$ docker run -i -t tianon/debian bash
root@cebc0312a73c:/# trap 'echo hello world!' SIGUSR1
root@cebc0312a73c:/# kill -USR1 $$
hello world!
root@cebc0312a73c:/#

Open second terminal, find PID of docker run (in my case, 4093), and do:

tianon@host$ kill -USR1 4093

No extra output on the first terminal. Shouldn't SIGUSR1 be "proxified" to bash?

Member

tianon commented Oct 29, 2013

Shouldn't this proxy with something simple like docker run -i -t tianon/debian bash ? Here's my output:

tianon@host$ docker run -i -t tianon/debian bash
root@cebc0312a73c:/# trap 'echo hello world!' SIGUSR1
root@cebc0312a73c:/# kill -USR1 $$
hello world!
root@cebc0312a73c:/#

Open second terminal, find PID of docker run (in my case, 4093), and do:

tianon@host$ kill -USR1 4093

No extra output on the first terminal. Shouldn't SIGUSR1 be "proxified" to bash?

@tianon

This comment has been minimized.

Show comment
Hide comment
@tianon

tianon Oct 29, 2013

Member

Is this saying that if there is a TTY, we always force-disable sig-proxy ?

+  if config.Tty {
+    sigProxy = false
+  }
Member

tianon commented Oct 29, 2013

Is this saying that if there is a TTY, we always force-disable sig-proxy ?

+  if config.Tty {
+    sigProxy = false
+  }
@vieux

This comment has been minimized.

Show comment
Hide comment
@vieux

vieux Oct 29, 2013

Collaborator

@tianon yes, because in tty mode, signals are always proxified, using the raw terminal method

Collaborator

vieux commented Oct 29, 2013

@tianon yes, because in tty mode, signals are always proxified, using the raw terminal method

@tianon

This comment has been minimized.

Show comment
Hide comment
@tianon

tianon Oct 29, 2013

Member

So why didn't my SIGUSR1 get proxified?

Member

tianon commented Oct 29, 2013

So why didn't my SIGUSR1 get proxified?

@crosbymichael

This comment has been minimized.

Show comment
Hide comment
@crosbymichael

crosbymichael Oct 29, 2013

Contributor

@vieux

There is something wrong with this branch. I am getting error messages in the tests.

-- PASS: TestImagesFilter (0.14 seconds)
=== RUN TestServerListOrderedImagesByCreationDate
[error] api.go:78 HTTP Error: statusCode=404 No such container: ff5e69349b4d
[error] api.go:1023 Error: No such container: 6f785d278165
[error] api.go:78 HTTP Error: statusCode=404 No such container: 6f785d278165
[error] api.go:1023 Error: No such container: f93fbb878f6b
[error] api.go:78 HTTP Error: statusCode=404 No such container: f93fbb878f6b
[error] api.go:1023 Error: No such container: ec391abab5ea
[error] api.go:78 HTTP Error: statusCode=404 No such container: ec391abab5ea
[error] api.go:1023 Error: No such container: 63aa5fc69086
[error] api.go:78 HTTP Error: statusCode=404 No such container: 63aa5fc69086
[error] api.go:1023 Error: No such container: 588ec30a53cf
[error] api.go:78 HTTP Error: statusCode=404 No such container: 588ec30a53cf
[error] api.go:1023 Error: No such container: d290fb38e240
[error] api.go:78 HTTP Error: statusCode=404 No such container: d290fb38e240
[error] api.go:1023 Error: No such container: d290fb38e2406ab20316c77eeb07c2afbf04b1d083a4655494ceb22a9cba6700
[error] api.go:78 HTTP Error: statusCode=404 No such container: d290fb38e2406ab20316c77eeb07c2afbf04b1d083a4655494ceb22a9cba6700
[error] api.go:1023 Error: No such container: ff5e69349b4d
[error] api.go:78 HTTP Error: statusCode=404 No such container: ff5e69349b4d
[error] api.go:1023 Error: No such container: 6f785d278165
[error] api.go:78 HTTP Error: statusCode=404 No such container: 6f785d278165
[error] api.go:1023 Error: No such container: f93fbb878f6b
[error] api.go:78 HTTP Error: statusCode=404 No such container: f93fbb878f6b
[error] api.go:1023 Error: No such container: ec391abab5ea
[error] api.go:78 HTTP Error: statusCode=404 No such container: ec391abab5ea
[error] api.go:1023 Error: No such container: 63aa5fc69086
[error] api.go:78 HTTP Error: statusCode=404 No such container: 63aa5fc69086
[error] api.go:1023 Error: No such container: ff5e69349b4d
[error] api.go:78 HTTP Error: statusCode=404 No such container: ff5e69349b4d
[error] api.go:1023 Error: No such container: d290fb38e2406ab20316c77eeb07c2afbf04b1d083a4655494ceb22a9cba6700
[error] api.go:78 HTTP Error: statusCode=404 No such container: d290fb38e2406ab20316c77eeb07c2afbf04b1d083a4655494ceb22a9cba6700
[error] api.go:1023 Error: No such container: 588ec30a53cf
[error] api.go:78 HTTP Error: statusCode=404 No such container: 588ec30a53cf
[error] api.go:1023 Error: No such container: d290fb38e240
[error] api.go:78 HTTP Error: statusCode=404 No such container: d290fb38e240
Contributor

crosbymichael commented Oct 29, 2013

@vieux

There is something wrong with this branch. I am getting error messages in the tests.

-- PASS: TestImagesFilter (0.14 seconds)
=== RUN TestServerListOrderedImagesByCreationDate
[error] api.go:78 HTTP Error: statusCode=404 No such container: ff5e69349b4d
[error] api.go:1023 Error: No such container: 6f785d278165
[error] api.go:78 HTTP Error: statusCode=404 No such container: 6f785d278165
[error] api.go:1023 Error: No such container: f93fbb878f6b
[error] api.go:78 HTTP Error: statusCode=404 No such container: f93fbb878f6b
[error] api.go:1023 Error: No such container: ec391abab5ea
[error] api.go:78 HTTP Error: statusCode=404 No such container: ec391abab5ea
[error] api.go:1023 Error: No such container: 63aa5fc69086
[error] api.go:78 HTTP Error: statusCode=404 No such container: 63aa5fc69086
[error] api.go:1023 Error: No such container: 588ec30a53cf
[error] api.go:78 HTTP Error: statusCode=404 No such container: 588ec30a53cf
[error] api.go:1023 Error: No such container: d290fb38e240
[error] api.go:78 HTTP Error: statusCode=404 No such container: d290fb38e240
[error] api.go:1023 Error: No such container: d290fb38e2406ab20316c77eeb07c2afbf04b1d083a4655494ceb22a9cba6700
[error] api.go:78 HTTP Error: statusCode=404 No such container: d290fb38e2406ab20316c77eeb07c2afbf04b1d083a4655494ceb22a9cba6700
[error] api.go:1023 Error: No such container: ff5e69349b4d
[error] api.go:78 HTTP Error: statusCode=404 No such container: ff5e69349b4d
[error] api.go:1023 Error: No such container: 6f785d278165
[error] api.go:78 HTTP Error: statusCode=404 No such container: 6f785d278165
[error] api.go:1023 Error: No such container: f93fbb878f6b
[error] api.go:78 HTTP Error: statusCode=404 No such container: f93fbb878f6b
[error] api.go:1023 Error: No such container: ec391abab5ea
[error] api.go:78 HTTP Error: statusCode=404 No such container: ec391abab5ea
[error] api.go:1023 Error: No such container: 63aa5fc69086
[error] api.go:78 HTTP Error: statusCode=404 No such container: 63aa5fc69086
[error] api.go:1023 Error: No such container: ff5e69349b4d
[error] api.go:78 HTTP Error: statusCode=404 No such container: ff5e69349b4d
[error] api.go:1023 Error: No such container: d290fb38e2406ab20316c77eeb07c2afbf04b1d083a4655494ceb22a9cba6700
[error] api.go:78 HTTP Error: statusCode=404 No such container: d290fb38e2406ab20316c77eeb07c2afbf04b1d083a4655494ceb22a9cba6700
[error] api.go:1023 Error: No such container: 588ec30a53cf
[error] api.go:78 HTTP Error: statusCode=404 No such container: 588ec30a53cf
[error] api.go:1023 Error: No such container: d290fb38e240
[error] api.go:78 HTTP Error: statusCode=404 No such container: d290fb38e240
@vieux

This comment has been minimized.

Show comment
Hide comment
@vieux

vieux Oct 29, 2013

Collaborator

@crosbymichael can you take another look ?

Collaborator

vieux commented Oct 29, 2013

@crosbymichael can you take another look ?

@tianon

This comment has been minimized.

Show comment
Hide comment
@tianon

tianon Oct 29, 2013

Member

Thanks to @vieux, I can verify that this is indeed working for me. :)

Member

tianon commented Oct 29, 2013

Thanks to @vieux, I can verify that this is indeed working for me. :)

@crosbymichael

This comment has been minimized.

Show comment
Hide comment
@crosbymichael

crosbymichael Oct 29, 2013

Contributor

LGTM

Contributor

crosbymichael commented Oct 29, 2013

LGTM

crosbymichael added a commit that referenced this pull request Oct 29, 2013

Merge pull request #2426 from dotcloud/enable_sigproxy_default
Enable sig-proxy by default in run and attach

@crosbymichael crosbymichael merged commit caa7cf1 into master Oct 29, 2013

@crosbymichael crosbymichael deleted the enable_sigproxy_default branch Oct 29, 2013

@hashar

This comment has been minimized.

Show comment
Hide comment
@hashar

hashar Nov 28, 2017

This causes --tty to always disable signal proxying. That is the topic of #9098. It is very annoying and often a source of confusion, eg when you do something like:

$ docker run -it longrunning/thing
<PRESS ^C>

And nothing happens :-] Merci Victor !

hashar commented on e0b59ab Nov 28, 2017

This causes --tty to always disable signal proxying. That is the topic of #9098. It is very annoying and often a source of confusion, eg when you do something like:

$ docker run -it longrunning/thing
<PRESS ^C>

And nothing happens :-] Merci Victor !

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment