From 9fa0f0317509ddbd9139c90499beb3e159cc9c20 Mon Sep 17 00:00:00 2001 From: "W. Trevor King" Date: Wed, 2 Dec 2015 16:02:10 -0800 Subject: [PATCH] Drop exec, pause, resume, and signal MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit All of these require state information to be shared between funC invocations (to map from a container ID to the cgroups/namespaces/etc.), and after today's meeting we may be backing away from that [1,2]. Even if we keep a requirement for sharing state between funC invocations, we don't want to specify these IPC-requiring commands until we have more clarity on that requirement in the spec. On systems like Solaris, the kernel maintains a registry of container IDs directly, so they don't need an external registry [3]. But without a consensus around the minimal amount of inter-process state sharing, we don't want to require container ID → state lookups in the command-line spec. Once we have more clarity on a minimal required mechanism (e.g. Julz's --state-file [4,5,6]), we can add them back in with an API that all runtimes can easily support (although runtimes are of course free to provide more convenient APIs as additional extensions). Pause, resume, and signal are still in the current lifecycle pull request [7], but I've requested they be removed until we have more clarity around the basic lifecycle [8]. [1]: http://ircbot.wl.linuxfoundation.org/meetings/opencontainers/2015/opencontainers.2015-12-02-18.01.html [2]: http://ircbot.wl.linuxfoundation.org/meetings/opencontainers/2015/opencontainers.2015-12-02-18.01.log.html#l-79 [3]: https://github.com/wking/oci-command-line-api/pull/3#issuecomment-162079383 [4]: https://github.com/wking/oci-command-line-api/pull/3#issuecomment-162009033 [5]: https://github.com/wking/oci-command-line-api/pull/3#issuecomment-162041009 [6]: https://github.com/wking/oci-command-line-api/pull/3#issuecomment-162082556 [7]: https://github.com/mrunalp/specs/commit/bd549a2c9569fd5d775323f7f39c835baf825d0a#diff-b84a8d65d8ed53f4794cd2db7e8ea731R48 [8]: https://github.com/opencontainers/specs/pull/231/files#r45532412 --- runtime.md | 78 ------------------------------------------------------ 1 file changed, 78 deletions(-) diff --git a/runtime.md b/runtime.md index c6b7f70..dca874c 100644 --- a/runtime.md +++ b/runtime.md @@ -63,83 +63,5 @@ $ echo $? 42 ``` -### exec - -Runs a secondary process in the given container. - -* *Options* - * *`--process `* Override `process.json` with an alternative path. The path may not support seeking (e.g. `/dev/fd/3`). -* *Arguments* - * *``* The container ID to join. -* *Standard streams:* The runtime must attach its standard streams directly to the application process without inspection. -* *Exit code:* The runtime must exit with the application process's exit code. - -If the main application (launched by `start`) dies, all other processes in its container will be killed [TODO: link to lifecycle docs explaining this]. - -Example: -```sh -# in a directory with a process.json that echos "goodbye" and exits 43 -$ funC exec hello-1 -goodbye -$ echo $? -43 -``` - -### pause - -Pause all processes in a container. - -* *Options* - * *`--wait`* Block until the process is completely paused. - Otherwise return immediately after initiating the pause, which may happen before the pause is complete. -* *Arguments* - * *``* The container ID to join. -* *Exit code:* 0 on success, non-zero on error. - -Example: -```sh -$ funC pause --wait hello-1 -$ echo $? -0 -``` - -### resume - -Unpause all processes in a container. - -* *Options* - * *`--wait`* Block until the process is completely unpaused. - Otherwise return immediately after initiating the unpause, which may happen before the unpause is complete. -* *Arguments* - * *``* The container ID to join. -* *Exit code:* 0 on success, non-zero on error. - -Example: -```sh -$ funC resume hello-1 -$ echo $? -0 -``` - -### signal - -Sends a signal to the container. - -* *Options* - * *`--signal `* The signal to send. - This must be one of the valid POSIX signals, although runtimes on non-POSIX systems must translate the POSIX name to their platorm's analogous signal. - Defaults to TERM. -* *Arguments* - * *``* The container ID to join. -* *Exit code:* 0 on success, non-zero on error. - A 0 exit status does not imply the process has exited (as it may have caught the signal). - -Example: -```sh -$ funC signal --signal KILL hello-1 -$ echo $? -0 -``` - [standard-streams]: https://github.com/opencontainers/specs/blob/v0.1.1/runtime-linux.md#file-descriptors [systemd-listen-fds]: http://www.freedesktop.org/software/systemd/man/sd_listen_fds.html