-
Notifications
You must be signed in to change notification settings - Fork 553
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
Allow created containers to be killed #875
Conversation
runtime.md
Outdated
@@ -123,7 +123,7 @@ This operation MUST generate an error if `process` was not set. | |||
`kill <container-id> <signal>` | |||
|
|||
This operation MUST [generate an error](#errors) if it is not provided the container ID. | |||
Attempting to send a signal to a container that is not running MUST have no effect on the container and MUST [generate an error](#errors). | |||
Attempting to send a signal to a container that is not running or not created MUST have no effect on the container and MUST [generate an error](#errors). |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'd rather tie this more clearly to the already-well-defined state values. Something like:
Attempting to send a signal to a container that is neither [`created` nor `running`](#state) MUST have no effect…
That's pretty close to what you're suggesting, although it:
- Uses “neither”/“nor” instead of repeating “not”.
- Links to the “State” section for formal definitions of
created
andrunning
states. - Uses backticks to strengthen the “these are formally defined terms” semantics of
running
andcreated
. - Lists
created
beforerunning
, since any given container that ends up inrunning
will always have passed throughcreated
earlier in its lifecycle, and no container can return tocreated
after it has enteredrunning
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGMT with @wking's suggestion,
What's the use-case for killing a container that isn't running? What's the expected behavior? |
Getting ready to
The signal gets sent to the container process, same as in the |
While we're cleaning up the relationship between operations and container state, I think we can replace these two
And these two
|
Signed-off-by: Mrunal Patel <mrunalp@gmail.com>
Updated. |
@tianon Orchestrator could have a sequence where it is first creating a bunch of containers and then starting them. If there is a failure in the start sequence it could just kill the remaining created containers. |
Signed-off-by: Mrunal Patel mrunalp@gmail.com