Commit Graph

51 Commits

Author SHA1 Message Date
4b4f9725e6 Update libtrust version
Signed-off-by: Victor Vieux <vieux@docker.com>
Upstream-commit: 6e92dfdfd843aec909572a405337efb25beb6f58
Component: engine
2014-11-20 17:39:54 +00:00
deefafa9d6 Remove unused sysinfo parameter to runconfig.Parse
Removing dead code.

Signed-off-by: John Gossman <johngos@microsoft.com>
Upstream-commit: e45b0f92711ff190cff4b61b2ea80cdd53203a16
Component: engine
2014-11-14 18:20:54 -08:00
92c39891ed Removed fixme from utils_test.go
Signed-off-by: Blake Geno <blakegeno@gmail.com>
Upstream-commit: cbb88741e40315c5e92f2be92faedc178cf32d1c
Component: engine
2014-11-05 08:36:08 -05: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
8b12ac14d7 API: Provide the HostConfig during "run".
Currently, the HostConfig is only passed from the CLI to Docker only
when issuing a docker create, but not when doing a docker run.

In the near future, in order to allocate ports at creation time rather
than start time, we will need to have the HostConfig readily available
at container creation.

This PR makes the client always pass the HostConfig when creating a
container (regardless of whether it's for a run or create).

Signed-off-by: Andrea Luzzardi <aluzzardi@gmail.com>
Upstream-commit: 1df87b95066198c30312147393c18e0be0564fd0
Component: engine
2014-09-25 15:24:38 -07:00
3a9c8d29c9 This reduces the amount of logging in the integration tests
There were a new areas in the brige driver that did not need to have log
output.  Those were removed.  Also set the engine's logging to false
when running the integration tests.

Signed-off-by: Michael Crosby <crosbymichael@gmail.com>
Upstream-commit: 8a9e827216eb5db4fcbe67c3c638f9e85f4de9bf
Component: engine
2014-09-19 17:30:37 -07:00
18373aa635 Removed runconfig.ParseSubcommand
Removed runconfig.ParseSubcommand, changed it to runconfig.Parse and editted related tests and modules

Signed-off-by: Oh Jinkyun <tintypemolly@gmail.com>
Upstream-commit: 9aa71549d61875fcf0713a9da11b034e70e1c3b0
Component: engine
2014-09-17 14:38:22 -07: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
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
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
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
6ae4c9014c update go import path and libcontainer
Docker-DCO-1.1-Signed-off-by: Victor Vieux <vieux@docker.com> (github: vieux)
Upstream-commit: b3ee9ac74e171e00f14027e39278013629e681b8
Component: engine
2014-07-24 22:19:50 +00:00
53991068e0 Use State waiting functions
Docker-DCO-1.1-Signed-off-by: Alexandr Morozov <lk4d4math@gmail.com> (github: LK4D4)
Upstream-commit: 57d86a5619adae5e08e0e28fba99f6a7c2f5ee54
Component: engine
2014-06-27 15:07:40 +04:00
cc0e75c911 remove addString and replace Tail
Docker-DCO-1.1-Signed-off-by: Victor Vieux <vieux@docker.com> (github: vieux)
Upstream-commit: e304e3a6624e740159e99e83d6d13f0a3cdfeb49
Component: engine
2014-05-09 18:09:59 +00:00
d8eb119f29 Remove error from engine.New()
Without creating a root there is no way for the engine to return an
error from the new function.
Docker-DCO-1.1-Signed-off-by: Michael Crosby <michael@crosbymichael.com> (github: crosbymichael)
Upstream-commit: 7100ace42bda2660d1eaecb2ec096ba6753688ea
Component: engine
2014-04-23 11:54:35 -07:00
e886c73325 Update tests with engine root removal
Docker-DCO-1.1-Signed-off-by: Michael Crosby <michael@crosbymichael.com> (github: crosbymichael)
Upstream-commit: 87e8d7754e218d93b480b94537d07793f6680515
Component: engine
2014-04-22 19:24:47 -07:00
5c5b3c1ca6 Remove the concept of a root dir out of engine
This makes the engine more general purpose so that we can
use it and the job routing functionality for reexec'ing our binary
Docker-DCO-1.1-Signed-off-by: Michael Crosby <michael@crosbymichael.com> (github: crosbymichael)

Conflicts:
	integration/runtime_test.go
Upstream-commit: 672edfe807c597a1c245bce996a150dfdf273a3c
Component: engine
2014-04-22 19:04:03 -07:00
f7be50364d Rename runtime/* to daemon/*
Docker-DCO-1.1-Signed-off-by: Alexander Larsson <alexl@redhat.com> (github: alexlarsson)
Upstream-commit: 359b7df5d2af5733b8a1ea6746d062053053b23e
Component: engine
2014-04-17 14:43:01 -07:00
e71ba07505 Update integration tests for server pkg
Docker-DCO-1.1-Signed-off-by: Michael Crosby <michael@crosbymichael.com> (github: crosbymichael)
Upstream-commit: 8cf0b80a7843633018b66a35d9a55f30814a56b6
Component: engine
2014-03-14 09:46:56 -07:00
7a46914030 Don't use separate bind mount for container
Since we're not not mounting anything but the base filesystem outside
the container we no longer need the separate bind mount at
/var/lib/docker/container/$id/root in order to see the base filesystem
without extra mounts. So, we drop this and mount (again) the container
root directly at the real basefs mountpoint.

Docker-DCO-1.1-Signed-off-by: Alexander Larsson <alexl@redhat.com> (github: alexlarsson)
Upstream-commit: bf1b27dfcc6c4e049706d7d104e1abc5c330815d
Component: engine
2014-03-13 20:08:29 +01:00
060a86aead Move runtime and container into sub pkg
Docker-DCO-1.1-Signed-off-by: Michael Crosby <michael@crosbymichael.com> (github: crosbymichael)
Upstream-commit: 36c3614fdde079fad178390f651945fba884668a
Component: engine
2014-03-09 23:03:40 -07:00
dc4d93c655 Merge pull request #4327 from crosbymichael/add-libcontainer
Add native execution driver to docker and make it the default
Upstream-commit: 69c69059fc3933531e19c05a9d2e831fb713881c
Component: engine
2014-03-03 16:34:20 -08:00
e3db7f47ed Use a more defensive vendored archive/tar import path to make it clear this isn't upstream's released archive/tar
Docker-DCO-1.1-Signed-off-by: Andrew Page <admwiggin@gmail.com> (github: tianon)
Upstream-commit: 2ca4e0ea60851ff8e9c0a05dc13fa23436c529b6
Component: engine
2014-02-27 09:43:44 -07:00
9649d5107a Remove container env var from libcontainer
Update tests to use native driver
Docker-DCO-1.1-Signed-off-by: Michael Crosby <michael@crosbymichael.com> (github: crosbymichael)
Upstream-commit: 431d510cae85bc1265c861028dd9751ae95088b2
Component: engine
2014-02-24 21:51:00 -08:00
95f410bd66 Cleanup integration tests
Refactor integration tests to remove special cases in the creation of
test engines. All test engines are now created through newTestEngine.

Docker-DCO-1.1-Signed-off-by: Solomon Hykes <solomon@docker.com> (github: shykes)
Upstream-commit: 92c3927b5de73f81c490900b2718d218ec097bd3
Component: engine
2014-02-24 19:24:30 +00:00
fc1f23f527 Add vendored archive/tar that includes xattrs patch
Docker-DCO-1.1-Signed-off-by: Andrew Page <admwiggin@gmail.com> (github: tianon)
Upstream-commit: b762d3a7391dd526826a0a1f1c983ea5e54852f5
Component: engine
2014-02-17 08:20:21 -07:00
e12f62e6df Properly close archives
All archive that are created from somewhere generally have to be closed, because
at some point there is a file or a pipe or something that backs them. So, we
make archive.Archive a ReadCloser. However, code consuming archives does not
typically close them so we add an archive.ArchiveReader and use that when we're
only reading.

We then change all the Tar/Archive places to create ReadClosers, and to properly
close them everywhere.

As an added bonus we can use ReadCloserWrapper rather than EofReader in several places,
which is good as EofReader doesn't always work right. For instance, many compression
schemes like gzip knows it is EOF before having read the EOF from the stream, so the
EofCloser never sees an EOF.

Docker-DCO-1.1-Signed-off-by: Alexander Larsson <alexl@redhat.com> (github: alexlarsson)
Upstream-commit: f198ee525ad6862dce3940e08c72e0a092380a7b
Component: engine
2014-02-14 13:46:17 +01:00
e378922981 Move the canonical run configuration objects to a sub-package
* Config is now runconfig.Config
    * HostConfig is now runconfig.HostConfig
    * MergeConfig is now runconfig.Merge
    * CompareConfig is now runconfig.Compare
    * ParseRun is now runconfig.Parse
    * ContainerConfigFromJob is now runconfig.ContainerConfigFromJob
    * ContainerHostConfigFromJob is now runconfig.ContainerHostConfigFromJob

This facilitates refactoring commands.go and shrinks the core.

Docker-DCO-1.1-Signed-off-by: Solomon Hykes <solomon@docker.com> (github: shykes)
Upstream-commit: 6393c38339e11b4a099a460ecf46bb5cafc4283b
Component: engine
2014-02-11 20:18:46 -08:00
0da08f6176 docker/config: update -mtu flag default
Docker-DCO-1.1-Signed-off-by: Johan Euphrosine <proppy@google.com> (github: google)
Upstream-commit: 92e61f89aad35c3103e0db1c6dacecc0c588bd2e
Component: engine
2014-02-03 15:36:39 -08:00
47dc263009 Merge pull request #3872 from crosbymichael/network-driver
Remove networking out of core and into a driver
Upstream-commit: 819c2e3ecaaa1f82401fe76bae1715183426c3cf
Component: engine
2014-01-31 17:22:37 -08:00
4a2ebcd7e5 Merge pull request #3827 from vieux/mova_api_package
Move api into sub package
Upstream-commit: 6a1ee89d2dcd5f2ab99e203862eed4dd8675b070
Component: engine
2014-01-31 15:39:33 -08:00
140db53b4e Move serveapi to api/api.go
Remove api import from server.go
Rename initapi to init server

Docker-DCO-1.1-Signed-off-by: Victor Vieux <victor.vieux@docker.com> (github: vieux)
Upstream-commit: 9eea7f28f0c64d43ef2a9987999a29774fa1476b
Component: engine
2014-01-31 23:06:00 +00:00
052a914774 Fix integration tests
Docker-DCO-1.1-Signed-off-by: Michael Crosby <michael@crosbymichael.com> (github: crosbymichael)
Upstream-commit: 49b9813035b3abb445ef7238f034897fa03a9652
Component: engine
2014-01-31 12:04:44 -08:00
6d81dd5d9b Separate out graphdriver mount and container root
This separates out the directory as returned from the graphdriver (the
"base" fs) from the root filesystem of the live container. This is
necessary as the "diff" operation needs access to the base filesystem
without all the mounts that the running container needs (/.dockerinit,
volumes, etc).

We change container in the following way:

Container.RootfsPath() returns the the directory which will be used as
the root in a running container. It is always of the form
"/var/lib/docker/container/<id>/root" and is a private bind mount to
the base filesystem. It is only available while the container is running.

Container.BasefsPath() returns the raw directory from the graph driver
without the container runtime mounts. It is availible whenever the
container is mounted (in between a container.Mount()/Unmount() pair,
which are properly refcounted).

This fixes issue #3840

Docker-DCO-1.1-Signed-off-by: Alexander Larsson <alexl@redhat.com> (github: alexlarsson)
Upstream-commit: fab19d197c6cc362182f6cee4d0a6e65e799875f
Component: engine
2014-01-30 16:43:53 +01:00
47913f96e1 Merge pull request #3073 from alexlarsson/refcount-driver-mounts
Refcount driver mounts
Upstream-commit: f61a91f50a753e0b8878675b4bab8ee4dc2a70e1
Component: engine
2014-01-22 11:42:17 -08:00
2a860faf85 switch back to the valid json format
Docker-DCO-1.1-Signed-off-by: Victor Vieux <victor.vieux@docker.com> (github: vieux)
Upstream-commit: e3461bc8d694fa4b104a9cdd08e11de26a04d923
Component: engine
2014-01-21 15:06:23 -08:00
36def61b75 Remove container.EnsureMounted
This was deprecated already and all it did was call Mount().
The use of this was a bit confusing since we need to pair Mount/Unmount
calls which wasn't obvious with "EnsureMounted".

Docker-DCO-1.1-Signed-off-by: Alexander Larsson <alexl@redhat.com> (github: alexlarsson)
Upstream-commit: 191aa17d16c0935a7deda03b4c3bc879f7a316eb
Component: engine
2014-01-21 11:26:11 +01:00
5e35604785 Add Put() to graphdriver API and use it
This makes all users of Put() have a corresponding call
to Get() which means we will be able to track whether
any particular ID is in use and if not unmount it.

Docker-DCO-1.1-Signed-off-by: Alexander Larsson <alexl@redhat.com> (github: alexlarsson)
Upstream-commit: bcaf6c2359d83acd5da54f499e21f4a148f491c5
Component: engine
2014-01-21 11:25:37 +01:00
695537a626 Update with lxc unconfined changes
Docker-DCO-1.1-Signed-off-by: Michael Crosby <michael@crosbymichael.com> (github: crosbymichael)
Upstream-commit: 93ead2fe789a3a94a8433b12efcca782e0a7d7de
Component: engine
2014-01-17 17:42:22 -08:00
5f902c5a09 Port 'docker images' to the engine API
Docker-DCO-1.1-Signed-off-by: Solomon Hykes <solomon@docker.com> (github: shykes)
Upstream-commit: 17a806c8a0b6add2aa773dfca272acefee9b638c
Component: engine
2014-01-13 15:49:33 -08:00
44050b9219 Allow mtu to be configured at daemon start
Upstream-commit: 566ff54d0ddffbeb3ba2e5f1e400db8528faf0a7
Component: engine
2013-12-20 12:12:03 -05:00
1b6ebfe317 Hack: use new 'kill' command in integration tests
Upstream-commit: 2546a2c645c59d094bc2c09dc9eb0d8eb5c36786
Component: engine
2013-12-06 23:02:27 +00:00
8c54ea502c Enable engine to take Stderr and Stdout for mocking in tests
Upstream-commit: 25d3db048e761ee2c61a2cc8d58196786616988b
Component: engine
2013-12-06 01:18:18 -08:00
b0f24a88da Engine: integer job status, improved stream API
* Jobs return an integer status instead of a string
* Status convention mimics unix process execution: 0=success, 1=generic error, 127="no such command"
* Stdout and Stderr support multiple thread-safe data receivers and ring buffer filtering
Upstream-commit: a4f8a2494b0fb755db52c68cf61ddc8ff52d2965
Component: engine
2013-11-30 00:25:46 +00:00
915356af08 Refactor State to be 100% thread safe
Upstream-commit: 33e70864a2c4321bf6968d6d521c159a1b72b220
Component: engine
2013-11-21 16:34:58 -08:00
e0cb0011ff gofmt_test
Upstream-commit: ed8f75d25ca0fb46d8c06bfe74bbc386bf4e8a8f
Component: engine
2013-11-18 11:25:13 -08:00
25c99ca04e Re-enable api integration tests using only public remote API.
Upstream-commit: afe230718ead8cb1d1053a7132a034f0bd55b424
Component: engine
2013-11-16 02:12:14 +00:00
7456f6a466 fix Integration tests
Upstream-commit: 661a8a0e0ce95d9bcb222184c14373fb1dbb1aec
Component: engine
2013-11-14 14:46:13 -08:00
1880f01ff8 Integration tests: remove dependency on private APIs
Upstream-commit: c001a5af67b7b811a8fc69011fcffc2656b8fd99
Component: engine
2013-11-14 10:50:43 -08:00