1
0
Fork 0
mirror of https://github.com/moby/moby.git synced 2022-11-09 12:21:53 -05:00
Commit graph

27 commits

Author SHA1 Message Date
John Howard
eff253dfaf Move setRunningLocking to test code
Signed-off-by: John Howard <jhoward@microsoft.com>
2015-09-28 13:48:12 -07:00
Doug Davis
a283a30fb0 Move api/errors/ to errors/
Per @calavera's suggestion: https://github.com/docker/docker/pull/16355#issuecomment-141139220

Signed-off-by: Doug Davis <dug@us.ibm.com>
2015-09-17 11:54:14 -07:00
Doug Davis
f7d4b4fe2b Convert some "daemon" static error strings to the new errocode package format
Signed-off-by: Doug Davis <dug@us.ibm.com>
2015-09-16 16:16:42 -07:00
Morgan Bauer
abd72d4008
golint fixes for daemon/ package
- some method names were changed to have a 'Locking' suffix, as the
 downcased versions already existed, and the existing functions simply
 had locks around the already downcased version.
 - deleting unused functions
 - package comment
 - magic numbers replaced by golang constants
 - comments all over

Signed-off-by: Morgan Bauer <mbauer@us.ibm.com>
2015-08-27 22:07:42 -07:00
Ma Shimiao
a6ed990593 daemon/state: separate part of SetRestarting to setRestarting
Signed-off-by: Ma Shimiao <mashimiao.fnst@cn.fujitsu.com>
2015-08-20 11:14:28 +08:00
John Howard
7bf26d44b0 Validate status= filter to docker ps
Signed-off-by: John Howard <jhoward@microsoft.com>
2015-07-02 16:12:42 -07:00
Doug Davis
dc697b1c9f Add a "Created" state for new containers that haven't been run yet
Closes #13353

Signed-off-by: Doug Davis <dug@us.ibm.com>
2015-05-30 07:48:46 -07:00
Yan Feng
7e01ecc119 Fix a typo in docker/daemon/state.go
Signed-off-by: Yan Feng <yanfeng2@huawei.com>
2015-04-16 10:56:15 -04:00
Vivek Goyal
40945fc186 container: Do not remove contianer if any of the resource failed cleanup
Do not remove container if any of the resource could not be cleaned up. We
don't want to leak resources.

Two new states have been created. RemovalInProgress and Dead. Once container
is Dead, it can not be started/restarted. Dead container signifies the
container where we tried to remove it but removal failed. User now needs to
figure out what went wrong, corrent the situation and try cleanup again.

RemovalInProgress signifies that container is already being removed. Only
one removal can be in progress.

Also, do not allow start of a container if it is already dead or removal is
in progress.

Also extend existing force option (-f) to docker rm to not return an error
and remove container from user view even if resource cleanup failed.
This will allow a user to get back to old behavior where resources
might leak but atleast user will be able to make progress.

Signed-off-by: Vivek Goyal <vgoyal@redhat.com>
2015-03-31 09:51:19 -04:00
Vishnu Kannan
46f2944977 Address comments.
Docker-DCO-1.1-Signed-off-by: Vishnu Kannan <vishnuk@google.com> (github: vishh)
2014-11-08 00:14:08 +00:00
Vishnu Kannan
f96e04ffc7 This patch adds ability in docker to detect out of memory conditions in containers.
Since the containers can handle the out of memory kernel kills gracefully, docker
will only provide out of memory information as an additional metadata as part of
container status.
Docker-DCO-1.1-Signed-off-by: Vishnu Kannan <vishnuk@google.com> (github: vishh)
2014-11-08 00:14:08 +00:00
Daniel, Dao Quang Minh
fb6ee865a9 save start error into State.Error
when a container failed to start, saves the error message into State.Error so
that it can be retrieved when calling `docker inspect` instead of having to
look at the log

Docker-DCO-1.1-Signed-off-by: Daniel, Dao Quang Minh <dqminh89@gmail.com> (github: dqminh)
2014-10-22 22:42:37 -04:00
Jessica Frazelle
ea09f03682 Filter containers by status.
A continuation of #7616.
Adds `docker ps --filter=status=(restarting|running|paused|stopped)` option.

Docker-DCO-1.1-Signed-off-by: Jessica Frazelle <jess@docker.com> (github: jfrazelle)
2014-09-29 20:11:19 -07:00
Hu Tao
fcc7ec8073 typo fix: immediatly -> immediately
Signed-off-by: Hu Tao <hutao@cn.fujitsu.com>
2014-09-09 01:16:19 -04:00
Alexandr Morozov
517ba44e37
Merge Container and State mutexes
Resolved all deadlocks and fixed race between kill and
monitor.resetContainer
Fixes #7600

Signed-off-by: Alexandr Morozov <lk4d4math@gmail.com>
2014-08-29 12:56:04 +04:00
Alexandr Morozov
f1975cbc7c
Fix race on state serialization
Signed-off-by: Alexandr Morozov <lk4d4math@gmail.com>
2014-08-14 21:51:15 +04:00
Michael Crosby
73ced63680 Update based on comments from the code review
Signed-off-by: Michael Crosby <michael@docker.com>
2014-08-13 15:58:55 -07:00
Michael Crosby
c4a00d549d Honor the restarting state in Stop
Signed-off-by: Michael Crosby <michael@docker.com>
2014-08-13 15:58:54 -07:00
Michael Crosby
a2afb2b1e3 Add Restarting state when docker is handling the restart of containers
Signed-off-by: Michael Crosby <michael@docker.com>
2014-08-13 15:58:54 -07:00
Victor Vieux
b06311a72e fix goroutines leak and exit code
Docker-DCO-1.1-Signed-off-by: Victor Vieux <vieux@docker.com> (github: vieux)

Signed-off-by: Victor Vieux <vieux@docker.com>
2014-08-13 00:03:56 +00:00
Victor Vieux
b3ee9ac74e update go import path and libcontainer
Docker-DCO-1.1-Signed-off-by: Victor Vieux <vieux@docker.com> (github: vieux)
2014-07-24 22:19:50 +00:00
Alexandr Morozov
57d86a5619 Use State waiting functions
Docker-DCO-1.1-Signed-off-by: Alexandr Morozov <lk4d4math@gmail.com> (github: LK4D4)
2014-06-27 15:07:40 +04:00
Alexandr Morozov
47065b9045 State refactoring and add waiting functions
Docker-DCO-1.1-Signed-off-by: Alexandr Morozov <lk4d4math@gmail.com> (github: LK4D4)
2014-06-27 15:05:48 +04:00
Ian Main
b054569cde Add ability to pause/unpause containers via cgroups freeze
This patch adds pause/unpause to the command line, api, and drivers
for use on containers.  This is implemented using the cgroups/freeze
utility in libcontainer and lxc freeze/unfreeze.

Co-Authored-By: Eric Windisch <ewindisch@docker.com>
Co-Authored-By: Chris Alfonso <calfonso@redhat.com>
Docker-DCO-1.1-Signed-off-by: Ian Main <imain@redhat.com> (github: imain)
2014-06-04 13:33:44 -06:00
Michael Crosby
d33b4655c4 Move duration and size to units pkg
Docker-DCO-1.1-Signed-off-by: Michael Crosby <michael@crosbymichael.com> (github: crosbymichael)
2014-05-12 17:05:07 -07:00
Alexander Larsson
cf997aa905 container: Remove Ghost state
container.Register() checks both IsRunning() and IsGhost(), but at
this point IsGhost() is always true if IsRunning() is true. For a
newly created container both are false, and for a restored-from-disk
container Daemon.load() sets Ghost to true if IsRunning is true. So we
just drop the IsGhost check.

This was the last call to IsGhost, so we remove It and all other
traces of the ghost state.

Docker-DCO-1.1-Signed-off-by: Alexander Larsson <alexl@redhat.com> (github: alexlarsson)
2014-04-22 09:49:53 +02:00
Alexander Larsson
359b7df5d2 Rename runtime/* to daemon/*
Docker-DCO-1.1-Signed-off-by: Alexander Larsson <alexl@redhat.com> (github: alexlarsson)
2014-04-17 14:43:01 -07:00
Renamed from runtime/state.go (Browse further)