Commit Graph

1152 Commits

Author SHA1 Message Date
68cf0c513e Remove use of Table from 'docker diff'
Signed-off-by: Doug Davis <dug@us.ibm.com>
Upstream-commit: 49c72506ace177e33d867123ca15f193c38bcf45
Component: engine
2015-04-02 16:55:58 -07:00
9135f9f621 Merge pull request #10745 from jfrazelle/device-dir
Mounting a dir of devices like /dev/snd should mount all child devices
Upstream-commit: b9be50b578f86e858113b9c334e1748e15b63263
Component: engine
2015-04-01 16:53:01 -07:00
c8180f954e Mounting a directory of devices like /dev/snd should mount all child devices.
I have seen a lot of people try to do this and reach out to me on how to mount
/dev/snd because it is returning "not a device node". The docs imply you can
_just_ mount /dev/snd and that is not the case. This fixes that. It also allows
for coolness if you want to mount say /dev/usb.

Docker-DCO-1.1-Signed-off-by: Jessie Frazelle <hugs@docker.com> (github: jfrazelle)

Docker-DCO-1.1-Signed-off-by: Jessie Frazelle <princess@docker.com> (github: jfrazelle)

Docker-DCO-1.1-Signed-off-by: Jessie Frazelle <jess@docker.com> (github: jfrazelle)

Docker-DCO-1.1-Signed-off-by: Jessica Frazelle <jess@docker.com> (github: jfrazelle)
Upstream-commit: 664004ed0c6c99369720a00f5673f1e106d9496d
Component: engine
2015-04-01 15:57:41 -07:00
aeb6266db3 Return closed channel if oom notification fails
When working with Go channels you must not set it to nil or else the
channel will block forever.  It will not panic reading from a nil chan
but it blocks.  The correct way to do this is to create the channel then
close it as the correct results to the caller will be returned.

Signed-off-by: Michael Crosby <crosbymichael@gmail.com>
Upstream-commit: 7061a993c5b620d6e68450f1b90f3458bfa1add0
Component: engine
2015-04-01 15:30:48 -07:00
753b8ae08c Remove jobs from registry.Service
This makes `registry.Service` a first class type and does not use jobs
to interact with this type.

Signed-off-by: Michael Crosby <crosbymichael@gmail.com>
Upstream-commit: 03d3d79b2b3f8b720fff2d649aff0ef791cff417
Component: engine
2015-03-31 16:38:04 -07:00
f06c130d5c Merge pull request #11962 from vbatts/vbatts-promote_overlay
graphdriver: promote overlay above vfs
Upstream-commit: ded5c73debbf867e17ea611407b76ce2bf043651
Component: engine
2015-03-31 14:39:08 -07:00
3a4dbacc2f graphdriver: promote overlay above vfs
It's about time to let folks not hit 'vfs', when 'overlay' is supported
on their kernel. Especially now that v3.18.y is a long-term kernel.

Signed-off-by: Vincent Batts <vbatts@redhat.com>
Upstream-commit: 2c72ff1dbfa83aa8f797bdfebaacb8a919677326
Component: engine
2015-03-31 17:18:49 -04:00
1541e9c937 Merge pull request #11934 from cpuguy83/fix_volume_symlink_check
Fix volume symlink check
Upstream-commit: 749a117267c4c0f74b0162af9ed42c3307737dde
Component: engine
2015-03-31 13:56:23 -07:00
9b832a806e Merge pull request #11958 from LK4D4/fix_portmapper_race
Move portmapper initialization to var block
Upstream-commit: b85cf5da5e27014ff2e5499d91168678c5c99caa
Component: engine
2015-03-31 13:23:45 -07:00
419d6ae6f9 Use getResourcePath instead
Also cleans up tests to not shell out for file creation.

Signed-off-by: Brian Goff <cpuguy83@gmail.com>
Upstream-commit: 63708dca8a633d68f9342eebd4f7a616e8c48234
Component: engine
2015-03-31 15:10:30 -04:00
7f060d0ed1 Initialize portMapper in RequestPort too
Api requesting port for daemon before init_networkdriver called.
Problem is that now initialization of api depends on initialization of
daemon and their intializations runs in parallel. Proper fix will be
just do it sequentially. For now I don't want refactor it, because it
can bring additional problems in 1.6.0.

Signed-off-by: Alexander Morozov <lk4d4@docker.com>
Upstream-commit: 584180fce7ad11516a256b8abd4621138337e918
Component: engine
2015-03-31 11:30:57 -07:00
d03e2c1251 container: Do not remove contianer if any of the resource failed cleanup
Do not remove container if any of the resource could not be cleaned up. We
don't want to leak resources.

Two new states have been created. RemovalInProgress and Dead. Once container
is Dead, it can not be started/restarted. Dead container signifies the
container where we tried to remove it but removal failed. User now needs to
figure out what went wrong, corrent the situation and try cleanup again.

RemovalInProgress signifies that container is already being removed. Only
one removal can be in progress.

Also, do not allow start of a container if it is already dead or removal is
in progress.

Also extend existing force option (-f) to docker rm to not return an error
and remove container from user view even if resource cleanup failed.
This will allow a user to get back to old behavior where resources
might leak but atleast user will be able to make progress.

Signed-off-by: Vivek Goyal <vgoyal@redhat.com>
Upstream-commit: 40945fc186067e5b7edd1f6cd7645ff2ae7cea6c
Component: engine
2015-03-31 09:51:19 -04:00
cbf8975ab2 Merge pull request #11946 from crosbymichael/no-pkg-init
Remove port mapper/allocator global state 
Upstream-commit: 73b7cee89c8cde951012c0b0004c5faa579a0028
Component: engine
2015-03-30 22:03:12 -04:00
45221d6bfb Ensure that bridge driver does not use global mappers
This has a few hacks in it but it ensures that the bridge driver does
not use global state in the mappers, atleast as much as possible at this
point without further refactoring.  Some of the exported fields are
hacks to handle the daemon port mapping but this results in a much
cleaner approach and completely remove the global state from the mapper
and allocator.

Signed-off-by: Michael Crosby <crosbymichael@gmail.com>
Upstream-commit: d8c628cf082a50c0a2a5e381a21da8279a5462b4
Component: engine
2015-03-30 18:28:24 -07:00
cbb7d427c6 Refactor portmapper to remove ALL global state
Signed-off-by: Michael Crosby <crosbymichael@gmail.com>
Upstream-commit: 62522c98539e1591017cf0d4f28e6a58f3b1ec6b
Component: engine
2015-03-30 17:31:21 -07:00
163fcc5bfd Refactor port allocator to not have ANY global state
Signed-off-by: Michael Crosby <crosbymichael@gmail.com>
Upstream-commit: 43a50b06187e324e43b26003cace0f351a5fb78c
Component: engine
2015-03-30 17:30:59 -07:00
154ea9dfc7 Merge pull request #11933 from LK4D4/fix_err_mask
Various fixes for execdriver
Upstream-commit: f0ddbbaa8615b4afd89dc4e37f585bd041da7ba2
Component: engine
2015-03-30 17:12:35 -07:00
595da7af33 Merge pull request #11938 from achanda/patch-1
Remove unused daemon.LogToDisk function
Upstream-commit: 2742bf5cbc2d7b8141f527f1e9e1014fdce328b2
Component: engine
2015-03-30 15:48:03 -07:00
9ce95596ab Do not mask *exec.ExitError
Fix #11764

Signed-off-by: Alexander Morozov <lk4d4@docker.com>
Upstream-commit: f468bbb7e8c89204bd5d8f346ecec4606b9f3b31
Component: engine
2015-03-30 15:31:49 -07:00
fe4221a719 Remove unused daemon.LogToDisk function
Fixes #11937
Signed-off-by: Abhishek Chanda <abhishek.becs@gmail.com>
Upstream-commit: 1d23bae785ce8c94227def97b673307e1743db88
Component: engine
2015-03-30 14:54:17 -07:00
f91badaa49 Remove duplicate assignment
Signed-off-by: Antonio Murdaca <me@runcom.ninja>
Upstream-commit: cc46ae8eaef2ce441e5f35412c4ee6ccbb65c2de
Component: engine
2015-03-30 23:07:43 +02:00
c6b7d50add Get child processes before main process die
Signed-off-by: Alexander Morozov <lk4d4@docker.com>
Upstream-commit: 5a1e5cf8c9bff51f6314754c039bf7511e2fb613
Component: engine
2015-03-30 13:28:34 -07:00
6af6b1f997 Use proper wait function for --pid=host
Signed-off-by: Alexander Morozov <lk4d4@docker.com>
Upstream-commit: 489ab77f4aea9bc3e7ada751cab5d827040b1e8b
Component: engine
2015-03-30 13:27:38 -07:00
0fa6cf44f7 Merge pull request #11896 from vdemeester/9998-cp
Docker cp handles resolv.conf, hostname & hosts, fixes #9998
Upstream-commit: b6d6ffa1dd7172ba6e5f2eb8adf1626a6ee47a01
Component: engine
2015-03-30 13:15:00 -07:00
e54d4e4dac Fix AUFS logrus build errors on import
Signed-off-by: Michael Crosby <crosbymichael@gmail.com>
Upstream-commit: d1306e63e478cf8fb7ee093c828763e27a5b0cc9
Component: engine
2015-03-30 11:46:44 -07:00
d7e9f5fdd9 Merge pull request #11799 from dqminh/aufs-dirperm1
aufs: apply dirperm1 by default if supported
Upstream-commit: 14fed352cbb29232af1644e49e019da897a44de6
Component: engine
2015-03-30 11:36:02 -07:00
5bc802bd5b Merge pull request #11906 from runcom/11905-refactor-utils-tmpdir
Refactor utils/tmpdir.go
Upstream-commit: a2ea4a9d9de48eebbeeb80acfdc6ce82f6052365
Component: engine
2015-03-30 08:58:51 -07:00
8b07e2892d Fix a typo in daemon/networkdriver/ipallocator/allocator.go
Signed-off-by: Yuan Sun <sunyuan3@huawei.com>
Upstream-commit: 08331294bcabf90ce3d22dca729f206912d2a752
Component: engine
2015-03-30 08:31:46 +08:00
82aa49d3e7 Docker cp handles resolv.conf, hostname & hosts, fixes #9998
Add a integration test TestCpSpecialFiles

Signed-off-by: Vincent Demeester <vincent@sbr.pm>
Upstream-commit: 8bc330d8632ef0129b433b877a5e2fc88bb2eb39
Component: engine
2015-03-29 22:10:14 +02:00
342d42b5a5 Refactor utils/tmpdir.go, fixes #11905
Signed-off-by: Antonio Murdaca <me@runcom.ninja>
Upstream-commit: f1bbc1f34f98529f352130b5985ae5763e5b9c2e
Component: engine
2015-03-29 20:56:07 +02:00
3cecae722e Fix create volume in a directory which is a symbolic link
Signed-off-by: Lei Jitang <leijitang@huawei.com>
Upstream-commit: 7583b491250beac9caeeac13b7b68c4e0f03eb60
Component: engine
2015-03-29 13:35:36 +08:00
0544f5e034 Fix error from daemon no such image even when the image exist
Signed-off-by: Lei Jitang <leijitang@huawei.com>
Upstream-commit: 013fb87543a47524efba3c371a1d22afe151287c
Component: engine
2015-03-28 09:07:20 +08:00
1c9316a817 Merge pull request #11788 from reikani/pchoi
Changed snake case naming to camelCase.
Upstream-commit: da5c863d20df8c030b3ffc6c4e95f976ed162721
Component: engine
2015-03-26 23:55:50 -07:00
e5b36a723c Replace aliased imports of logrus, fixes #11762
Signed-off-by: Antonio Murdaca <me@runcom.ninja>
Upstream-commit: 6f4d847046cb4e072de61d042c0266190d73a8c9
Component: engine
2015-03-26 23:22:04 +01:00
0913f2905d Changed snake case naming to camelCase
Signed-off-by: Peter Choi <phkchoi89@gmail.com>
Upstream-commit: ae907e7af16136225417242ef5d55d3f6062fb3b
Component: engine
2015-03-26 15:05:45 -06:00
48f42e6784 print dirperm1 supported status in docker info
It's easier for users to check if their systems support dirperm1 just by using
docker info

Signed-off-by: Daniel, Dao Quang Minh <dqminh89@gmail.com>
Upstream-commit: d68d5f2e4bf7f527e06d85ec4ed8cd3917a3fd7f
Component: engine
2015-03-26 17:58:49 +00:00
9ce3328aa4 Merge pull request #11800 from hqhq/hq_fix_create_issue
add back job.Errorf
Upstream-commit: 2bbf1987d2218f22e1df705c9bf1e0ce47a61faa
Component: engine
2015-03-26 11:12:55 -06:00
d90880d842 Merge pull request #11702 from jimmypuckett/feature/bitflag_checking_style_11668
Feature/bitflag checking style 11668.  Fixes #11668
Upstream-commit: dd492dc15d462aee110e4d6df6297ad64c5fad56
Component: engine
2015-03-26 08:34:58 -07:00
958a690786 aufs: apply dirperm1 by default if supported
Automatically detect support for aufs `dirperm1` option and apply it.
`dirperm1` tells aufs to check the permission bits of the directory on the
topmost branch and ignore the permission bits on all lower branches.
It can be used to fix aufs' permission bug (i.e., upper layer having
broader mask than the lower layer).

More information about the bug can be found at https://github.com/docker/docker/issues/783
`dirperm1` man page is at: http://aufs.sourceforge.net/aufs3/man.html

Signed-off-by: Daniel, Dao Quang Minh <dqminh89@gmail.com>
Upstream-commit: 281abd2c8aff542e3b0309eda15536177bcec713
Component: engine
2015-03-26 07:25:42 +00:00
b6ee273588 add back job.Errorf
c79b9bab54167 (Remove engine.Status and replace it with standard go error)
cause a regression that create container won't get any warnings, we still
need this to send useful informations to user.

Signed-off-by: Qiang Huang <h.huangqiang@huawei.com>
Upstream-commit: 40ef253ef516a82d4a3d1cf23f7d3bee2a08bc4f
Component: engine
2015-03-26 13:12:36 +08:00
f2b849a215 running code formatter as @tiborvass requested
Signed-off-by: Jimmy Puckett <jimmy.puckett@spinen.com>
Upstream-commit: 5dde99163e7674814f2d9be0bc22c9618fa70b89
Component: engine
2015-03-25 19:24:55 -04:00
9d3f3b6126 Merge pull request #11772 from aneshas/11718-redundant-else
Fixed redundant else
Upstream-commit: 89e7f5e6611e6237482d986777a3451034f7e4c0
Component: engine
2015-03-25 16:16:16 -07:00
d222ef85ca Fixed redundant else
Signed-off-by: Anes Hasicic <anes.hasicic@gmail.com>
Upstream-commit: 3d7b9e8f30a48bc2e929d8ac3d82f70778e99b59
Component: engine
2015-03-25 23:44:32 +01:00
a16f3d6cb4 Remove engine.Status and replace it with standard go error
Signed-off-by: Antonio Murdaca <me@runcom.ninja>
Upstream-commit: c79b9bab541673af121d829ebc3b29ff1b01efa2
Component: engine
2015-03-25 22:32:08 +01:00
a9e8a0831a Merge pull request #11691 from matthewkmayer/feature-dont-create-bind-dirs
Removes bind dir creation in daemon start.
Upstream-commit: 54a607a22d625a06fabf604053748f708afc4d94
Component: engine
2015-03-25 11:44:13 -07:00
b18a43073b btrfs: #ifdef for build version
We removed it, because upstream removed it. But now it will be coming
back, so work with it either way.

Signed-off-by: Vincent Batts <vbatts@redhat.com>
Upstream-commit: b76e300b4cd6ce4446170c7170a2734f7994a6c1
Component: engine
2015-03-25 13:56:51 -04:00
5d59835e1f Merge pull request #11750 from MabinGo/adjust_log_func_call
Use appropriate func to record logs according to different scene
Upstream-commit: 444c967aece4ef021aefe209a067c5d94ceb817e
Component: engine
2015-03-25 09:41:41 -07:00
94d3e5ce63 Use appropriate function to record logs
Signed-off-by: Mabin <bin.ma@huawei.com>
Upstream-commit: b46beb170fda938c373a67671919c587aeda92db
Component: engine
2015-03-25 23:32:12 +08:00
ac917d33bd Fixed redundant else in GetDeviceStatus
Signed-off-by: Anes Hasicic <anes.hasicic@gmail.com>
Upstream-commit: e479e1c9f7d327f396eebc46d446cf4ee34513f7
Component: engine
2015-03-25 09:53:04 +01:00
2031fb16f5 Get rid of panic in stats for lxc
Fix containers dir

Docker-DCO-1.1-Signed-off-by: Jessie Frazelle <jess@docker.com> (github: jfrazelle)
Upstream-commit: 7dce9024947e6d573fc5ad0e2151e07c204c474c
Component: engine
2015-03-24 21:12:06 -07:00