Commit Graph

224 Commits

Author SHA1 Message Date
44fddcaf4b Merge pull request #11412 from vbatts/vbatts-dm_sync_is_required
devmapper: udev sync is a requirement
Upstream-commit: 23c12dabbdb7f895f606bbf2438599d29c53df3a
Component: engine
2015-04-10 16:52:38 -04:00
d89c51c3b5 devmapper: storage-opt override for udev sync
This provides an override for forcing the daemon to still attempt
running the devicemapper driver even when udev sync is not supported.

Intended to be a very clear impairment for those choosing to use it. If
udev sync is false, there will still be an error in the daemon logs,
even when the override is in place. The docs have an explicit WARNING.

Including link to the docs for users that encounter this daemon error
during an upgrade.

Signed-off-by: Vincent Batts <vbatts@redhat.com>
Upstream-commit: 0e21782de5c038dfa3cfdfc7655b9e6b143baa7b
Component: engine
2015-04-10 15:43:16 -04:00
25835c875f devmapper: udev sync is a requirement
closes #10664
closes #4036

Signed-off-by: Vincent Batts <vbatts@redhat.com>
Upstream-commit: ca628c6216ade64790dfbfe388fe4769433ec4aa
Component: engine
2015-04-06 15:17:57 -04:00
68a3810b3c devmapper: Retry device removal after 100ms instead of 10ms
Right now we try device removal at the interval of 10ms and keep on trying
till either device is removed or 10 seconds are over. That means if device
is busy, we will try 1000 times in those 10 seconds.

Sounds too high a frequency of deivce removal retrial. All the logs are
filled easily. I think it is a good idea to slow down a bit and retry at
the interval of 100ms instead of 10ms.

Signed-off-by: Vivek Goyal <vgoyal@redhat.com>
Upstream-commit: c737800b7faced4b53854c8cb6766ebe58a3c3e9
Component: engine
2015-04-02 16:47:14 -04:00
a0411faab2 devmapper: Remove call to waitClose()
During device removal, we are first waiting for device to close() in a tight
loop for 10 seconds. I am not sure why do we need it. First of all we come
here once the umount() is successful so device should be free. For some reason
of device is temporarily busy, then removeDevice() logic retries device removal
logic in a loop for 10 seconds and that should cover it. Can't see why one
more 10 seoncds loop is required before attempting device removal.

One loop should be able to cover all the temporary device busy conditions and
if condition is not temporary then 10 seconds loop is not going to help anyway.

So instead of two loops of 10 seconds each, I am converting it to a single
loop of 20 seconds. May be 10 second loop is good enough but for now I am
keeping it 20 seconds to avoid any regressions.

Signed-off-by: Vivek Goyal <vgoyal@redhat.com>
Upstream-commit: f74d12012c21349b2bd51d9c395a99331ff0a9a5
Component: engine
2015-04-02 16:47:14 -04:00
12beb9b276 devmapper: Remove extra wait after device removal
Currently in device removal path (device deactivation), we wait
for 10 seconds for devive to actually go away. waitRemove().

In current code this is not required. If dm removal task has completed
and one has done the wait on udev cookie, then device is gone and there
is no need to write another loop to wait for device removal.

This patch removes the waitRemove() which waits for 10 seconds after
device removal. This seems unnecessary.

Signed-off-by: Vivek Goyal <vgoyal@redhat.com>
Upstream-commit: dbf04ec4e2a6b4fe73f7f300918a906c0ff1a37b
Component: engine
2015-04-02 16:47:14 -04:00
cb8a2764e5 devicemapper: Remove debug messages from RemoveDevice()
devmapper graph driver retries device removal 1000 times in case of failure
and if this fills up console with 1000 messages (when daemon is running in
debug mode). So remove these debug messages.
 
Signed-off-by: Vivek Goyal <vgoyal@redhat.com>
Upstream-commit: cb7c893275c32ddfa775c3f22869a9c211024c71
Component: engine
2015-04-02 16:47:14 -04:00
2b212c76e7 devmapper: Fix libdm logging
There are issues with libdm logging. Right now if docker daemon is run
in debug mode, logging by libdm is too verbose. And if a device can't 
be removed, thousands of messages fill the console and one can not see
what's going on.

This patch removes devicemapper.LogInitVerbose() call as that call will
only work if docker was not registering its own log handler with libdm.
For some reason docker registers one with libdm and libdm hands over
all the messages to docker (including debug ones). And now it is up to
devmapper backend to figure out which ones should go to console and
which ones should not.

So by default log only fatal messages from libdm. One can easily modify
the code to change it for debugging purposes.

Signed-off-by: Vivek Goyal <vgoyal@redhat.com>
Upstream-commit: e07d3cd9acf14219f33e12375fb8c2e3fe02ad0c
Component: engine
2015-04-02 16:47:14 -04: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
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
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
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
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
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
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
4ab99c503e Changing bitflag checking style to preferred style. Fixes #11668
Signed-off-by: Jimmy Puckett <jimmy.puckett@spinen.com>
Upstream-commit: ec5e22efe3fb88f2fa2eb5e9a37161940f86bcfa
Component: engine
2015-03-24 21:09:25 -04:00
02a1b68a98 Merge pull request #11417 from rhatdan/btrfs
Btrfs has eliminated the BTRFS_BUILD_VERSION in latest version
Upstream-commit: 8fc9e400866456d72727afb9f8ea3a23abc4282e
Component: engine
2015-03-24 16:00:15 -04:00
8d8bb83013 Merge branch 'master' of github.com:docker/docker into btrfs
Docker-DCO-1.1-Signed-off-by: Dan Walsh <dwalsh@redhat.com> (github: rhatdan)
Upstream-commit: 25c4a923424bdc659cdb18239290196272d17423
Component: engine
2015-03-24 14:14:54 -04:00
1e47557825 Refactor pkg/common, Fixes #11599
Signed-off-by: Antonio Murdaca <me@runcom.ninja>
Upstream-commit: b80fae735684406d848b16a0f148a746e17ed25f
Component: engine
2015-03-24 18:19:59 +01:00
605c3fdd7b Btrfs has eliminated the BTRFS_BUILD_VERSION in latest version
They say we should only use the BTRFS_LIB_VERSION

They will no longer support this since it had to be managed manually

Docker-DCO-1.1-Signed-off-by: Dan Walsh <dwalsh@redhat.com> (github: rhatdan)
Upstream-commit: 3c136333af94c04eb59d7af9ee9be15c5bc6a129
Component: engine
2015-03-20 11:43:53 -04:00
c29e43cc4b Format error by value
- Use `%v` verb to format errors.
- Give `param` constant in portallocator some better name.

Signed-off-by: Michal Minar <miminar@redhat.com>
Upstream-commit: 210ab030bc3dab7bcf8f7252f2f9facb5a26cb6b
Component: engine
2015-03-16 12:05:53 +01:00
b3678f8418 Merge pull request #11076 from hqhq/hq_use_warning_in_sysinfo
use type WARN for warning
Upstream-commit: 82f390e139e611b97911c19dd1be2a98264cf4b9
Component: engine
2015-03-15 21:13:23 -07:00
3dc824af8c Make errors from graphdriver init friendlier
In several cases graphdriver were just returning the low-level syscall
error and that was making it all the way up to the daemon logs and in
many cases was difficult to tell it was even coming from the graphdriver
at all.

Signed-off-by: Brian Goff <cpuguy83@gmail.com>
Upstream-commit: c0f7819905050ebdb583afba5b6f760d3892adb8
Component: engine
2015-03-12 08:13:00 -07:00
b951eb79db Fix minor typo
Signed-off-by: Deng Guangxing <dengguangxing@huawei.com>
Upstream-commit: ce1a0b612d300210fadf12556e1b38885f098197
Component: engine
2015-03-11 11:13:39 +08:00
ad6ee8ec46 fix warning messages
Use log.Warnf instead of log.Infof, and remove redundant `WARNING` prefix.

Signed-off-by: Qiang Huang <h.huangqiang@huawei.com>
Upstream-commit: bffe04b582d143f074297b260a359dfb54a7763b
Component: engine
2015-03-11 08:47:45 +08:00
5506a9a27c Remove subdirectories MAINTAINERS files
Signed-off-by: Arnaud Porterie <arnaud.porterie@docker.com>
Upstream-commit: 89bdaa35e04b74b7c6528783e0f7b8154b2a3d31
Component: engine
2015-03-06 18:21:51 -08:00
04c84acfda Merge pull request #11064 from delftswa2014/10970-treesize
Move directory size calculation to pkg/ (fixes #10970)
Upstream-commit: 92e632c84e7b1abc1a2c5cb3a22e0725951a82af
Component: engine
2015-03-05 13:06:02 -08:00
ae82ea5f07 Two SELinux Changes.
daemon/volumes.go

  This SetFileCon call made no sense, it was changing the labels of any
directory mounted into the containers SELinux label.  If it came from me,
then I apologize since it is a huge bug.

The Volumes Mount code should optionally do this, but it should not always
happen, and should never happen on a --privileged container.

The change to

daemon/graphdriver/vfs/driver.go, is a simplification since this it not
a relabel, it is only a setting of the shared label for docker volumes.

Docker-DCO-1.1-Signed-off-by: Dan Walsh <dwalsh@redhat.com> (github: rhatdan)
Upstream-commit: 4eb2fd169f8c9adbee4a9a0bd387f96b4e725963
Component: engine
2015-03-05 13:55:44 -05:00
459803f719 Move directory size calculation to pkg/ (fixes #10970)
Signed-off-by: Martijn Dwars <ikben@martijndwars.nl>
Upstream-commit: e2b8933d213b283578babc1d86538950295e4fc7
Component: engine
2015-03-04 21:16:31 +01:00
e00d9f2fa2 Add xfs fs magic to graphdriver/driver.go
Signed-off-by: Lei Jitang <leijitang@huawei.com>
Upstream-commit: dd56fa190695a969673f6f663cd5fe78b7c22787
Component: engine
2015-03-04 19:01:39 +08:00
2d25573473 Merge pull request #11106 from MabinGo/fix_log_info
Fix some revision about log output
Upstream-commit: 32ccde46dde5130adcfb170c846c8f0317761aee
Component: engine
2015-03-02 13:55:43 -08:00
d0e86ebf79 Merge pull request #11054 from MabinGo/checkfileoper1
Add the file close operation before function return to advoid resource leaking
Upstream-commit: 82aa950f4e10dbd45b16ecfc144f8d4b450ad1ff
Component: engine
2015-03-02 10:44:26 -08:00
aeb9a73d60 Merge pull request #11083 from MabinGo/minor_typo
Modify the minor typo in deviceset.go
Upstream-commit: 738bdec4908755761b27b7d15baeefb1a824f770
Component: engine
2015-03-02 13:11:14 -05:00
4a59461365 Fix some revision about log output
Signed-off-by: Mabin <bin.ma@huawei.com>
Upstream-commit: adfd1ddfc6e094295d07ff2b36fb6e91cf7878dd
Component: engine
2015-03-02 17:06:38 +08:00
f3df541809 fix typo of comments in daemon/graphdriver/devmapper/deviceset.go
Signed-off-by: Mabin <bin.ma@huawei.com>
Upstream-commit: f4ac86de84c25bf1793d1e934695b7119dc51b70
Component: engine
2015-03-02 02:11:15 +08:00
5e225bf426 Modify the minor typo in deviceset.go
Signed-off-by: Mabin <bin.ma@huawei.com>
Upstream-commit: 5c1559a754f7b1fba45be01a6f1a4b3c7c6c4c68
Component: engine
2015-02-28 18:04:10 +08:00
0fd505f748 Add the file close operation before function return to advoid resource leaking
Signed-off-by: Mabin <bin.ma@huawei.com>
Upstream-commit: b5eeab6e061d183be050143426dd7fd774c89a20
Component: engine
2015-02-28 00:24:41 +08:00
bdb65abebf Removing dependencies from pkg into Docker internal code
Closes #10922

Signed-off-by: Srini Brahmaroutu <srbrahma@us.ibm.com>
Upstream-commit: 7a9c944b827dc0cd416d701fe6460264f05166bb
Component: engine
2015-02-23 18:43:10 +00:00
009380c706 Merge pull request #10474 from petervo/10473-availble-space
Add available space to devicemapper status output
Upstream-commit: f4dc496d36d31cf9ca1b3508f10954066ff7f8bc
Component: engine
2015-02-10 16:32:51 +01:00
7fe8a53e1c Detail available space behavior on loop devices
Signed-off-by: Peter Volpe <petervo@redhat.com>
Upstream-commit: 6816d27591a24b7a3a5b2e4c85294abffda977a2
Component: engine
2015-02-09 14:51:48 -08:00
5c8d4a0091 Merge pull request #10440 from rhvgoyal/skip-dot-prefix-files
devicemapper: Skip the files with prefix "." during device map construct...
Upstream-commit: 67a4f1db103ac726f6e3d1fe388214ba41062b78
Component: engine
2015-02-09 10:26:27 +01:00
3bd03f7627 Merge pull request #10534 from unclejack/aufs_enable_dio
daemon/graphdriver/aufs: enable direct io
Upstream-commit: 414a37f90aa7f01a29e4abdf04b73bb46c896e18
Component: engine
2015-02-06 18:26:09 -05:00
a31c4ae7c4 Fix a small spelling error in the dm.blkdiscard docs
Signed-off-by: Sven Dowideit <SvenDowideit@home.org.au>
Upstream-commit: fcb975cfd17cfbe45b7f6661c2c1c4a94de04c94
Component: engine
2015-02-05 10:57:33 +10:00
e15bc1c2fe Fix for running unit tests on a 3.18 kernel with btrfs.
Was failing on overlay before and comparing the wrong error.

Docker-DCO-1.1-Signed-off-by: Jessie Frazelle <jess@docker.com> (github: jfrazelle)
Upstream-commit: c809fc552b65ea90ed695d39c24447aa3dbc7891
Component: engine
2015-02-04 13:51:44 -08:00
947746473e daemon/graphdriver/aufs: enable direct io
Signed-off-by: Cristian Staretu <cristian.staretu@gmail.com>
Upstream-commit: d18f5c3808f8df40fb8e3e153887e921bc71103b
Component: engine
2015-02-03 18:30:37 +02:00