Commit Graph

28 Commits

Author SHA1 Message Date
b1aa2c30f8 Address comments.
Docker-DCO-1.1-Signed-off-by: Vishnu Kannan <vishnuk@google.com> (github: vishh)
Upstream-commit: 46f29449777b9fb67a02e13fe0f12fc10c99ab4b
Component: engine
2014-11-08 00:14:08 +00:00
77c86e509b 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)
Upstream-commit: f96e04ffc7973e290653044cc86dbc1efb18276d
Component: engine
2014-11-08 00:14:08 +00:00
811492e0cb See #8379 - if the container doesn't start I added code to make sure that if no other processing sets the container.exitCode to a non-zero value when we make sure its done before we return. I also made sure that while trying to start the CMD/ENTRYPOINT, if it fails, then we set the container.exitCode to the exitStatus from the exec().
Closes #8379

Signed-off-by: Doug Davis <dug@us.ibm.com>
Upstream-commit: 69a5b827dcf01a6de5949a161606058017014cdc
Component: engine
2014-11-05 18:23:42 -08:00
bad39206ea Mass gofmt
Signed-off-by: Alexandr Morozov <lk4d4@docker.com>
Upstream-commit: ee7dd44c017458c8fe0be8e09569b1238366dca3
Component: engine
2014-10-24 15:11:48 -07:00
2d56e3cbc6 Use logrus everywhere for logging
Fixed #8761

Signed-off-by: Alexandr Morozov <lk4d4@docker.com>
Upstream-commit: 7c62cee51edc91634046b4faa6c6f1841cd53ec1
Component: engine
2014-10-24 15:03:06 -07:00
cc7745c80d Fix typo:betweem->between and PtySlace->PtySlave
Signed-off-by: Arika Chen <eaglesora@gmail.com>
Upstream-commit: bfc9d8bbea2f41247fa543034bbbf64704ae3aae
Component: engine
2014-09-30 07:22:09 -04:00
13e3017817 Use State as embedded to Container
Signed-off-by: Alexandr Morozov <lk4d4math@gmail.com>
Upstream-commit: e0339d4b88989a31b72be02582eee72433d2f0ec
Component: engine
2014-09-03 00:01:11 +04:00
559392405c Rename 'StdConfig' to 'StreamConfig'.
Docker-DCO-1.1-Signed-off-by: Vishnu Kannan <vishnuk@google.com> (github: vishh)
Upstream-commit: 3a7e07355a1ad67f71ee4255e06526186fd48f7a
Component: engine
2014-09-01 14:31:01 -07:00
a7e2cb4124 Refactoring execdriver.Command and Container structs to support 'docker exec' and other
similar features in the future.

Docker-DCO-1.1-Signed-off-by: Vishnu Kannan <vishnuk@google.com> (github: vishh)
Upstream-commit: 4aa5da278f49c889d43191f82ff42d3a95266d62
Component: engine
2014-09-01 14:30:16 -07:00
76ca127323 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>
Upstream-commit: 517ba44e3742c39c4c3fc249b8c40e9b7ddd845f
Component: engine
2014-08-29 12:56:04 +04:00
62eb5165d1 Fix race condition between cleanup and Start
There was problem when Start might be before cleanup

Fixes #6904

Signed-off-by: Alexandr Morozov <lk4d4math@gmail.com>
Upstream-commit: 12ff89a3901cd2debf13e7ccc3a1a780380e4dd9
Component: engine
2014-08-26 20:57:12 +04:00
0b9e4ed61e Cleanup: Make channels unbuffered
Signed-off-by: Alexandr Morozov <lk4d4math@gmail.com>
Upstream-commit: 0d4d7e4a2851c60f768f71a79a78c068fd9dffe8
Component: engine
2014-08-14 21:51:25 +04:00
1b8bad68b3 Fix race between container cleanup and inspect/ps
Signed-off-by: Alexandr Morozov <lk4d4math@gmail.com>
Upstream-commit: 93d6adf8a19855edf118d27d0239222f572d8292
Component: engine
2014-08-14 21:51:06 +04:00
f4db7d15dc Fix race condition in sending started signal from monitor
Signed-off-by: Alexandr Morozov <lk4d4math@gmail.com>
Upstream-commit: 1480168e9f6178e4015aa4dcc035a6963c59f431
Component: engine
2014-08-14 21:50:56 +04:00
9df494bb71 another commit to do like @crosbymichael
Signed-off-by: Victor Vieux <vieux@docker.com>
Upstream-commit: a0392324f194f4f92e3205f0c0ed8b71dc2fc93f
Component: engine
2014-08-14 01:36:26 +00:00
9b55fc0736 Deprecate --restart on the daemon
Signed-off-by: Michael Crosby <michael@docker.com>
Upstream-commit: 25c519e829640ebb23061b82c6ace88c5983b63d
Component: engine
2014-08-13 16:08:50 -07:00
db45de23ad Update based on comments from the code review
Signed-off-by: Michael Crosby <michael@docker.com>
Upstream-commit: 73ced636800c150640e2f0d307842b0f9259b611
Component: engine
2014-08-13 15:58:55 -07:00
02f3d4abed Rebased changes to return on first start's error
Signed-off-by: Michael Crosby <michael@docker.com>
Upstream-commit: 2ec1b697c1a7c0ecc534b9ebffd7ba40ea285ff7
Component: engine
2014-08-13 15:58:55 -07:00
10b2364f13 Reguardless of success reset time increment
Reset the time increment if the container's execution time is greater
than 10s or else as a container runs and is restarted the time will grow
overtime.

Signed-off-by: Michael Crosby <michael@docker.com>
Upstream-commit: ebf5d4657d14c7b57a5ca1c7b8689077b18b33dc
Component: engine
2014-08-13 15:58:54 -07:00
9726fa5fb8 Improve wait during restart
We need to do this so that when a user asks docker to stop the container
and it is currently in the restart loop we don't want to have to wait
for the duration of the restart time increment before ack. the stop.

Signed-off-by: Michael Crosby <michael@docker.com>
Upstream-commit: 972c89493148f930388097816663d453bf3e8c2c
Component: engine
2014-08-13 15:58:54 -07:00
5ac7ecfbf7 Honor the restarting state in Stop
Signed-off-by: Michael Crosby <michael@docker.com>
Upstream-commit: c4a00d549d0b895bb990491cbdf58aabe2891842
Component: engine
2014-08-13 15:58:54 -07:00
73d4ecfe93 Add Restarting state when docker is handling the restart of containers
Signed-off-by: Michael Crosby <michael@docker.com>
Upstream-commit: a2afb2b1e37e72cab0d68cfe8dd0ec830b7a54e5
Component: engine
2014-08-13 15:58:54 -07:00
6ce3708a40 Add additional comments for vague lines
Signed-off-by: Michael Crosby <michael@docker.com>
Upstream-commit: be22d7ac2db6396becd63ec2dd28b9731011c9b9
Component: engine
2014-08-13 15:58:54 -07:00
1f88a5f013 Move container start event into monitor
Signed-off-by: Michael Crosby <michael@docker.com>
Upstream-commit: 6ae05936e1f343a2ecc51b8f642bdc8b93325d81
Component: engine
2014-08-13 15:58:54 -07:00
4dadb32ece Fix rebase around log event
Signed-off-by: Michael Crosby <michael@docker.com>
Upstream-commit: b7550cd456e29874279499a546b07bb062a12096
Component: engine
2014-08-13 15:58:54 -07:00
91b1d9394b Only restart containers on daemon load with policy of always
Signed-off-by: Michael Crosby <michael@docker.com>
Upstream-commit: 41870a42bee9c394c61aba4bd81f782dbd38da12
Component: engine
2014-08-13 15:58:54 -07:00
ed9f19284d Add documentation and update restart rules.
Implement time backed backoff for restarting and fix failure count when
the maximum is 0

Signed-off-by: Michael Crosby <michael@docker.com>
Upstream-commit: 860c13b788944410a98a6ad5b5cfb74de0a8405b
Component: engine
2014-08-13 15:57:37 -07:00
b614c77a54 Refactor container monitor into type
Signed-off-by: Michael Crosby <michael@docker.com>
Upstream-commit: 2b0776c883c41cda0b86808fe86e4df6e1aa1cd5
Component: engine
2014-08-13 15:56:53 -07:00