Commit graph

3357 commits

Author SHA1 Message Date
Vincent Demeester
f9386538ec Merge pull request #21724 from flyinprogrammer/syslog-opts-env-labels
enable syslog logger to have access to env and labels
2016-04-10 10:58:25 +02:00
Lei Jitang
b4664e3f86 Merge pull request #21854 from WeiZhang555/restart-failure
Fix critical bug: can't restart an restarting container
2016-04-10 11:17:19 +08:00
Vincent Demeester
a01f4dc229 Merge pull request #21853 from coolljt0725/fix_stats
Fix docker stats missing mem limit
2016-04-09 13:46:58 +02:00
John Howard
fec6cd2eb9 Merge pull request #20525 from Microsoft/sjw/update-graphdriver-create
Adding readOnly parameter to graphdriver Create method
2016-04-08 20:44:03 -07:00
Sebastiaan van Stijn
eaa1e8a8c4 Merge pull request #21839 from WeiZhang555/add-start-event
Add missing "start" event back for auto-restart container
2016-04-08 17:52:22 -07:00
Alan Scherger
f67b711277 enable syslog logger to have access to env and labels
Signed-off-by: Alan Scherger <flyinprogrammer@gmail.com>
2016-04-08 19:50:18 -05:00
David Calavera
f62b26571a Merge pull request #21894 from Microsoft/sjw/nanoserver-fix
Fixing warning to correctly output error string.
2016-04-08 16:43:07 -07:00
Stefan J. Wernli
3c220cfcba Fixing warning to correctly output error string.
Signed-off-by: Stefan J. Wernli <swernli@microsoft.com>
2016-04-08 15:04:04 -07:00
David Calavera
e626011bfb Merge pull request #21760 from hqhq/hq_minimum_reservation
Add minimum limit for memory reservation
2016-04-08 07:58:28 -07:00
Zhang Wei
a705e166cf Fix critical bug: can't restart a restarting container
When user try to restart a restarting container, docker client report
error: "container is already active", and container will be stopped
instead be restarted which is seriously wrong.

What's more critical is that when user try to start this container
again, it will always fail.

This error can also be reproduced with a `docker stop`+`docker start`.

And this commit will fix the bug.

Signed-off-by: Zhang Wei <zhangwei555@huawei.com>
2016-04-08 22:02:30 +08:00
Brian Goff
7f865e4953 Merge pull request #21777 from Microsoft/jjh/killTP4
Windows: So long TP4, so long...
2016-04-08 09:33:23 -04:00
Yong Tang
7581cf96fb Additional syslog-format option to allow microsecond resolution in syslog timestamp.
This fix tries to add an additional syslog-format of `rfc5424micro` which follows
the same as rfc5424 except that it use microsecond resolution for timestamp. The
purpose is to solve the issue raised in #21793 where log events might lose its
ordering if happens on the same second.

The timestamp field in rfc5424 is derived from rfc3339, though the maximium
resolution is limited to "TIME-SECFRAC" which is 6 (microsecond resolution).

The appropriate documentation (`docs/admin/logging/overview.md`) has been updated
to reflect the change in this fix.

This fix adds a unit test to cover the newly introduced format.

This fix fixes #21793.

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
2016-04-08 05:00:11 +00:00
John Howard
d5ef62f489 Merge pull request #21872 from Microsoft/sjw/nanoserver-fix
Fixing nanoserver image load bug.
2016-04-07 21:24:32 -07:00
Zhang Wei
fdfaaeb9aa Add missing "start" event back for auto-restart container
When container is automatically restarted based on restart policy,
docker events can't get "start" event but only get "die" event, this is
not consistent with previous behavior. This commit will add "start"
event back.

Signed-off-by: Zhang Wei <zhangwei555@huawei.com>
2016-04-08 11:40:32 +08:00
John Howard
fdd5b5de62 Merge pull request #21774 from Microsoft/jstarks/support_non_base_layered_images
Windows: support non-base-layered images
2016-04-07 20:13:38 -07:00
Lei Jitang
a0a6d031d7 Fix docker stats missing memory limit
Signed-off-by: Lei Jitang <leijitang@huawei.com>
2016-04-07 22:09:07 -04:00
Brian Goff
681b5e0ed4 Merge pull request #21867 from calavera/remove_reference_from_api
Remove reference package dependency from the api.
2016-04-07 21:56:43 -04:00
John Starks
cf7944bf6f Windows: Support ApplyDiff on a base layer
This adds support to the Windows graph driver for ApplyDiff on a base
layer. It also adds support for hard links, which are needed because the
Windows base layers double in size without hard link support.

Signed-off-by: John Starks <jostarks@microsoft.com>
2016-04-07 17:52:28 -07:00
John Starks
d45a26d7e2 Windows: Support non-base-layered images
Previously, Windows only supported running with a OS-managed base image.
With this change, Windows supports normal, Linux-like layered images, too.

Signed-off-by: John Starks <jostarks@microsoft.com>
2016-04-07 17:52:26 -07:00
Sebastiaan van Stijn
fc352287c1 Merge pull request #21816 from estesp/case-of-the-missing-else
Don't perform external setkey when net==host
2016-04-07 17:01:30 -07:00
Stefan J. Wernli
a22092b136 Fixing nanoserver image load bug.
Fixes an issue that prevents nano server images from loading properly. Also updates logic for custom image loading to avoid preventing daemon start because an image failed to load.

Signed-off-by: Stefan J. Wernli <swernli@microsoft.com>
2016-04-07 16:44:51 -07:00
David Calavera
47afe6bd0a Remove reference package dependency from the api.
Signed-off-by: David Calavera <david.calavera@gmail.com>
2016-04-07 15:01:23 -07:00
Vincent Demeester
2e236d0255 Merge pull request #21828 from dmcgowan/fix-overlay-on-overlay-test
Fix overlay test running on overlay
2016-04-07 10:07:25 +02:00
Vincent Demeester
8785952282 Merge pull request #21830 from anusha-ragunathan/auplink
Be more lenient on auplink errors.
2016-04-07 09:19:38 +02:00
Derek McGowan
824c72f472 Fix overlay test running on overlay
Overlay tests were failing when /var/tmp was an overlay mount with a misleading message.
Now overlay tests will be skipped when attempting to be run on overlay.
Tests will now use the TMPDIR environment variable instead of only /var/tmp

Fixes #21686

Signed-off-by: Derek McGowan <derek@mcgstyle.net> (github: dmcgowan)
2016-04-06 21:06:42 -07:00
Anusha Ragunathan
dbd9b7e121 Be more lenient on auplink errors.
On aufs, auplink is run before the Unmount. Irrespective of the
result, we proceed to issue a Unmount syscall. In which case,
demote erros on auplink to warning.

Signed-off-by: Anusha Ragunathan <anusha@docker.com>
2016-04-06 18:24:19 -07:00
John Howard
9d7f6bb921 Merge pull request #21733 from Microsoft/sjw/updatepending
Adding postRunProcessing infrastructure for hanlding Windows Update.
2016-04-06 15:36:39 -07:00
Alexander Morozov
65464d11f1 Merge pull request #21809 from Microsoft/jjh/tp4removal
Windows: Remove TP4 support from main codebase
2016-04-06 14:11:33 -07:00
Stefan J. Wernli
818a5198e4 Adding postRunProcessing infrastructure for hanlding Windows Update.
Signed-off-by: Stefan J. Wernli <swernli@microsoft.com>
2016-04-06 14:03:05 -07:00
Stefan J. Wernli
ef5bfad321 Adding readOnly parameter to graphdriver Create method
Since the layer store was introduced, the level above the graphdriver
now differentiates between read/write and read-only layers.  This
distinction is useful for graphdrivers that need to take special steps
when creating a layer based on whether it is read-only or not.
Adding this parameter allows the graphdrivers to differentiate, which
in the case of the Windows graphdriver, removes our dependence on parsing
the id of the parent for "-init" in order to infer this information.

This will also set the stage for unblocking some of the layer store
unit tests in the next preview build of Windows.

Signed-off-by: Stefan J. Wernli <swernli@microsoft.com>
2016-04-06 13:52:53 -07:00
Phil Estes
1771d35b48 Don't perform external setkey when net==host
This else case was lost in the migration from native execdriver to OCI
implementation via runc. There is no need to have external setkey when
--net=host.

Docker-DCO-1.1-Signed-off-by: Phil Estes <estesp@linux.vnet.ibm.com>
2016-04-06 16:45:43 -04:00
Phil Estes
40dc921da2 Merge pull request #21805 from LK4D4/unused_stuff
all: remove some unused funcs and variables
2016-04-06 16:27:14 -04:00
Vincent Demeester
5709f8e422 Merge pull request #21092 from WeiZhang555/fix-21064-detach-keys
Client print error when specify wrong detach keys
2016-04-06 22:14:14 +02:00
Tibor Vass
8c361eb5da Merge pull request #21723 from devimc/master
Fix compilation errors with btrfs-progs-4.5
2016-04-06 15:56:42 -04:00
Tibor Vass
6bd429cb2a Merge pull request #21802 from tiborvass/carry-21716
Carry 21716: When container had no layer data, cleanupContainer crashed
2016-04-06 15:21:38 -04:00
John Howard
331c8a86d4 Windows: Remove TP4 support from main code
Signed-off-by: John Howard <jhoward@microsoft.com>
2016-04-06 12:12:20 -07:00
Brian Goff
40ccb7114e Merge pull request #21768 from shishir-a412ed/fix_docker_run
Ignore os.IsNotExist errors when calling ToDiskLocking
2016-04-06 14:12:38 -04:00
Alexander Morozov
5ee8652a21 all: remove some unused funcs and variables
Signed-off-by: Alexander Morozov <lk4d4@docker.com>
2016-04-06 10:40:01 -07:00
mYmNeo
0bfc9c8de0 when container had no layer data, cleanupContainer crashed
Signed-off-by: mYmNeo <thomassong@tencent.com>
2016-04-06 12:40:20 -04:00
Tibor Vass
c7cf245053 Merge pull request #21751 from tonistiigi/runc-maskedpaths
Define readonly/mask paths in spec
2016-04-06 12:16:28 -04:00
Shishir Mahajan
606cf5310d Ignore os.IsNotExist errors when calling ToDiskLocking
Signed-off-by: Shishir Mahajan <shishir.mahajan@redhat.com>
2016-04-06 11:17:56 -04:00
Qiang Huang
50a6181005 Add minimum limit for memory reservation
Kernel has no limit for memory reservation, but in different
kernel versions, the default behavior is different.

On kernel 3.13,
docker run --rm --memory-reservation 1k busybox cat /sys/fs/cgroup/memory/memory.soft_limit_in_bytes
the output would be 4096, but on kernel 4.1, the output is 0.

Since we have minimum limit for memory and kernel memory, we
can have this limit for memory reservation as well, to make
the behavior consistent.

Signed-off-by: Qiang Huang <h.huangqiang@huawei.com>
2016-04-06 09:37:51 +08:00
John Howard
5175c9a5ea Windows: So long TP4, so long...
Signed-off-by: John Howard <jhoward@microsoft.com>
2016-04-05 16:39:27 -07:00
John Howard
fc9912fd00 Merge pull request #21272 from Microsoft/jstarks/manifest_updates
Add os_version and os_features to Image
2016-04-05 16:16:25 -07:00
Tonis Tiigi
3f81b49352 Define readonly/mask paths in spec
This vendors in new spec/runc that supports
setting readonly and masked paths in the 
configuration. Using this allows us to make an
exception for `—-privileged`.

Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2016-04-04 18:55:55 -07:00
John Starks
194eaa5c0f Add os_version and os_features to Image
These fields are needed to specify the exact version of Windows that an
image can run on. They may be useful for other platforms in the future.

This also changes image.store.Create to validate that the loaded image is
supported on the current machine. This change affects Linux as well, since
it now validates the architecture and OS fields.

Signed-off-by: John Starks <jostarks@microsoft.com>
2016-04-04 13:14:57 -07:00
Zhang Wei
91e5bb9541 Let client print error when speicify wrong detach keys
Fix #21064

Let client print error message explicitly when user specifies wrong
detach keys.

Signed-off-by: Zhang Wei <zhangwei555@huawei.com>
2016-04-04 15:35:55 +08:00
Sebastiaan van Stijn
b8f38747e6 Improve udev unsupported error message
Show a different message if a dynamic binary
is running, but doesn't have udev sync support.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2016-04-01 13:31:44 -07:00
Julio Montes
a038cccf88 Fix compilation errors with btrfs-progs-4.5
btrfs-progs-4.5 introduces device delete by devid
for this reason btrfs_ioctl_vol_args_v2's name was encapsulated
in a union

this patch is for setting btrfs_ioctl_vol_args_v2's name
using a C function in order to preserve compatibility
with all btrfs-progs versions

Signed-off-by: Julio Montes <imc.coder@gmail.com>
2016-04-01 08:58:29 -06:00
Sebastiaan van Stijn
42494720c2 Merge pull request #21687 from allencloud/fix-typos
fix typos
2016-03-31 14:18:31 -07:00