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

runc-rc1, new workflow and terminal=true containers #910

Closed
papey opened this issue Jun 13, 2016 · 6 comments
Closed

runc-rc1, new workflow and terminal=true containers #910

papey opened this issue Jun 13, 2016 · 6 comments
Milestone

Comments

@papey
Copy link

papey commented Jun 13, 2016

Regarding the documentation, runc-rc1 (https://github.com/opencontainers/runc/releases/tag/v1.0.0-rc1) provide a new workflow based on 4 steps :

  • create
  • start
  • kill
  • delete

Readme specify that containers created with this new workflow have to be in "background mode" (terminal=false).

in the future, hooks will be removed from both in OCI and runC (see opencontainers/runtime-spec#483 and opencontainers/runtime-spec#483 for more info).

So how runC will handle the tty problem for terminal=true containers ?

I see three options here :

  • Update the tty.go code to fit the new workflow
  • Delegate tty management to users
  • Use runc run for terminal=true containers

What is the "official" position of the runC dev team about this subject ?

Thanks for reading/answers

@athoune
Copy link
Contributor

athoune commented Jun 13, 2016

Maybe something like :

  • runc create creates its own pty, don't detach and copy STDIN/STDOUT with the pty. Nothing happens.
  • configure network stuff with nsenter
  • runc start, a simple SIGCONT signal start the container.

It's ugly, but it handles the prepare/configure/step without hooks.

@crosbymichael crosbymichael added this to the 1.0.0 milestone Jun 13, 2016
@cyphar
Copy link
Member

cyphar commented Jun 13, 2016

This is probably related to the amiguity wrt terminal: true (opencontainers/runtime-spec#494), as well as lots of the issues with --console (#814).

You can use --console with runc create to specify a slave terminal (/dev/pts/X) that runC should use. You can see an example program using this facility here: https://gist.github.com/crosbymichael/aaca1f3d82bc90995045eb6b9f136d53

@papey
Copy link
Author

papey commented Jun 14, 2016

@athoune Regarding changes made by #886, runC will no longer use signals to start the container process.

@cyphar yes but tty is so close to the runtime (tty life time == container process life time) that it makes sens to me that runc handle this task.

@cyphar
Copy link
Member

cyphar commented Jun 14, 2016

To be clear: I think we should fix it. I was just pointing you to places where you can find some more information, as well as a workaround. I've been trying to figure out how to properly fix --console's interaction with user namespaces for a few weeks now.

/cc @crosbymichael

@cyphar
Copy link
Member

cyphar commented Sep 11, 2016

@papey I've implemented a bunch of terminal changes in #1018. Take a look if you're interested (that PR will close this one once merged).

@cyphar
Copy link
Member

cyphar commented Dec 7, 2016

#1018 has been merged.

@cyphar cyphar closed this as completed Dec 7, 2016
stefanberger pushed a commit to stefanberger/runc that referenced this issue Sep 8, 2017
README: Make meetings monthly (were weekly)
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

No branches or pull requests

4 participants