Граф коммитов

2125 Коммитов

Автор SHA1 Сообщение Дата
Jess Frazelle 23750fb802 Merge pull request #15862 from calavera/share_shm_and_mqueue
Share shm and mqueue between containers.
2015-09-24 11:23:59 -07:00
David Calavera c8bc02ea35 Merge pull request #16538 from Microsoft/10662-escapeargs
Windows: Fixed escaping of command line arguments
2015-09-24 11:18:29 -07:00
Brian Goff 22877e1b16 Merge pull request #15021 from chenchun/resize_pool
Try to resize data and metadata loopback file when initiating devicemapper
2015-09-23 22:22:51 -04:00
Chun Chen 2458452a3b Try to resize data and metadata loopback file when initiating devicemapper
Signed-off-by: Chun Chen <ramichen@tencent.com>
2015-09-24 09:31:00 +08:00
Brian Goff ebe7ef9fc2 Merge pull request #16411 from duglin/DaemonErrors
Move more 'daemon' errors to the new error package
2015-09-23 21:20:56 -04:00
Jess Frazelle ddd0c47412 Merge pull request #16497 from MHBauer/attach-refactor-new
refactor attach to not use internal data structures
2015-09-23 16:52:39 -07:00
Darren Stahl ca5cc770b9 Windows: Fixed escaping of command line arguments
This fixes some tests that were failing on windows

Signed-off-by: Darren Stahl <darst@microsoft.com>
2015-09-23 16:35:44 -07:00
Doug Davis 0a734182eb Move more 'daemon' errors to the new error package
Signed-off-by: Doug Davis <dug@us.ibm.com>
2015-09-23 09:51:45 -07:00
David Calavera b1d2f52bb2 Improvements to the original sharing implementation.
- Print the mount table as in /proc/self/mountinfo
- Do not exit prematurely when one of the ipc mounts doesn't exist.
- Do not exit prematurely when one of the ipc mounts cannot be unmounted.
- Add a unit test to see if the cleanup really works.
- Use syscall.MNT_DETACH to cleanup mounts after a crash.
- Unmount IPC mounts when the daemon unregisters an old running container.

Signed-off-by: David Calavera <david.calavera@gmail.com>
2015-09-23 12:07:24 -04:00
Morgan Bauer 8aef1a33eb
refactor attach to not use internal data structures
- refactor to make it easier to split the api in the future

Signed-off-by: Morgan Bauer <mbauer@us.ibm.com>
2015-09-23 08:55:21 -07:00
John Howard a5879bb83b Windows: [TP4] Add CPU Weight
Signed-off-by: John Howard <jhoward@microsoft.com>
2015-09-22 18:29:15 -07:00
David Calavera 114612305c Merge pull request #16235 from HuKeping/oom-event
Events for OOM needs to be shift to an earlier time
2015-09-22 11:50:30 -07:00
Alexandre Beslic f97e6f2a37 Merge pull request #16419 from HuKeping/comments
Comment: add description for some code which hard to understand
2015-09-21 20:44:54 -07:00
Hu Keping 3b443abec2 Comment: add description for some code which hard to understand
Signed-off-by: Hu Keping <hukeping@huawei.com>
2015-09-22 09:34:49 +08:00
Tibor Vass da82b5fedb Merge pull request #16466 from runcom/15876-fix-TestRunWithKernelMemory
daemon: execdriver: lxc: fix wrong template value passed to lxc conf
2015-09-21 16:34:34 -04:00
Evan Hazlett 0c71c19239 Merge pull request #16404 from duglin/FixRenameError
Fix 'rename' error msg and error checking
2015-09-21 15:51:02 -04:00
Antonio Murdaca 7b4f73ee6c daemon: execdriver: lxc: fix wrong template value passed to lxc conf
Signed-off-by: Antonio Murdaca <runcom@linux.com>
2015-09-21 21:40:46 +02:00
Tibor Vass 2daa5b1735 Merge pull request #16432 from calavera/volume_store
Move volume ref counting store to a package.
2015-09-21 15:38:06 -04:00
Tibor Vass d572bab4a0 Merge pull request #16437 from runcom/invalid-logger-address
daemon: logger: error out on daemon start if invalid logger address
2015-09-21 14:53:47 -04:00
Alexandre Beslic 40edb5f97c Merge pull request #15029 from azurezk/add-version-info
Add docker version info in /info request
2015-09-21 11:44:11 -07:00
David Calavera 72bb56618b Move volume ref counting store to a package.
- Add unit tests to make sure the functionality is correct.
- Add FilterByDriver to allow filtering volumes by driver, for future
  `volume ls` filtering and whatnot.

Signed-off-by: David Calavera <david.calavera@gmail.com>
2015-09-21 12:46:49 -04:00
Zhang Kun 7cf343d106 add docker server version to /info
Signed-off-by: Zhang Kun <zkazure@gmail.com>
2015-09-21 21:15:32 +08:00
Lei Jitang 5746eb9501 Cleanup: remove unnecessary return at the end of block in volumes.go
Signed-off-by: Lei Jitang <leijitang@huawei.com>
2015-09-21 04:32:37 -04:00
Hu Keping f05bacbe50 Events for OOM needs to be shift to an earlier time
It's worth to warn user as soon as possilbe when OOM happend.

Signed-off-by: Hu Keping <hukeping@huawei.com>
2015-09-21 10:18:08 +08:00
Antonio Murdaca e3c472426f daemon: logger: error out on daemon start if invalid logger address
If an invalid logger address is provided on daemon start it will
silently fail. As syslog driver is doing, this check should be done on
daemon start and prevent it from starting even in other drivers.
This patch also adds integration tests for this behavior.

Signed-off-by: Antonio Murdaca <runcom@linux.com>
2015-09-20 16:20:25 +02:00
David Calavera e61abac5fa Merge pull request #16349 from cpuguy83/16302_deprecate_autocreate_binds
deprecate bind path auto-create
2015-09-18 12:53:06 -07:00
Alexandre Beslic 96f9efc063 Merge pull request #16403 from runcom/fix-containers-json-emtpy-response
Fix GET /containers/json emtpy response regression
2015-09-18 11:47:42 -07:00
Doug Davis 848792c42e Fix 'rename' error msg and error checking
`docker rename foo ''` would result in:
```
usage: docker rename OLD_NAME NEW_NAME
```
which is the old engine's way of return errors - yes that's in the
daemon code.  So I fixed that error msg to just be normal.

While doing that I noticed that using an empty string for the
source container name failed but didn't print any error message at all.
This is because we would generate a URL like: ../containers//rename/..
which would cause a 301 redirect to ../containers/rename/..
however the CLI code doesn't actually deal with 301's - it just ignores
them and returns back to the CLI code/caller.

Rather than changing the CLI to deal with 3xx error codes, which would
probably be a good thing to do in a follow-on PR, for this immediate
issue I just added a cli-side check for empty strings for both old and
new names. This way we catch it even before we hit the daemon.

API callers will get a 404, assuming they follow the 301, for the
case of the src being empty, and the new error msg when the destination
is empty - so we should be good now.

Add tests for both cases too.

Signed-off-by: Doug Davis <dug@us.ibm.com>
2015-09-18 11:12:22 -07:00
Vincent Batts 4026512a2c events/jsonmessage: add and prefer TimeNano for events
This way provide both Time and TimeNano in the event. For the display of
the JSONMessage, use either, but prefer TimeNano Proving only TimeNano
would break Subscribers that are using the `Time` field, so both are set
for backwards compatibility.

The events logging uses nano formatting, but only provides a Unix()
time, therefor ordering may get lost in the output. Example:
```
2015-09-15T14:18:51.000000000-04:00 ee46febd64ac629f7de9cd8bf58582e6f263d97ff46896adc5b508db804682da: (from busybox) resize
2015-09-15T14:18:51.000000000-04:00 a78c9149b1c0474502a117efaa814541926c2ae6ec3c76607e1c931b84c3a44b: (from busybox) resize
```

By having a field just for Nano time, when set, the marshalling back to
`time.Unix(sec int64, nsec int64)` has zeros exactly where it needs to.
This does not break any existing use of jsonmessage.JSONMessage, but now
allows for use of `UnixNano()` and get event formatting that has
distinguishable order. Example:
```
2015-09-15T15:37:23.810295632-04:00 6adcf8ed9f5f5ec059a915466cd1cde86a18b4a085fc3af405e9cc9fecbbbbaf: (from busybox) resize
2015-09-15T15:37:23.810412202-04:00 6b7c5bfdc3f902096f5a91e628f21bd4b56e32590c5b4b97044aafc005ddcb0d: (from busybox) resize
```

Including tests for TimeNano and updated event API reference doc.

Signed-off-by: Vincent Batts <vbatts@redhat.com>
2015-09-18 13:15:26 -04:00
Antonio Murdaca 26bd5e3a2d Fix GET /containers/json emtpy response regression
GET /containers/json route used to reply with and empty array `[]` when no
containers where available. Daemon containers list refactor introduced
this bug by declaring an empty slice istead of initializing it as well
and it was now replying with `null`.

Signed-off-by: Antonio Murdaca <runcom@linux.com>
2015-09-18 18:44:46 +02:00
Brian Goff 249f45bcfe deprecate bind path auto-create
Signed-off-by: Brian Goff <cpuguy83@gmail.com>
2015-09-18 10:28:38 -04: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
Jess Frazelle 828e4ac45a Merge pull request #16355 from duglin/DaemonErrors
Convert some "daemon" static error strings to the new errocode package format
2015-09-17 11:48:37 -07:00
Antonio Murdaca e33b8b11af Merge pull request #16370 from mountkin/daemon-cleanup
remove the unused run() and output() functions in daemon/container.go
2015-09-17 17:33:55 +02:00
David Calavera cafee2eb45 Merge pull request #16361 from MHBauer/stats-refactor
refactor stats to not use internal data structures
2015-09-17 08:28:07 -07:00
Shijiang Wei b79782e951 remove the unused run() and output() functions in daemon/container.go
Signed-off-by: Shijiang Wei <mountkin@gmail.com>
2015-09-17 19:22:25 +08:00
Brian Goff 4dfa996cc2 Merge pull request #15384 from phil-monroe/15058-include-name-in-syslog-tag
log driver - Interpolate fields into log tag
2015-09-16 23:33:34 -04:00
Morgan Bauer 2d5d606fd3
refactor stats to not use internal data structures
- refactor to make it easier to split the api in the future
 - addition to check the existing test case and make sure it contains
   some expected output

Signed-off-by: Morgan Bauer <mbauer@us.ibm.com>
2015-09-16 17:28:52 -07:00
David Calavera b0b3bc56d0 Merge pull request #16357 from Microsoft/10662-enabledockervolume
Windows: Enable docker volume
2015-09-16 16:42:50 -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
Philip Monroe 3be7146e14 log driver - add ability to interpolate container context into the log tag field
Signed-off-by: Philip Monroe <phil@philmonroe.com>
2015-09-16 15:19:28 -07:00
John Howard 42a46ed1a4 Windows: Enabled docker volume
Signed-off-by: John Howard <jhoward@microsoft.com>
2015-09-16 14:33:13 -07:00
Tim Hockin 3d4685e258 Add support for DNS options
Signed-off-by: Tim Hockin <thockin@google.com>
2015-09-16 14:06:45 -07:00
David Calavera b9a3660d1e Merge pull request #16316 from vbatts/vbatts-events
daemon/events: let Log be [slightly] blocking
2015-09-16 13:57:06 -07:00
Jess Frazelle ac34ce0307 Merge pull request #16305 from estesp/hooks-for-the-hooks-gods
Use libcontainer hook for network namespace info passing to libnetwork's sandbox
2015-09-16 13:55:16 -07:00
Sebastiaan van Stijn 259a0fb16c Merge pull request #15786 from HuKeping/stats-network
Refactor the statistics of network in docker stats
2015-09-16 20:29:16 +02:00
Jessica Frazelle 50d7fba775
Revert "Make daemon to start with no userlandproxy by default"
This reverts commit bf2b8ec816.

Signed-off-by: Jessica Frazelle <acidburn@docker.com>
2015-09-16 09:56:38 -07:00
Madhu Venugopal e148e763b8 Update native execdriver to exploit libcontainer hooks
Using @mavenugo's patch for enabling the libcontainer pre-start hook to
be used for network namespace initialization (correcting the conflict
with user namespaces); updated the boolean check to the more generic
SupportsHooks() name, and fixed the hook state function signature.

Signed-off-by: Madhu Venugopal <madhu@docker.com>
Docker-DCO-1.1-Signed-off-by: Phil Estes <estesp@linux.vnet.ibm.com> (github: estesp)
2015-09-16 12:51:14 -04:00
Vincent Batts fc77ea787e Revert "Make events test more deterministic in go1.5"
This reverts commit 386aefb9fc.

Signed-off-by: Vincent Batts <vbatts@redhat.com>
2015-09-15 15:55:18 -04:00
Vincent Batts 09e7dd03f8 daemon/events: let Log be [slightly] blocking
With go1.5's concurrency, the use of a goroutine in Log'ing events was
causing the resulting events to not be in order.

Signed-off-by: Vincent Batts <vbatts@redhat.com>
2015-09-15 14:28:22 -04:00