Commit graph

1061 commits

Author SHA1 Message Date
John Howard
59cfc08982 Windows - Really fix VFS this time
Signed-off-by: John Howard <jhoward@microsoft.com>
2015-06-15 15:09:48 -07:00
Vivek Goyal
407a626be6 docker-inspect: Extend docker inspect to export image/container metadata related to graph driver
Export image/container metadata stored in graph driver. Right now 3 fields
DeviceId, DeviceSize and DeviceName are being exported from devicemapper.
Other graph drivers can export fields as they see fit.

This data can be used to mount the thin device outside of docker and tools
can look into image/container and do some kind of inspection.

Signed-off-by: Vivek Goyal <vgoyal@redhat.com>
2015-06-15 14:05:10 -04:00
Mary Anthony
cd44018856 Carry of PR #13520
Removinig files

Signed-off-by: Mary Anthony <mary@docker.com>
2015-06-13 09:27:30 -07:00
David Calavera
e7533d7f81 Merge pull request #13494 from Microsoft/10662-vfsdriveroption
Windows: Allow VFS
2015-06-12 11:12:32 -07:00
John Howard
e89f837bc6 Windows: Allow VFS
Signed-off-by: John Howard <jhoward@microsoft.com>
2015-06-12 09:21:17 -07:00
Jörg Thalheim
19c31a703f zfs: correctly apply selinux context
fixes #13858

Signed-off-by: Jörg Thalheim <joerg@higgsboson.tk>
2015-06-11 11:11:37 +02:00
Tibor Vass
add64dc297 Merge pull request #13832 from mapk0y/fix-error-msg
fix typo.
2015-06-10 16:38:07 -04:00
mapk0y
416e855e9b fix typo.
Signed-off-by: mapk0y <mapk0y@gmail.com>
2015-06-10 06:26:07 +09:00
John Howard
9a9dc5ba96 Windows: Don't build Linux graph drivers
Signed-off-by: John Howard <jhoward@microsoft.com>
2015-06-08 15:09:33 -07:00
Alexey Guskov
112b7e6546 avoid 88-chars mountpoint length limit on freebsd
Signed-off-by: Alexey Guskov <lexag@mail.ru>
2015-05-29 16:33:04 +03:00
Alexey Guskov
36bf6e4440 zfs magicnumber check on freebsd is fixed
Signed-off-by: Alexey Guskov <lexag@mail.ru>
2015-05-28 18:38:08 +03:00
John Howard
4e8b2509fd Windows: graphdriver refactor
Signed-off-by: John Howard <jhoward@microsoft.com>
2015-05-20 08:51:27 -07:00
Alexander Morozov
3916561619 Fix Put without Get in overlay
It is called for example on daemon start after crash

Signed-off-by: Alexander Morozov <lk4d4@docker.com>
2015-05-19 09:32:23 -07:00
Michael Crosby
70e9e4bf9f Merge pull request #13249 from coolljt0725/fix_incorrect_document_of_storage_opt
Fix incorrect document storage-opt
2015-05-18 11:35:01 -07:00
Lei Jitang
0204ecdf70 Fix incorrect document storage-opt
Signed-off-by: Lei Jitang <leijitang@huawei.com>
2015-05-15 19:13:07 +08:00
John Howard
35cdcbb323 Windows: No ZFS graphdriver
Signed-off-by: John Howard <jhoward@microsoft.com>
2015-05-14 15:57:45 -07:00
Jörg Thalheim
2cb23527e4 zfs: update filesystem cache on filesystem creation/deletion
Previously the cache was only updated once on startup, because the graph
code only check for filesystems on startup. However this breaks the API as it
was supposed and so unit tests.

Fixes #13142

Signed-off-by: Jörg Thalheim <joerg@higgsboson.tk>
2015-05-12 13:06:41 +02:00
Jörg Thalheim
bad25ccf97 zfs: retrieve all filesystems on startup at once
The docker graph call driver.Exists() on initialisation for each filesystem in
the graph. This results will results in a lot `zfs get all` commands. To reduce
this, retrieve all descend filesystem at startup and cache it for later checks

Signed-off-by: Jörg Thalheim <joerg@higgsboson.tk>
2015-05-08 17:49:39 +02:00
Jörg Thalheim
11e9167a6b zfs: improve performance by using legacy mounts
instead of let zfs automaticly mount datasets, mount them on demand using mount(2).
This speed up this graph driver in 2 ways:
- less zfs processes needed to start a container
- /proc/mounts get smaller, so zfs userspace tools has less to read (which can
  a significant amount of data as the number of layer grows)

This ways it can be also ensured that the correct mountpoint is always used.

Signed-off-by: Jörg Thalheim <joerg@higgsboson.tk>
2015-05-08 17:49:39 +02:00
Jörg Thalheim
ee00f07ea6 zfs: replace c for /proc/mounts parsing with go
Signed-off-by: Jörg Thalheim <joerg@higgsboson.tk>
2015-05-08 17:49:39 +02:00
Jörg Thalheim
dd614b5e34 zfs: refactor error handling
thanks to @calavera

Signed-off-by: Jörg Thalheim <joerg@higgsboson.tk>
2015-05-08 17:48:20 +02:00
Jörg Thalheim
a25195d86c zfs: add myself to MAINTAINERS
Signed-off-by: Jörg Thalheim <joerg@higgsboson.tk>
2015-05-08 17:48:20 +02:00
Jörg Thalheim
bacecabf3b zfs: revert to NaiveGraphDriver for the moment
Signed-off-by: Jörg Thalheim <joerg@higgsboson.tk>
2015-05-08 17:48:20 +02:00
Jörg Thalheim
d5151ca8ab Implement Docker on ZFS
Signed-off-by: Arthur Gautier <baloo@gandi.net>
Signed-off-by: Jörg Thalheim <joerg@higgsboson.tk>
2015-05-08 17:48:20 +02:00
Alexander Morozov
93536cfa76 Merge pull request #13067 from burke/faster-commit-for-overlay
overlay: skip superfluous metadata sets on commit
2015-05-07 13:58:46 -07:00
Burke Libbey
bc5503f46b
overlay: skip superfluous metadata sets on commit
Signed-off-by: Burke Libbey <burke.libbey@shopify.com>
2015-05-07 16:15:54 -04:00
Vincent Batts
56c9917815 Merge pull request #12190 from rhvgoyal/deferred-removal
Devicemapper: Provide deferred device removal capability
2015-05-04 14:22:52 -07:00
unclejack
2e49281bd0 Merge pull request #12903 from rhvgoyal/disable-discards
devmapper: Disable mount option "discard" by default
2015-05-04 18:35:25 +03:00
Vivek Goyal
04adaaf1ee devmapper: Disable mount option "discard" by default
Right now devicemapper mounts thin device using online discards by default
and passes mount option "discard". Generally people discourage usage of
online discards as they can be a drain on performance. Instead it is 
recommended to use fstrim once in a while to reclaim the space.

In case of  containers, we recommend to keep data volumes separate. So
there might not be lot of rm, unlink operations going on and there might
not be lot of space being freed by containers. So it might not matter
much if we don't reclaim that free space in pool.

User can still pass mount option explicitly using dm.mountopt=discard to
enable discards if they would like to.

So this is more like setting the containers by default for better performance
instead of better space efficiency in pool. And user can change the behavior
if they don't like default behavior.

Reported-by: Mike Snitzer <snitzer@redhat.com>
Signed-off-by: Vivek Goyal <vgoyal@redhat.com>
2015-05-01 09:16:31 -04:00
Antonio Murdaca
844538142d Small if err cleaning
Signed-off-by: Antonio Murdaca <me@runcom.ninja>
2015-04-27 21:50:33 +02:00
Vivek Goyal
ddc8acebec devmapper: Cancel deferred deactivation if device is reactivated
If device is being reactivated before it could go away and deferred 
deactivation is scheduled on it, cancel it.

Signed-off-by: Vivek Goyal <vgoyal@redhat.com>
2015-04-21 18:14:59 -04:00
Vivek Goyal
66a53819ae devmapper: Export deferred removal status in status
This will help with debugging as one could just do "docker info" and figure
out of deferred removal is enabled or not.

Signed-off-by: Vivek Goyal <vgoyal@redhat.com>
2015-04-21 18:14:59 -04:00
Vivek Goyal
e37c7203bb devmapper: Use deferred removal
Make use of deferred removal of devices.

Signed-off-by: Vivek Goyal <vgoyal@redhat.com>
2015-04-21 18:14:59 -04:00
Vivek Goyal
15c158b207 devmapper: Provide a new parameter dm.deferred_device_removal
Provide a new command line knob dm.deferred_device_removal which will enable
deferred device deactivation if driver and library support it.

This patch also checks for library support and driver version.

Signed-off-by: Vivek Goyal <vgoyal@redhat.com>
2015-04-21 18:14:59 -04:00
Megan Kostick
cdc63ce5d0 Updated message severity in graphdriver
Signed-off-by: Megan Kostick <mkostick@us.ibm.com>
2015-04-17 10:56:12 -07:00
Vincent Batts
b68e161e5b graphdriver: prefer prior driver state
Before this, a storage driver would be defaulted to based on the
priority list, and only print a warning if there is state from other
drivers.

This meant a reordering of priority list would "break" users in an
upgrade of docker, such that there images in the prior driver's state
were now invisible.

With this change, prior state is scanned, and if present that driver is
preferred.

As such, we can reorder the priority list, and after an upgrade,
existing installs with prior drivers can have a contiguous experience,
while fresh installs may default to a driver in the new priority list.

Ref: https://github.com/docker/docker/pull/11962#issuecomment-88274858

Signed-off-by: Vincent Batts <vbatts@redhat.com>
2015-04-13 21:37:55 -04:00
Megan Kostick
7e2d05b493 Add detection for F2Fs and JFS
Signed-off-by: Megan Kostick <mkostick@us.ibm.com>

Alphabetize FSMagic list to make more human-readable.

Signed-off-by: Megan Kostick <mkostick@us.ibm.com>
2015-04-13 17:01:43 -07:00
Tibor Vass
23c12dabbd Merge pull request #11412 from vbatts/vbatts-dm_sync_is_required
devmapper: udev sync is a requirement
2015-04-10 16:52:38 -04:00
Vincent Batts
0e21782de5 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>
2015-04-10 15:43:16 -04:00
Vincent Batts
ca628c6216 devmapper: udev sync is a requirement
closes #10664
closes #4036

Signed-off-by: Vincent Batts <vbatts@redhat.com>
2015-04-06 15:17:57 -04:00
Vivek Goyal
c737800b7f 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>
2015-04-02 16:47:14 -04:00
Vivek Goyal
f74d12012c 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>
2015-04-02 16:47:14 -04:00
Vivek Goyal
dbf04ec4e2 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>
2015-04-02 16:47:14 -04:00
Vivek Goyal
cb7c893275 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>
2015-04-02 16:47:14 -04:00
Vivek Goyal
e07d3cd9ac 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>
2015-04-02 16:47:14 -04:00
Vincent Batts
2c72ff1dbf 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>
2015-03-31 17:18:49 -04:00
Michael Crosby
d1306e63e4 Fix AUFS logrus build errors on import
Signed-off-by: Michael Crosby <crosbymichael@gmail.com>
2015-03-30 11:46:44 -07:00
Michael Crosby
14fed352cb Merge pull request #11799 from dqminh/aufs-dirperm1
aufs: apply dirperm1 by default if supported
2015-03-30 11:36:02 -07:00
Brian Goff
da5c863d20 Merge pull request #11788 from reikani/pchoi
Changed snake case naming to camelCase.
2015-03-26 23:55:50 -07:00
Antonio Murdaca
6f4d847046 Replace aliased imports of logrus, fixes #11762
Signed-off-by: Antonio Murdaca <me@runcom.ninja>
2015-03-26 23:22:04 +01:00