Commit Graph

10073 Commits

Author SHA1 Message Date
d5f518ec2f Merge pull request #7532 from ChristopherBiscardi/shiftWindow
Remove Old shiftWindow()
Upstream-commit: f945edb3e0ae42645f1f52026edbf0869044379d
Component: engine
2014-08-14 12:48:19 +10:00
1a2cf739e4 Merge pull request #7414 from crosbymichael/auto-restart
Auto restart containers based on restart policy
Upstream-commit: b95f6c183bca45e8f38d3c8abc5dcb2d0eee2ad6
Component: engine
2014-08-13 16:17:51 -07: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
623a65a209 Update docs based on feedback from review for --restart
Signed-off-by: Michael Crosby <michael@docker.com>
Upstream-commit: 617edd89f48a7082bf4ec1d28ec12eefd1057a2f
Component: engine
2014-08-13 15:57:37 -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
ba241d3034 Merge pull request #7569 from erikh/pkg_log
Cleanup: Extract log utils into pkg/log
Upstream-commit: 0d70706b4b6bf9d5a5daf46dd147ca71270d0ab7
Component: engine
2014-08-13 18:43:08 -04:00
171ec8cb7a Merge pull request #7572 from shykes/workaround-api-shutdown
Workaround to avoid 5 second delay on graceful daemon restart
Upstream-commit: 6b363b81dec924f4a281b624313475f4d5dc9dea
Component: engine
2014-08-13 15:41:33 -07:00
b8d5783511 move utils.Fataler to pkg/log.Fataler
Docker-DCO-1.1-Signed-off-by: Erik Hollensbe <github@hollensbe.org> (github: erikh)
Upstream-commit: ac63d925d2618e700d117c5d9e402ccc0c5cecc8
Component: engine
2014-08-13 15:32:41 -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
230d6c3581 Workaround to avoid 5 second delay on graceful daemon restart
Signed-off-by: Solomon Hykes <solomon@docker.com>
Upstream-commit: 6aecdb4f8e73031f0deeac88a88ffc3fad9d5377
Component: engine
2014-08-13 21:40:25 +00: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
985ab960df Merge pull request #7570 from erikh/remove_fixme
Remove FIXME file
Upstream-commit: 2837a36bd73081b314004a9afcf4b2beada4821f
Component: engine
2014-08-13 13:55:20 -07:00
903e5fe7e2 Merge pull request #7194 from vbatts/vbatts-registry_re-org
registry: cleanup and rename Registry -> Session
Upstream-commit: 49c43004a73e2e23e895c3340451342ffe496bba
Component: engine
2014-08-13 13:37:56 -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
de738eef04 Remove FIXME file
Docker-DCO-1.1-Signed-off-by: Erik Hollensbe <github@hollensbe.org> (github: erikh)
Upstream-commit: 7bfc78b03813fd35b0098b1e778180138976c40d
Component: engine
2014-08-13 12:49:12 -07:00
1c51cd6125 Fix inconsistency in IP address parsing errors
Signed-off-by: Solomon Hykes <solomon@docker.com>
Upstream-commit: a30fd7a962f8486df0d0dbd3334c7621d22c1aec
Component: engine
2014-08-13 19:25:51 +00: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
13ed6ae5e4 opts.IPVal returns an error on incorrect input
Signed-off-by: Solomon Hykes <solomon@docker.com>
Upstream-commit: ca11b77471bd3a99b4dbc44b716675ba8174306c
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
8bd8c43b79 Helpers to parse lists, IPs, hosts, dns searches from the command line
Signed-off-by: Solomon Hykes <solomon@docker.com>
Upstream-commit: 6200002669874f3314856527fecd0c004060913c
Component: engine
2014-08-13 19:25:47 +00:00
c80f165fa8 Merge pull request #7568 from crosbymichael/replace-7240
Exit after receiving SIGTERM
Upstream-commit: 33fa175abf3bbd9322693ecc761ab8c6884a5546
Component: engine
2014-08-13 12:23:34 -07:00
14291aae78 Exit after receiving SIGTERM
Signed-off-by: Michael Crosby <michael@docker.com>
Upstream-commit: cdf8a55670793a135a53549c5e1877c33a66be0c
Component: engine
2014-08-13 12:18:23 -07:00
a2a8fb8a10 opts.IpOpt: a helper to parse IP addressed from the command line
Signed-off-by: Solomon Hykes <solomon@docker.com>
Upstream-commit: 6d59a566759da5729d7eb89a8e1888fc612f03cf
Component: engine
2014-08-13 19:09: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
8aa76c02e6 Merge pull request #7553 from LK4D4/update_to_1.3.1
bump Go to 1.3.1
Upstream-commit: c071cd7c7ccd3a0da7d5a9331119cd2e84e4380a
Component: engine
2014-08-13 21:42:32 +03:00
1f8b0d9982 Add Self func to reexec pkg to return the current binary path
Signed-off-by: Michael Crosby <michael@docker.com>
Upstream-commit: 283ee108862da1db55a7cf944f20a245c096c388
Component: engine
2014-08-13 11:14:33 -07:00
09e4804b95 Merge pull request #7559 from LK4D4/fix_udp_proxy_deadlock
Fix deadlock on failed dial in UDP userland proxy
Upstream-commit: 1c5a4e09006b5b91f1bf5b3f020625a539fd165f
Component: engine
2014-08-13 11:11:09 -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
03178ee6e6 Merge pull request #7556 from shykes/cristian-integration-maintainer
Add Cristian to integration/MAINTAINERS
Upstream-commit: 3cc79e7818f0859ec1b84fef7e50a7c1d8209b96
Component: engine
2014-08-13 10:39:50 -07:00
6f9dfebc7f Merge pull request #7497 from shykes/cleanup-server
Remove deprecated server package
Upstream-commit: c9e359cf977fbbfaf32527c2c3f71a1910deb21a
Component: engine
2014-08-13 10:37:37 -07:00