Commit Graph

409 Commits

Author SHA1 Message Date
ef058f588f Cleanup: move image depth checks in image/
Signed-off-by: Solomon Hykes <solomon@docker.com>
Upstream-commit: 2a39635d30a5ecbf3f8020dcb272cd8ae939fe06
Component: engine
2014-08-15 00:43:12 +00: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
c26305d808 Fix race on state serialization
Signed-off-by: Alexandr Morozov <lk4d4math@gmail.com>
Upstream-commit: f1975cbc7c5b551e5a206c15f32aef3d51904408
Component: engine
2014-08-14 21:51:15 +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
0bb709c134 remove double newline
Signed-off-by: Victor Vieux <vieux@docker.com>
Upstream-commit: fcf37be2b1efa11da1958658da0e04755a225c89
Component: engine
2014-08-14 01:08:27 +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
1c96d24788 Restart conatiner with on-failure policy if exit code != 0
Signed-off-by: Michael Crosby <michael@docker.com>
Upstream-commit: feda8fbb21489f64aa3b7340c94473a08502bd6b
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
a9837fc603 Add typed RestartPolicy
Signed-off-by: Michael Crosby <michael@docker.com>
Upstream-commit: d9753ba20d5e602b0980687353d76c874b563042
Component: engine
2014-08-13 15:56:34 -07:00
b662f7de79 Cleanup restart logic in monitor
Signed-off-by: Michael Crosby <michael@docker.com>
Upstream-commit: e0a076d486ea49529dc3aeef2179eb0c406d0773
Component: engine
2014-08-13 15:56:34 -07:00
49eb58207e Restart containers based on restart policy
Signed-off-by: Michael Crosby <michael@docker.com>
Upstream-commit: bd8c9dc2395032a893e959e48f9a8536858d67e0
Component: engine
2014-08-13 15:56:34 -07:00
4737f7cea5 Extract log utils into pkg/log
Docker-DCO-1.1-Signed-off-by: Josiah Kiehl <josiah@capoferro.net> (github: capoferro)
Upstream-commit: a02f67be5b17da63d475e6f35956c1e72c3b2e7b
Component: engine
2014-08-13 15:18:15 -07:00
1a6b687cce Merge pull request #7506 from shykes/cleanup-daemonconfig
Cleanup: refactor parsing and handling of Daemon config
Upstream-commit: 13eb477b62b51d906fa88f508d2c560a2b4946aa
Component: engine
2014-08-13 15:07:13 -07:00
fdd5ed90fc Merge pull request #7548 from crosbymichael/proxy-exec
Move userland proxies out of daemon process
Upstream-commit: fd1b563b4faede0a1d3fc91d4243442ab2ebe1a6
Component: engine
2014-08-13 14:03:40 -07:00
ccc89a6404 Merge pull request #7484 from cpuguy83/cleanup_volume_init
Cleanup: initializeVolume
Upstream-commit: 0c6b137f0602b619b3947e4c9737ccb363c91d96
Component: engine
2014-08-13 16:18:02 -04:00
5f2e120f77 Cleanup: initializeVolume
- Use a common struct for Volumes
- Split out some functionality in intializeVolume into separate functions
- Removes some duplicate code
- In general much easier to grok the code now

Docker-DCO-1.1-Signed-off-by: Brian Goff <cpuguy83@gmail.com> (github: cpuguy83)
Upstream-commit: e350df5b2c95be74c5808c28cac5dee763b11d8b
Component: engine
2014-08-13 15:55:59 -04:00
fc0d245526 Move remote API config out of daemon/
Signed-off-by: Solomon Hykes <solomon@docker.com>
Upstream-commit: 1d10c55aec891df609d36c90ee6c30adb24c16c4
Component: engine
2014-08-13 19:25:51 +00:00
506b7bed3d Check for conflicting daemon config options in NewDaemon
Signed-off-by: Solomon Hykes <solomon@docker.com>
Upstream-commit: 1eba59eb249b14a0499a52495be2c27b5afc4749
Component: engine
2014-08-13 19:25:51 +00:00
9a4f8cadf4 Parse daemon configuration in daemon.Config.InstallFlags instead of main
Signed-off-by: Solomon Hykes <solomon@docker.com>
Upstream-commit: 353b7c8ec77b30fa83dac5ec0778193f6de8b437
Component: engine
2014-08-13 19:25:51 +00:00
ec374f9227 Move daemonconfig into daemon
Signed-off-by: Solomon Hykes <solomon@docker.com>
Upstream-commit: a4befff533cf786df7a4da29798984ebb2268d8c
Component: engine
2014-08-13 19:09:51 +00:00
b3e9a7cd3b Move userland proxies out of daemon's process
This PR moves the userland proxies for TCP and UDP traffic out of the
main docker daemon's process ( from goroutines per proxy ) to be a
separate reexec of the docker binary.  This reduces the cpu and memory
needed by the daemon and if the proxy processes crash for some reason
the daemon is unaffected.  This also displays in the standard process
tree so that a user can clearly see if there is a userland proxy that is
bound to a certain ip and port.

```bash
CONTAINER ID        IMAGE                       COMMAND             CREATED             STATUS              PORTS                                          NAMES
5d349506feb6        busybox:buildroot-2014.02   "sh"                13 minutes ago      Up 1 seconds        0.0.0.0:49153->81/tcp, 0.0.0.0:49154->90/tcp   hungry_pike
root@1cbfdcedc5a7:/go/src/github.com/docker/docker# ps aux
USER       PID %CPU %MEM    VSZ   RSS TTY      STAT START   TIME COMMAND
root         1  0.0  0.1  18168  3100 ?        Ss   21:09   0:00 bash
root      8328  0.7  0.6 329072 13420 ?        Sl   22:03   0:00 docker -d -s vfs
root      8373  1.0  0.5 196500 10548 ?        Sl   22:03   0:00 userland-proxy -proto tcp -host-ip 0.0.0.0 -host-port 49153 -container-ip 10.0.0.2 -container-port 81
root      8382  1.0  0.5 270232 10576 ?        Sl   22:03   0:00 userland-proxy -proto tcp -host-ip 0.0.0.0 -host-port 49154 -container-ip 10.0.0.2 -container-port 90
root      8385  1.2  0.0   3168   184 pts/0    Ss+  22:03   0:00 sh
root      8408  0.0  0.1  15568  2112 ?        R+   22:03   0:00 ps aux
```

This also helps us to cleanly cleanup the proxy processes by stopping
these commands instead of trying to terminate a goroutine.

Signed-off-by: Michael Crosby <michael@docker.com>
Upstream-commit: b4e2f5ed962f8ef81dbc2cbb1ff2a06bb64f8211
Component: engine
2014-08-13 11:54:47 -07:00
779c425729 Merge pull request #6162 from vbatts/vbatts-ps_filter
docker ps: introducing filters
Upstream-commit: c9c271858a652583ba548cb2ea75df68b51a9dd3
Component: engine
2014-08-13 11:44:48 -07:00
92c1c69d9f Merge pull request #7555 from LK4D4/fix_vet_warnings
Fix go vet warnings
Upstream-commit: ad7279e48053adfde3ba20a5c67e812a7ec677f6
Component: engine
2014-08-13 10:40:38 -07:00
acbbac3aa0 docker ps: introducing filters
* starting with filtering for exit codes. `docker ps -a --filter 'exited=1'`
* API doc for filter parameter
* formatting filters for help usage
* tweaks for review

This requires https://github.com/dotcloud/docker/pull/4430

Docker-DCO-1.1-Signed-off-by: Vincent Batts <vbatts@redhat.com> (github: vbatts)
Upstream-commit: 84146719d8b8322e302e7a0250fe8a3ee1a4edcd
Component: engine
2014-08-13 09:12:33 -04:00
00b87e1af9 Fix go vet warnings
Signed-off-by: Alexandr Morozov <lk4d4math@gmail.com>
Upstream-commit: 391c35c82252633eb415fdade08103a8a0818fde
Component: engine
2014-08-13 11:37:30 +04:00
d27f6d0c6d Remove deprecated server/ package
Victory!

Signed-off-by: Solomon Hykes <solomon@docker.com>
Upstream-commit: 63503cafe4addb7d275244fbcce0e10d67225cc9
Component: engine
2014-08-13 06:56:45 +00:00
3ab02734f3 Move "build" to daemon/build.go
Signed-off-by: Solomon Hykes <solomon@docker.com>
Upstream-commit: 491deae9b8866b5b0774bbc92ee82f7cd7b565eb
Component: engine
2014-08-13 03:12:33 +00:00
01c8dcaf20 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>
Upstream-commit: b06311a72e7979653f09ba8175e10733e7116985
Component: engine
2014-08-13 00:03:56 +00:00
a11716ca83 fix #7374 leftover
Signed-off-by: Victor Vieux <vieux@docker.com>
Upstream-commit: bcfd6a653b5038679246b023d83476be073d4c91
Component: engine
2014-08-12 23:37:33 +00:00
2fbe59b1d9 Use argv0 as reexec implementation for dockerinit
This changes the way the exec drivers work by not specifing a -driver
flag on reexec.  For each of the exec  drivers they register their own
functions that will be matched aginst the argv 0 on exec and called if
they match.

This also allows any functionality to be added to docker so that the
binary can be reexec'd and any type of function can be called.  I moved
the flag parsing on docker exec to the specific initializers so that the
implementations do not bleed into one another.  This also allows for
more flexability within reexec initializers to specify their own flags
and options.

Signed-off-by: Michael Crosby <michael@docker.com>
Upstream-commit: 73210671764fc3de133a627205582e069e1ff43d
Component: engine
2014-08-11 11:47:21 -07:00
349e2e4036 Merge pull request #7502 from LK4D4/catch_error_console
Catch error on console creation
Upstream-commit: e033425f0bcf58f1409e7a10a408c778f1c754e4
Component: engine
2014-08-11 12:13:53 -04:00
10183d52c2 Catch error on console creation
Signed-off-by: Alexandr Morozov <lk4d4math@gmail.com>
Upstream-commit: 93f6cf035156d3b17cbf61f1a61926c068bd8e92
Component: engine
2014-08-09 22:10:44 +04:00
6fa220da5d Fix error message on logging events
Signed-off-by: Alexandr Morozov <lk4d4math@gmail.com>
Upstream-commit: 7afc49b40bd3a2c86a807a5ab4c722b12932d856
Component: engine
2014-08-09 18:45:38 +04:00
9a5247f7ee Move "info" to daemon/info.go
Signed-off-by: Solomon Hykes <solomon@docker.com>
Upstream-commit: 94715e8e643f0bc9aa57841b346f5196f75f0dc0
Component: engine
2014-08-08 03:01:55 +00:00
722d8e53b5 Merge pull request #7374 from cpuguy83/revert_rm_f_deprecation
Revert --stop/--kill and use SIGKILL instead
Upstream-commit: 414ccee23a25df258f9496e721dbfb6f1773ea9a
Component: engine
2014-08-07 16:47:25 -07:00
c29fd30ad7 Merge pull request #7453 from shykes/new-subsystem-maintainers
Add maintainers to daemon/ and graph/
Upstream-commit: 5d9cfde0df1453ccc66c98cabe42dd640fdb79c2
Component: engine
2014-08-07 16:43:41 -07:00
a79d7ec92b Revert rm -f deprecation use SIGKILL instead
`rm -f` was originally deprecated in favor of `rm --stop/--kill` since `rm
-f` was sending SIGTERM and potentially very slow.
Instead this will bring back `rm -f` but use SIGKILL isntead

Docker-DCO-1.1-Signed-off-by: Brian Goff <cpuguy83@gmail.com> (github: cpuguy83)
Upstream-commit: 95f86da641dfec9b3db88e0f0a8457685361a871
Component: engine
2014-08-07 18:20:43 -04:00