Skip to content

feat: support for --sig-proxy in run - #3043

Merged
AkihiroSuda merged 1 commit into
containerd:mainfrom
CodeChanning:sig-proxy_run
Jun 24, 2024
Merged

AkihiroSuda merged 1 commit into
containerd:mainfrom
CodeChanning:sig-proxy_run

Conversation

@CodeChanning

@CodeChanning CodeChanning commented May 30, 2024 •

Copy link
Copy Markdown
Contributor

adds support for the --sig-proxy flag in nerdctl run and nerdctl attach

Address part of #3039

--sig-proxy expected behavior:

  • if true, CTRL+C will send a SIGINT to the container
  • if false, CTRL+C will send a SIGKILL to the container

context:

"To stop a container, use CTRL-c. This key sequence sends SIGKILL to the container. If --sig-proxy is true (the default),CTRL-c sends a SIGINT to the container. If the container was run with -i and -t, you can detach from a container and leave it running using the CTRL-p CTRL-q key sequence."

src: docker attach documentation

@apostasie

Copy link
Copy Markdown
Contributor

@CodeChanning this would be nice to have - thanks!
Are you willing to carry this through?

@CodeChanning

Copy link
Copy Markdown
Contributor Author

Contributor

Yes, I'm aiming to finish this change

@CodeChanning CodeChanning changed the title Support for --sig-proxy in run Support for --sig-proxy in run and attach Jun 3, 2024
@CodeChanning CodeChanning changed the title Support for --sig-proxy in run and attach feat: support for --sig-proxy in run and attach Jun 4, 2024
@CodeChanning
CodeChanning force-pushed the sig-proxy_run branch 3 times, most recently from 720827b to 90995f9 Compare June 12, 2024 22:39
@CodeChanning CodeChanning changed the title feat: support for --sig-proxy in run and attach feat: support for --sig-proxy in run Jun 12, 2024
@CodeChanning
CodeChanning marked this pull request as ready for review June 12, 2024 22:45
@CodeChanning
CodeChanning force-pushed the sig-proxy_run branch 2 times, most recently from 13d0882 to 8bee996 Compare June 12, 2024 23:45
@CodeChanning

Copy link
Copy Markdown
Contributor Author

Hi @apostasie, I believe my changes should be good for run --sig-proxy support. Both rootful and rootless tests work fine for me locally. Do you have insight as to why the rootless tests are timing out?

Comment thread cmd/nerdctl/container_run.go Resolved
@apostasie

Copy link
Copy Markdown
Contributor

Hi @apostasie, I believe my changes should be good for run --sig-proxy support. Both rootful and rootless tests work fine for me locally. Do you have insight as to why the rootless tests are timing out?

Nothing obvious top of the head - I'll look into it and see if I can help.

Comment thread cmd/nerdctl/container_run.go Resolved
Comment thread cmd/nerdctl/container_run_linux_test.go Resolved
Comment thread cmd/nerdctl/container_run.go Resolved
Comment thread pkg/api/types/container_types.go Resolved
@CodeChanning
CodeChanning force-pushed the sig-proxy_run branch 3 times, most recently from 13355c5 to 23dedaa Compare June 21, 2024 22:40
Comment thread docs/command-reference.md
`--attach`, `--blkio-weight-device`, `--cpu-rt-*`, `--device-*`,
`--disable-content-trust`, `--domainname`, `--expose`, `--health-*`, `--isolation`, `--no-healthcheck`,
`--link*`, `--publish-all`, `--sig-proxy`, `--storage-opt`,
`--link*`, `--publish-all`, `--storage-opt`,

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could you add the usage of sig-proxy?

Also, please squash the commits

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍🏾
Added it

@CodeChanning
CodeChanning force-pushed the sig-proxy_run branch 3 times, most recently from 00601c1 to a44deac Compare June 24, 2024 22:04
Signed-off-by: CodeChanning <chxgaddy@amazon.com>

@AkihiroSuda AkihiroSuda left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks

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.

5 participants