Skip to content

Commit

Permalink
refactor: refact the container lock, put a big lock for all container…
Browse files Browse the repository at this point in the history
… api

Signed-off-by: Michael Wan <zirenwan@gmail.com>
  • Loading branch information
HusterWan authored and fuweid committed Apr 3, 2019
1 parent ae4a64f commit a6c5274
Show file tree
Hide file tree
Showing 12 changed files with 120 additions and 199 deletions.
14 changes: 14 additions & 0 deletions apis/swagger.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3524,6 +3524,20 @@ definitions:
description: "Whether this container is dead."
type: "boolean"
x-nullable: false
Exited:
description: |
Whether this container is abnormal stopped. So that we can distinguish whether
a container stoppped by API or abnormal.
This flag can be used on the circumstances that when the host restart and try to pull up
the containers that are running before host down. If we have a container with `RestartPolicy`
is `always` but the `Status` is `Stopped`, should we start it or not?
So with the `Exited` flag being set, we can make sure that this container is exited by abnormal,
we should pull it up. But with status is `Stopped`, we should not pull it up because it is stopped
by API.
type: "boolean"
x-nullable: false
Pid:
x-nullable: false
description: "The process ID of this container"
Expand Down
13 changes: 13 additions & 0 deletions apis/types/container_state.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit a6c5274

Please sign in to comment.