Commit graph

4842 commits

Author SHA1 Message Date
Alexander Morozov
77ec3aa8f2 Merge pull request #30344 from cpuguy83/refactor_attach
Refactor attach
2017-01-27 07:35:44 -08:00
Tibor Vass
43544cf2b4 Merge pull request #30157 from aboch/att
Remove attachable network on swarm leave
2017-01-26 17:03:23 -08:00
Brian Goff
93e322f5be Merge pull request #29835 from yongtang/29810-btrfs-rescan
Run btrfs rescan only if userDiskQuota is enabled
2017-01-26 15:55:51 -08:00
Yong Tang
a66e0dc349 Add --filter enabled=true for docker plugin ls
This fix adds `--filter enabled=true` to `docker plugin ls`,
as was specified in 28624.

The related API and docs has been updated.

An integration test has been added.

This fix fixes 28624.

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
2017-01-26 13:16:11 -08:00
Alessandro Boch
3cedca5d53 Remove attachable network on swarm leave
- When the node leaves the cluster, if any user run
  container(s) is connected to the swarm network,
  then daemon needs to detach the container(s) and
  remove the network.

Signed-off-by: Alessandro Boch <aboch@docker.com>
2017-01-26 11:16:07 -08:00
Alexander Morozov
df5d909ac9 Merge pull request #29851 from vdemeester/daemon-extract-image-cache
Extract the daemon image cache to its own package
2017-01-26 10:50:35 -08:00
Alexander Morozov
a69c4129e0 Merge pull request #28409 from dnephin/swagger-gen-more
Generate more types from the swagger spec
2017-01-26 10:35:34 -08:00
Kenfe-Mickael Laventure
1756af6faf Allow adding rules to cgroup devices.allow on container create/run
This introduce a new `--device-cgroup-rule` flag that allow a user to
add one or more entry to the container cgroup device `devices.allow`

Signed-off-by: Kenfe-Mickael Laventure <mickael.laventure@gmail.com>
2017-01-26 07:20:45 -08:00
Alexander Morozov
a76572b846 Merge pull request #30330 from mlaventure/prune-named-untagged
Prune named but untagged images if danglingOnly=true
2017-01-25 08:38:15 -08:00
Andy Goldstein
76f58d7294 journald logs: drain 1 more time at container exit
In the journald log driver, attempt to drain the journal 1 more time
after being told to stop following the log. Due to a possible race
condition, sometimes data is written to the journal at almost the same
time the log watch is closed, and depending on the order of operations,
sometimes you miss the last journal entry.

Signed-off-by: Andy Goldstein <agoldste@redhat.com>
2017-01-25 09:29:21 -05:00
Sebastiaan van Stijn
d4cd4b2164 Merge pull request #30182 from AkihiroSuda/validate-tmpfs
validate mount path for tmpfs
2017-01-25 03:08:17 +01:00
Brian Goff
ee7682ebae Merge pull request #30378 from mlaventure/fix-negative-size
Ensure proper value is used when computing reclaimable space
2017-01-24 09:24:53 -05:00
Vincent Demeester
ac30c4c06c Merge pull request #30385 from aaronlehmann/vendor-swarmkit-grpc-containerd
Vendor swarmkit, containerd, and related dependencies
2017-01-24 11:00:35 +01:00
Yanqiang Miao
cc9ed0a31b Improve the error print of image inspect
Signed-off-by: Yanqiang Miao <miao.yanqiang@zte.com.cn>
2017-01-24 11:07:20 +08:00
Aaron Lehmann
3e987e1732 Vendor swarmkit, containerd, and related dependencies
Update swarmkit to 037b491.

As swarmkit switched to a newer gRPC version, this also involves
updating Docker's vendored gRPC, which in turn requires updating
containerd to a new version that has protobufs generated against this
gRPC version.

Signed-off-by: Aaron Lehmann <aaron.lehmann@docker.com>
2017-01-23 17:51:14 -08:00
Kenfe-Mickael Laventure
dcc1b4baf6 Ensure proper value is used when computing reclaimable space
When Size was reverted to be equal to VirtualSize, the df command
formatter was not correctly updated to account for the change.

Signed-off-by: Kenfe-Mickael Laventure <mickael.laventure@gmail.com>
2017-01-23 13:57:20 -08:00
Aaron Lehmann
062f2a3eae Merge pull request #30139 from Microsoft/jjh/sequential
Windows: Use sequential file access
2017-01-23 12:46:06 -08:00
Kenfe-Mickael Laventure
044fa10309 Prune named but untagged images if danglingOnly=true
Signed-off-by: Kenfe-Mickael Laventure <mickael.laventure@gmail.com>
2017-01-23 11:45:57 -08:00
John Howard
c98e77c77c Windows: Use sequential file access
Signed-off-by: John Howard <jhoward@microsoft.com>
2017-01-23 10:25:36 -08:00
Brian Goff
2ddec97545 Move attach code to stream package
This cleans up attach a little bit, and moves it out of the container
package.
Really `AttachStream` is a method on `*stream.Config`, so moved if from
a package level function to one bound to `Config`.
In addition, uses a config struct rather than passing around tons and
tons of arguments.

Signed-off-by: Brian Goff <cpuguy83@gmail.com>
2017-01-23 09:09:57 -05:00
Tibor Vass
2b89356c07 Merge pull request #30145 from anusha-ragunathan/ps-swarm
Pass plugingetter as part of swarm node config.
2017-01-20 10:35:49 -08:00
Tõnis Tiigi
0566f3ffc4 Merge pull request #30223 from mlaventure/fix-logwatcher-deadlock
Close logwatcher on context cancellation
2017-01-20 10:14:37 -08:00
Alexander Morozov
50a72c7467 Merge pull request #28454 from glensc/init-args
do not require custom build of tini
2017-01-20 10:03:58 -08:00
Akihiro Suda
5b16c4c800 Merge pull request #27510 from chipironcin/master
Improve error message
2017-01-20 21:47:30 +09:00
Akihiro Suda
4a8799dc0a validate mount path for tmpfs
There was no validation for `docker run --tmpfs foo`.

In this PR, only two obvious rules are implemented:
 - path must be absolute
 - path must not be "/"
We should add more rules carefully.

Signed-off-by: Akihiro Suda <suda.akihiro@lab.ntt.co.jp>
2017-01-20 06:01:48 +00:00
Anusha Ragunathan
fa784951ba Pass plugingetter as part of swarm node config.
This is necessary for swarmkit to support cluster wide plugins, such as
globally scoped network plugins.

Signed-off-by: Anusha Ragunathan <anusha.ragunathan@docker.com>
2017-01-19 17:11:12 -08:00
Aaron Lehmann
a992ff9fec Merge pull request #29980 from allencloud/fix-29520-info-incorrectness
return error when listNode fails
2017-01-19 10:41:02 -08:00
Sebastiaan van Stijn
de0328560b Merge pull request #30165 from xulike666/fix-typo-6/36
[combined] fix typo
2017-01-19 17:21:22 +01:00
Vincent Demeester
a3dff7c3db Merge pull request #30267 from WeiZhang555/fix-misspell
Fix some typos
2017-01-19 15:06:08 +01:00
Aaron.L.Xu
40af569164 fix typo
fix typo I found AMAP in integration-cli/*

fix typo mentioned by Allencloud

Signed-off-by: Aaron.L.Xu <likexu@harmonycloud.cn>
2017-01-19 15:52:28 +08:00
Zhang Wei
827bbe90a0 Fix some typos
Signed-off-by: Zhang Wei <zhangwei555@huawei.com>
2017-01-19 15:29:28 +08:00
allencloud
8e04e9902a return error when listNode fails
Signed-off-by: allencloud <allen.sun@daocloud.io>
2017-01-19 14:02:06 +08:00
Nishant Totla
8de8b1d520
Make Docker automatically update hostname for Swarm node
Signed-off-by: Nishant Totla <nishanttotla@gmail.com>
2017-01-18 15:55:53 -08:00
Brian Goff
0e8c7d7277 Merge pull request #30208 from justincormack/no-sqlite
Remove sqlite dependency
2017-01-18 13:15:38 -05:00
Sebastiaan van Stijn
5eda0c5947 Merge pull request #28925 from daehyeok/ineffassign
Refactoring ineffectual assignments
2017-01-18 15:01:57 +01:00
Kenfe-Mickael Laventure
fb2bb3653e Close logwatcher on context cancellation
This commit addresses 2 issues:

  1. in `tailfile()` if somehow the `logWatcher.Msg` were to become full and the watcher closed before space was made into it, we were getting stuck there forever since we were not checking for the watcher getting closed
  2. when servicing `docker logs`, if the command was cancelled we were not closing the watcher (and hence notifying it to stop copying data)

Signed-off-by: Kenfe-Mickael Laventure <mickael.laventure@gmail.com>
2017-01-17 14:36:13 -08:00
Evan Hazlett
e221b74bd1
fix log import
Signed-off-by: Evan Hazlett <ejhazlett@gmail.com>
2017-01-17 14:20:54 -05:00
Alexander Morozov
b0f9958d93 daemon: remove graphdb usage
Signed-off-by: Alexander Morozov <lk4d4@docker.com>
2017-01-17 13:52:48 +00:00
Jorge Marin
2bee1cfd5a Use quoted form of container name and container id
Use quoted form of container name and container id to improve copy-paste avoiding the extra `.` that slips into the clipboard

Signed-off-by: Jorge Marin <chipironcin@users.noreply.github.com>
2017-01-17 08:26:05 +00:00
msabansal
e6962481a0 Added support for dns-search and fixes #30102
Signed-off-by: msabansal <sabansal@microsoft.com>
2017-01-13 12:01:10 -08:00
Boshi Lian
1c770c6d8c return err instead of panic when convert string to utf16
Signed-off-by: Boshi Lian <farmer1992@gmail.com>
2017-01-14 02:21:22 +08:00
Sebastiaan van Stijn
22c411517a
revert "virtualSize" name change
Commit b717de5153
changed the name of the "size" argument to
"virtualSize", as the "VirtualSize" field
was re-used for calculating the size of all
layers _not_ used by other images.

be20dc15af reverted
the change in calculation, but did not change
the argument name back to "size".

This changes the name back to its original
name, because since the introduction of the
content-addressable store in docker 1.10,
there no longer is a "virtual" size, so
"size" is a better name for this argument.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2017-01-13 10:25:03 +01:00
Daehyeok Mun
6306019d0b Refactoring ineffectual assignments
This patch fixed below 4 types of code line
1. Remove unnecessary variable assignment
2. Use variables declaration instead of explicit initial zero value
3. Change variable name to underbar when variable not used
4. Add erro check and return for ignored error

Signed-off-by: Daehyeok Mun <daehyeok@gmail.com>
2017-01-13 00:27:01 -07:00
Sebastiaan van Stijn
0b09d6bfa7 Merge pull request #30061 from yongtang/30027-docker-images-v1.12
Fix `Size` in `docker images` for v1.12 client to v1.13 daemon
2017-01-13 02:11:48 +01:00
Michael Crosby
f65212d5b9 Merge pull request #30106 from runcom/fix-upgrade-from-1.10
daemon: honor default runtime when starting containers
2017-01-12 14:44:37 -08:00
Antonio Murdaca
9391a822ea
daemon: honor default runtime when starting containers
If you created containers from pre-OCI docker (e.g. docker-1.10.x)
upgrade may fail when restarting containers if the new docker daemon
has `--default-runtime` set.

In Fedora, we ship docker 1.12.6 with:

```
--default-runtime=oci
--add-runtime oci=/usr/libexec/docker/docker-runc-current
```

That way we don't rely on `docker-runc` being in `$PATH`.

The issue is, on upgrade from docker 1.10.3 without this patch, the
default runtime in `daemon/start_linux.go` is unconditionally set to
`runc=docker-runc` without honoring the `--default-runtime` flag set in
the docker daemon.

Reproducer:

- (1.10.3) `docker run -d -p 5000:5000 --restart=always --name registry
registry:2`
- upgrade to docker 1.12.6 (1.11.x has likely the same issue)
- the registry container fails to restart on upgrade with the following
log message `error="exec: \"docker-runc\": executable file not
found in $PATH: \"\""`

That error comes from the fact that we're setting the runtime in the
container's HostConfig to `runc` where instead we should have honored
the `--default-runtime` flag (in our case that's set to `oci`).

Signed-off-by: Antonio Murdaca <runcom@redhat.com>
2017-01-12 20:36:22 +01:00
Tõnis Tiigi
27695cd751 Merge pull request #27903 from kim0/master
zfs: expose mountpoint/dataset on inspection
2017-01-12 11:28:07 -08:00
Vincent Demeester
e880120fe2 Merge pull request #28500 from rhvgoyal/remove-unused-param
devmapper: get rid of unused device id argument in unregisterDevice()
2017-01-12 18:02:00 +01:00
Kenfe-Mickael Laventure
be20dc15af Fix ImageSummary.Size value
The prune PR changed the meaning of the file to mean "space on disk
only unique to this image", this PR revert this change.

Signed-off-by: Kenfe-Mickael Laventure <mickael.laventure@gmail.com>
2017-01-12 07:49:22 -08:00
Wang Xing
b9ab129554 Fix rename error when sid is empty
Signed-off-by: Wang Xing <hzwangxing@corp.netease.com>
2017-01-11 21:35:59 +08:00
Yong Tang
0f30c64444 Allow swarm init with --availability=drain
This fix adds a new flag `--availability` to `swarm join`.

Related documentation has been updated.

An integration test has been added.

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
2017-01-10 16:31:51 -08:00
Yong Tang
a8e7e37aa8 Allow swarm join with --availability=drain
This fix tries to address the issue raised in 24596 where it was not
possible to join as manager only (`--availability=drain`).

This fix adds a new flag `--availability` to `swarm join`.

Related documentation has been updated.

An integration test has been added.

NOTE: Additional pull request for swarmkit and engine-api will
be created separately.

This fix fixes 24596.

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
2017-01-10 16:31:51 -08:00
Vincent Demeester
9c96768eae Merge pull request #29564 from aaronlehmann/getter-types
plugingetter: Avoid all caps for constant declarations
2017-01-10 09:35:19 +01:00
Tõnis Tiigi
45e88e995a Merge pull request #30001 from runcom/fix-format
devmapper: fixup error formatting
2017-01-09 10:32:35 -08:00
Sebastiaan van Stijn
f1fdbeca2a Merge pull request #29226 from yongtang/28535-prune-until-follow-up
Add `--filter until=<timestamp>` for `docker container/image prune`
2017-01-09 17:58:01 +01:00
Antonio Murdaca
8bcbc6711f
devmapper: fixup error formatting
Signed-off-by: Antonio Murdaca <runcom@redhat.com>
2017-01-09 16:58:09 +01:00
Sebastiaan van Stijn
f285d5b3e8
do not create init-dir if not needed
commit 56f77d5ade
added support for cpu-rt-period and cpu-rt-runtime,
but always initialized the cgroup path, even if not
used.

As a result, containers failed to start on a
read-only filesystem.

This patch only creates the cgroup path if
one of these options is set.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2017-01-09 15:28:51 +01:00
Vincent Demeester
e8e4546bc3 Merge pull request #29874 from allencloud/fix-29872-volume-ls-filter
fix volume ls filter driver
2017-01-09 13:06:17 +01:00
allencloud
847de59934 fix nit in comments
Signed-off-by: allencloud <allen.sun@daocloud.io>
2017-01-08 21:32:30 +08:00
Aaron Lehmann
7c62f58b27 Merge pull request #29963 from stevvooe/use-digest-package
*: use opencontainers/go-digest package
2017-01-07 09:22:50 -08:00
Stephen J Day
7a85579917
*: use opencontainers/go-digest package
The `digest` data type, used throughout docker for image verification
and identity, has been broken out into `opencontainers/go-digest`. This
PR updates the dependencies and moves uses over to the new type.

Signed-off-by: Stephen J Day <stephen.day@docker.com>
2017-01-06 18:48:41 -08:00
Tibor Vass
c43bac064b Merge pull request #29917 from rhvgoyal/output-device-id
devmapper: Return device id in error message
2017-01-06 17:36:18 -08:00
yuexiao-wang
9788822421 Remove redundant return nil
Signed-off-by: yuexiao-wang <wang.yuexiao@zte.com.cn>
2017-01-06 22:18:10 +08:00
Vivek Goyal
39bdf601f6 devmapper: Return device id in error message
I often get complains that container removal failed and users got following
error message.

"Driver devicemapper failed to remove root filesystem 18a69ba82aaf7a039ce7d44156215012d703001643079775190ac7dd6c6acf56:Device is Busy"

This error message talks about container id but does not give any info
about which particular device id is busy. Most likely device is mounted
in some other mount namespace and if one knows the device id, they
can try to do some debugging figuring which process and which mount
namespace is keeping the device busy and how did we reach that stage.

Without that information, it becomes almost impossible to debug the
problem.

So to improve the debuggability, when device removal fails, also return
device id in error message. Now new message looks as follows.

"Driver devicemapper failed to remove root filesystem 18a69ba82aaf7a039ce7d44156215012d703001643079775190ac7dd6c6acf56: Failed to remove device dbc15bdf9994a17c613d8ef9e924f3cffbf67f91e4f709295c901ad628377991:Device is Busy"

Signed-off-by: Vivek Goyal <vgoyal@redhat.com>
2017-01-05 15:02:21 -05:00
Yong Tang
b36e613d9f Run btrfs rescan only if userDiskQuota is enabled
This fix tries to address the issue raised in 29810
where btrfs subvolume removal failed when docker
is in an unprivileged lxc container. The failure
was caused by `Failed to rescan btrfs quota` with
`operation not permitted`.

However, if disk quota is not enabled, there is no
need to run a btrfs rescan at the first place.

This fix checks for `quotaEnabled` and only run btrfs
rescan if `quotaEnabled` is true.

This fix fixes 29810.

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
2017-01-05 05:18:11 -08:00
Tibor Vass
4617b66c90 Merge pull request #29877 from mavenugo/npfilter
Use GetAllByCap to get list of network plugins in docker info
2017-01-04 14:57:20 -08:00
Yong Tang
58738cdee3 Add --filter until=<timestamp> for docker container/image prune
This fix is a follow up for comment
https://github.com/docker/docker/pull/28535#issuecomment-263215225

This fix provides `--filter until=<timestamp>` for `docker container/image prune`.

This fix adds `--filter until=<timestamp>` to `docker container/image prune`
so that it is possible to specify a timestamp and prune those containers/images
that are earlier than the timestamp.

Related docs has been updated

Several integration tests have been added to cover changes.

This fix fixes #28497.

This fix is related to #28535.

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
2017-01-04 14:16:42 -08:00
Madhu Venugopal
6aaa85f0b0 Swarmkit has enabled the plugin filtering logic based on the drivers
returned in "docker info". Currently info endpoint isnt using the
GetAllByCap, but relies on existing networks to get the plugin names.
This causes a basic issue when it comes to global network plugins which
swarm-mode relies on, wherein swarmkit will not be able to schedule the
network on the worker nodes due to the filtering logic.

In order to break this chicken & egg issue, we must start to use the
GetAllManagedPluginsByCap. We are unable to use GetAllByCap due to
various issues with Plugin-V1's lazy loading approach causing issues
especially during daemon restarts (which uses SystemInfo)

Signed-off-by: Madhu Venugopal <madhu@docker.com>
2017-01-04 12:38:14 -08:00
Aaron Lehmann
428600108c plugingetter: Avoid all caps for constant declarations
Go style calls for mixed caps instead of all caps:
https://golang.org/doc/effective_go.html#mixed-caps

Change LOOKUP, ACQUIRE, and RELEASE to Lookup, Acquire, and Release.

This vendors a fork of libnetwork for now, to deal with a cyclic
dependency issue. The change will be upstream to libnetwork once this is
merged.

Signed-off-by: Aaron Lehmann <aaron.lehmann@docker.com>
2017-01-04 10:19:04 -08:00
Vincent Demeester
835971c6fd
Extract daemon statsCollector to its own package
Signed-off-by: Vincent Demeester <vincent@sbr.pm>
2017-01-04 18:18:30 +01:00
allencloud
0fdab49610 fix volume ls filter driver
Signed-off-by: allencloud <allen.sun@daocloud.io>
2017-01-04 23:29:12 +08:00
Sebastiaan van Stijn
d3f30d6a67 Merge pull request #29650 from allencloud/support-registry-mirror-config-reload
support registry mirror config reload
2017-01-04 13:46:19 +01:00
Vincent Demeester
6129e6ce3e Merge pull request #29697 from yuexiao-wang/fix-docker-daemon
Update docker daemon to dockerd
2017-01-04 11:55:38 +01:00
allencloud
5b9348c553 support registry mirror config reload
Signed-off-by: allencloud <allen.sun@daocloud.io>
2017-01-04 11:04:00 +08:00
Victor Vieux
2ef6d80454 Merge pull request #29556 from mavenugo/refcount
Fixing a couple of network plugin life-cycle mgmt issues
2017-01-03 11:13:22 -08:00
Vincent Demeester
be1df1ee13
Extract the daemon image cache to its own package
ImageCache is now independent of `Daemon` and is located in
`image/cache` package.

Signed-off-by: Vincent Demeester <vincent@sbr.pm>
2017-01-03 19:19:27 +01:00
Vincent Demeester
d1ef47b410 Merge pull request #29843 from YuPengZTE/devVet
fix syscall.GUID composite literal uses unkeyed fields
2017-01-03 19:12:32 +01:00
Daniel Nephin
16bdbaaa33 Convert ContainerTopOKResponse from swagger spec.
Signed-off-by: Daniel Nephin <dnephin@docker.com>
2017-01-03 11:47:47 -05:00
Daniel Nephin
5988b84e4f Generate ImageDeleteResponse from swagger spec.
Signed-off-by: Daniel Nephin <dnephin@docker.com>
2017-01-03 11:47:47 -05:00
Daniel Nephin
b462c93edb Generate ImageHistory from swagger spec.
Signed-off-by: Daniel Nephin <dnephin@docker.com>
2017-01-03 11:47:44 -05:00
yupengzte
230b7c2e4c fix syscall.GUID composite literal uses unkeyed fields
Signed-off-by: yupengzte <yu.peng36@zte.com.cn>
2017-01-03 17:12:15 +08:00
Yanqiang Miao
98c0369437 Remove the redundant 'if' statements
Signed-off-by: Yanqiang Miao <miao.yanqiang@zte.com.cn>
2017-01-03 11:31:41 +08:00
Madhu Venugopal
fc2c0e623d Handle Plugin reference count during network create and delete
Signed-off-by: Madhu Venugopal <madhu@docker.com>
2016-12-30 12:28:22 -08:00
Sebastiaan van Stijn
a331056268 Merge pull request #28852 from miaoyq/rename-log-context
Rename 'context' to 'loginfo' in the logger module
2016-12-30 01:13:49 +01:00
Sebastiaan van Stijn
d6be0e9802 Merge pull request #28631 from likel/master
Don't do format if it's unnecessary
2016-12-30 01:13:12 +01:00
Sebastiaan van Stijn
36ed7d58bb Merge pull request #29721 from coolljt0725/follow_29365
Follow up #29365, fix fail to remove container after restart
2016-12-30 00:13:13 +01:00
Sebastiaan van Stijn
1dd9410776 Merge pull request #29683 from vdemeester/runconfig-clean
Clean some stuff from runconfig that are cli only…
2016-12-29 17:42:08 +01:00
Yanqiang Miao
17ec911da7 Rename 'context' to 'loginfo' in the logger module
Signed-off-by: Yanqiang Miao <miao.yanqiang@zte.com.cn>

gofmt

Signed-off-by: Yanqiang Miao <miao.yanqiang@zte.com.cn>

update

Signed-off-by: Yanqiang Miao <miao.yanqiang@zte.com.cn>

remove 'api/types/container/config.go' from this PR

Signed-off-by: Yanqiang Miao <miao.yanqiang@zte.com.cn>

change 'LogInfo' to 'Info'

Signed-off-by: Yanqiang Miao <miao.yanqiang@zte.com.cn>

update

Signed-off-by: Yanqiang Miao <miao.yanqiang@zte.com.cn>
2016-12-29 19:13:44 +08:00
Akihiro Suda
b86e3bee5a gcplogs: forcibly set HOME on static UNIX binary
Fix #29344

If HOME is not set, the gcplogs logging driver will call os/user.Current() via oauth2/google.
However, in static binary, os/user.Current() leads to segfault due to a glibc issue that won't be fixed
in a short term. (golang/go#13470, https://sourceware.org/bugzilla/show_bug.cgi?id=19341)
So we forcibly set HOME so as to avoid call to os/user/Current().

Signed-off-by: Akihiro Suda <suda.akihiro@lab.ntt.co.jp>
2016-12-29 03:17:26 +00:00
Lei Jitang
77c725eac2 Follow up #29365, fix fail to remove container after restart
Call daemon.Mount will increase the refcount of mounted path,
for those previous running containers, `Mount` call will make
the refcount to 2. see
https://github.com/docker/docker/blob/v1.13.0-rc4/daemon/graphdriver/counter.go#L38
```
	if !m.check {
		m.check = true
		if c.checker.IsMounted(path) {
			m.count++
		}
	}
	m.count++

```
graphdrive could restore on reboot after #22541, call
daemon.Mount to resore the graphdriver is not necessary.

And call `daemon.Mount` on restorting will mount all the containers
mounted layer even if it was stop.

This fix call Mount and then Unmount to get `BaseFs`

Signed-off-by: Lei Jitang <leijitang@huawei.com>
2016-12-28 20:08:03 -05:00
Brian Goff
b0aab6e83e Merge pull request #29475 from AkihiroSuda/vendor-oauth2-3
Vendor gcplogs deps
2016-12-28 11:55:03 -05:00
Brian Goff
631f51015e Merge pull request #29684 from vdemeester/quick-unit
Enhance pkg/{httputils,integration}, distribution/xfer unit tests
2016-12-28 10:57:56 -05:00
Vincent Demeester
522bfd926b
Enhance pkg/{httputils,integration}, distribution/xfer unit tests
- Make it possible to define a shorter waiting time of httputils
- Make a small hack to reduce the waiting time on distribution/xfer

Signed-off-by: Vincent Demeester <vincent@sbr.pm>
2016-12-28 11:54:05 +01:00
allencloud
6fb05778ba fix nits in comments
Signed-off-by: allencloud <allen.sun@daocloud.io>
2016-12-27 23:30:50 +08:00
Ke Li
514adcf458 Remove redundant format
Signed-off-by: Ke Li <kel@splunk.com>

Add missing changes

Signed-off-by: Ke Li <kel@splunk.com>

User errors.New to create error

Signed-off-by: Ke Li <kel@splunk.com>
2016-12-27 21:46:52 +08:00
Sebastiaan van Stijn
16500dfb1d Merge pull request #29712 from allencloud/add-network-name-when-disconnecting-error
display network name when disconnecting network error
2016-12-27 13:08:07 +01:00
yuexiao-wang
62cc802f61 Update docker daemon to dockerd
Signed-off-by: yuexiao-wang <wang.yuexiao@zte.com.cn>
2016-12-27 17:32:15 +08:00
allencloud
cf5734b2e1 return more accurate error message when docker kill
Signed-off-by: allencloud <allen.sun@daocloud.io>
2016-12-27 13:38:13 +08:00
allencloud
f0844de8f0 display network name when disconnecting network error
Signed-off-by: allencloud <allen.sun@daocloud.io>
2016-12-27 13:37:54 +08:00
Vincent Demeester
c424be21b7
Clean some stuff from runconfig that are cli only…
… or could be in `opts` package. Having `runconfig/opts` and `opts`
doesn't really make sense and make it difficult to know where to put
some code.

Signed-off-by: Vincent Demeester <vincent@sbr.pm>
2016-12-24 13:16:00 +01:00
Vincent Demeester
d3e3a97cb2 Merge pull request #28623 from cpuguy83/update_graphdriver_docs
Ensure graphdriver only loads with experimental flag
2016-12-24 11:59:24 +01:00
Tonis Tiigi
3d86b0c79b Implement content addressability for plugins
Move plugins to shared distribution stack with images.

Create immutable plugin config that matches schema2 requirements.

Ensure data being pushed is same as pulled/created.

Store distribution artifacts in a blobstore.

Run init layer setup for every plugin start.

Fix breakouts from unsafe file accesses.

Add support for `docker plugin install --alias`

Uses normalized references for default names to avoid collisions when using default hosts/tags.

Some refactoring of the plugin manager to support the change, like removing the singleton manager and adding manager config struct.

Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
Signed-off-by: Derek McGowan <derek@mcgstyle.net>
2016-12-23 13:29:58 -08:00
Brian Goff
748a9a3f9c Merge pull request #29628 from liliVicky/my-feature4
modify some errors of plurality
2016-12-22 15:40:30 -05:00
Brian Goff
677fa03654 Moves graphdriver plugn docs out of experimental
Also updates some of the structures being sent so plugins are getting
all the new options.

Signed-off-by: Brian Goff <cpuguy83@gmail.com>
2016-12-22 15:30:25 -05:00
Sebastiaan van Stijn
b9ee31ae02 Merge pull request #29314 from vdemeester/no-more-utils
Remove the utils package
2016-12-22 15:21:05 +01:00
liwenqi
128d07d349 modify some files
Signed-off-by: liwenqi <vikilwq@zju.edu.cn>

update some files in the folder of distribution/xfer

Signed-off-by: liwenqi <vikilwq@zju.edu.cn>

correct again

Signed-off-by: liwenqi <vikilwq@zju.edu.cn>
2016-12-22 08:38:37 +08:00
Vincent Demeester
dba271a42a
Move names to package api
Signed-off-by: Vincent Demeester <vincent@sbr.pm>
2016-12-21 22:42:47 +01:00
Vincent Demeester
7164b66cfc
Move ReplaceOrAppendEnvValues to container package
Signed-off-by: Vincent Demeester <vincent@sbr.pm>
2016-12-21 22:42:39 +01:00
Brian Goff
b567e8777d Merge pull request #28594 from Microsoft/jjh/fixtodo
Windows: Fix a longstanding TODO
2016-12-21 15:46:00 -05:00
Brian Goff
267d6935c5 Merge pull request #28714 from thaJeztah/move-logdriver-check-to-daemon
move check for supported drivers to daemon
2016-12-21 13:47:30 -05:00
Brian Goff
b2e348f2a6 Merge pull request #29527 from allencloud/change-minor-mistake
change minor mistake of spelling
2016-12-21 13:15:00 -05:00
Jie Luo
ea2dd4b5d0 duplicated the
Signed-off-by: Jie Luo <luo612@zju.edu.cn>

typo

Signed-off-by: Jie Luo <luo612@zju.edu.cn>

fix some typos

Signed-off-by: Jie Luo <luo612@zju.edu.cn>
2016-12-21 20:16:19 +08:00
Brian Goff
dc8a6d91fb Merge pull request #29550 from LK4D4/fix_commit
commit: do not change container labels on commit
2016-12-20 09:25:09 -05:00
allencloud
7c3657065c change minor mistake of spelling
Signed-off-by: allencloud <allen.sun@daocloud.io>
2016-12-20 21:05:19 +08:00
Tõnis Tiigi
aecb79ff98 Merge pull request #29339 from dmcgowan/plugins-abstract-download-manager
Abstract layerstore from pull/push distribution code
2016-12-19 13:32:28 -08:00
Derek McGowan
3c7676a057
Abstract distribution interfaces from image specific types
Move configurations into a single file.
Abstract download manager in pull config.
Add supports for schema2 only and schema2 type checking.
Add interface for providing push layers.
Abstract image store to generically handle configurations.

Signed-off-by: Derek McGowan <derek@mcgstyle.net>
2016-12-19 10:55:00 -08:00
Alexander Morozov
ca6c6f0765 commit: do not change container labels on commit
Fix #29547

Signed-off-by: Alexander Morozov <lk4d4@docker.com>
2016-12-19 09:56:20 -08:00
Sebastiaan van Stijn
a58b5830b1 Merge pull request #26576 from allencloud/change-cluster-response-status-code
update response status code for cluster request
2016-12-19 18:31:45 +01:00
Sebastiaan van Stijn
05dc9846e1
remove client-side for supported logging drivers
The `docker logs` command performed a
client-side check if the container's
logging driver was supported.

Now that we allow the client to connect
to both "older" and "newer" daemon versions,
this check is best done daemon-side.

This patch remove the check on the client
side, and leaves validation to the daemon,
which should be the source of truth.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2016-12-19 14:30:01 +01:00
Evelyn.Xu
054e479bfa correct the spelling error of driver (#29523)
Signed-off-by: erxian <evelynhsu21@gmail.com>
2016-12-19 07:33:36 -05:00
Vincent Demeester
eb59c6d587 Merge pull request #29378 from aaronlehmann/swarm-plugins
Support v2 plugins in swarm mode
2016-12-19 11:07:06 +01:00
Vincent Demeester
0f68ecd3f7 Merge pull request #29441 from coolljt0725/fix_update_restart_policy
Fix docker update clear restart policy of monitor
2016-12-19 10:30:04 +01:00
allencloud
29d4a7f512 update response status code for cluster request
Signed-off-by: allencloud <allen.sun@daocloud.io>
2016-12-19 10:21:10 +08:00
Lei Jitang
737b5b1781 Fix update clear the restart policy of monitor
Signed-off-by: Lei Jitang <leijitang@huawei.com>
2016-12-16 20:57:05 -05:00
Sebastiaan van Stijn
110a95717d Merge pull request #29459 from yongtang/29365-follow-up
Allow containers to continue even if mount failed after live restore
2016-12-17 01:46:25 +01:00
Brian Goff
6ef1060cd0 Fix volume plugin refecounting on daemon restart
Ensures all known volumes (known b/c they are persisted to disk) have
their volume drivers refcounted properly.

In testing this, I found an issue with `--live-restore` (required since
currently the provided volume plugin doesn't keep state on restart)
where restorted plugins did not have a plugin client loaded causing a
panic when trying to use the plugin.

Signed-off-by: Brian Goff <cpuguy83@gmail.com>
2016-12-16 10:14:06 -05:00
Sebastiaan van Stijn
92e63977d9 Merge pull request #27938 from AkihiroSuda/ovlnw-27866
api: allow NW name that is the prefix of a swarm NW ID
2016-12-16 10:40:46 +01:00
Akihiro Suda
ff2f875574 vendor: google.golang.org/cloud -> cloud.google.com/go
Signed-off-by: Akihiro Suda <suda.akihiro@lab.ntt.co.jp>
2016-12-16 08:36:18 +00:00
Yong Tang
3003ae1d8b Allow containers to continue even if mount failed after live restore
This fix is a follow up to #29365. In #29365 a bug was fixed for
`docker exec -u user` after live restore by remounting.
However, #29365 will prevent containers from restored if mount failed.

In this fix, containers will be restored even if mount in that step failed.
Some functionalities might be missing (like `docker exec -u user`) but
at least it is possible to do certain operations like stop/restart/delete.

This fix is related to #29365.

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
2016-12-15 15:48:14 -08:00
Brian Goff
500210475f Make graphdriver plugin use plugin BasePath
Also enables `PropagatedMount` for graphdrivers.

Signed-off-by: Brian Goff <cpuguy83@gmail.com>
2016-12-15 16:22:13 -05:00
Akihiro Suda
edfbc3b876 api: allow creating a network of which name is the prefix of the ID of a swarm network
Previously, it doesn't allow creating such a network:

e.g.

    $ docker network inspect -f '{{.Id}}' ingress
    84xh9knigj6zyt00u31e26nj3
    $ docker network create 84
    Error response from daemon: network with name 84 already exists

Fix #27866

Signed-off-by: Akihiro Suda <suda.akihiro@lab.ntt.co.jp>
2016-12-15 15:09:06 +00:00
Vincent Demeester
6e6016f581 Merge pull request #29422 from unclejack/daemon_return_directly
daemon: return directly without ifs where possible
2016-12-15 09:46:53 +01:00
Vincent Demeester
a60be6bfe3 Merge pull request #29365 from yongtang/29342-exec-user-after-restart
Fix `docker exec -u` issue after docker daemon restart
2016-12-15 09:16:17 +01:00
Aaron Lehmann
2a97ea9a6e Publish installed v2 plugins to manager
Signed-off-by: Aaron Lehmann <aaron.lehmann@docker.com>
2016-12-14 17:02:56 -08:00
unclejack
3a42518042 daemon: return directly without ifs where possible
Signed-off-by: Cristian Staretu <cristian.staretu@gmail.com>
2016-12-14 22:36:58 +02:00
Aaron Lehmann
d4d6f8c0d0 cli: Pin image to digest using content trust
Implement notary-based digest lookup in the client when
DOCKER_CONTENT_TRUST=1.

Signed-off-by: Aaron Lehmann <aaron.lehmann@docker.com>
2016-12-14 10:49:33 -08:00
Yong Tang
7feb2a17e4 Fix docker exec -u issue after docker daemon restart
This fix tries to address the issue raised in 29342 where
`docker exec -u` after docker daemon restart returns an error:
```
unable to find user test: no matching entries in passwd file
```

The reason was that `container.BaseFS` is not present after restart.

This fix adds the `daemon.Mount` during the restore to bring up the
`container.BaseFS`.

An integration test has been added to cover the changes.

This fix fixes 29342.

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
2016-12-13 22:36:30 -08:00
Tibor Vass
98fef1cb0b Merge pull request #29374 from mavenugo/exp
Add the missing experimental ipvlan network driver
2016-12-13 20:03:24 -08:00
Tibor Vass
af50cefe6c Merge pull request #29008 from cpuguy83/refcount_graphdriver
Refcount graphdriver plugins properly
2016-12-13 19:24:46 -08:00
Madhu Venugopal
b0eef4e427 Pass daemon experiemental flag to libnetwork
Required to enable ipvlan experimental network driver

Signed-off-by: Madhu Venugopal <madhu@docker.com>
2016-12-13 14:22:54 -08:00
allencloud
0270645c13 return not a swarm when unlock
Signed-off-by: allencloud <allen.sun@daocloud.io>
2016-12-13 10:38:45 +08:00
Victor Vieux
96a84ed85a Merge pull request #29130 from cyphar/29097-dynamically-reload-apparmor
daemon: switch to 'ensure' workflow for AppArmor profiles
2016-12-12 13:32:36 -08:00
Vincent Demeester
04f7a03359
Move templates to pkg/templates
Signed-off-by: Vincent Demeester <vincent@sbr.pm>
2016-12-12 09:34:03 +01:00
Vincent Demeester
ce37550347
Move debug functions to cli/debug package
Signed-off-by: Vincent Demeester <vincent@sbr.pm>
2016-12-12 09:33:58 +01:00
Yong Tang
4d958e99c1 Fix missing IPAM options in swarm network mode
This fix tries to fix the issue raised in 29044 where
the IPAM options is missing in swarm network mode
after the service is deployed. Before the service
is deployed, the IPAM options is available.

The reason for the issue is that, before service is
deployed, `network inspect` is querying the swarm and
obtained the correct information.
However, after service is deployed, swarm executor
does not pass the IPAM options to the backend (daemon).
Also after service is deployed, `network inspect` is
actually querying the local daemon for information.
At this time the network information with missing IPAM
options is returned.

This fix fixes the issue by updating the swarm network
allocator and swarm executor.

A separate PR for swarmkit will be opened.

An integration test has been added to cover the change.

This fix fixes 29044.

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
2016-12-10 09:29:50 -08:00
Brian Goff
f29bbd16f5 Refcount graphdriver plugins properly
Adds 2 new methods to v2 plugin `Acquire` and `Release` which allow
refcounting directly at the plugin level instead of just the store.
Since a graphdriver is initialized exactly once, and is really managed
by a separate object, it didn't really seem right to call
`getter.Get()` to refcount graphdriver plugins.
On shutdown it was particularly weird where we'd either need to keep a
driver reference in daemon, or keep a reference to the pluggin getter in
the layer store, and even then still store extra details on if the
graphdriver is a plugin or not.

Instead the plugin proxy itself will handle calling the neccessary
refcounting methods directly on the plugin object.

Also adds a new interface in `plugingetter` to account for these new
functions which are not going to be implemented by v1 plugins.

Changes terms `plugingetter.CREATE` and `plugingetter.REMOVE` to
`ACQUIRE` and `RELEASE` respectively, which seems to be better
adjectives for what we're doing.

Signed-off-by: Brian Goff <cpuguy83@gmail.com>
2016-12-09 19:46:28 -05:00
Sebastiaan van Stijn
e94a40cdda Merge pull request #29041 from aaronlehmann/hide-updatestatus
api: Hide UpdateStatus when it is not present
2016-12-08 13:55:13 +01:00
Sebastiaan van Stijn
fee2bb2682 Merge pull request #29144 from yongtang/29129-hostname-in-host-mode
Fix issue for `--hostname` when running in "--net=host"
2016-12-08 12:57:53 +01:00
Michael Crosby
a42ca21f50 Merge pull request #29200 from coolljt0725/fix_attach
fix #29199, reset container if container start failed
2016-12-07 15:21:28 -08:00
Lei Jitang
e806821b53 fix #29199, reset container if container start failed
Signed-off-by: Lei Jitang <leijitang@huawei.com>
2016-12-07 01:37:08 -05:00
allencloud
7bdd1a4f9c not export errors and forbid leave when unlocked
Signed-off-by: allencloud <allen.sun@daocloud.io>
2016-12-07 13:25:34 +08:00
Aleksa Sarai
567ef8e785
daemon: switch to 'ensure' workflow for AppArmor profiles
In certain cases (unattended upgrades), system services can disable
loaded AppArmor profiles. However, since /etc being read-only is a
supported setup we cannot just write a copy of the profile to
/etc/apparmor.d.

Instead, dynamically load the docker-default AppArmor profile if a
container is started with that profile set. This code will short-cut if
the profile is already loaded.

Fixes: 2f7596aaef ("apparmor: do not save profile to /etc/apparmor.d")
Signed-off-by: Aleksa Sarai <asarai@suse.de>
2016-12-07 08:47:28 +11:00
Tõnis Tiigi
eefbf1ddd3 Merge pull request #28907 from tonistiigi/cluster-refactor
Switch cluster locking strategy
2016-12-06 10:02:23 -08:00
Yong Tang
b0a7b0120f Fix issue for --hostname when running in "--net=host"
This fix tries to address the issue raised in 29129 where
"--hostname" not working when running in "--net=host" for
`docker run`.

The fix fixes the issue by not resetting the `container.Config.Hostname`
if the `Hostname` has already been assigned through `--hostname`.

An integration test has been added to cover the changes.

This fix fixes 29129.

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
2016-12-06 07:29:45 -08:00
Vincent Demeester
745795ef2e Merge pull request #28535 from yongtang/28497-prune-until
Convert DanglingOnly to Filters for `docker image prune`
2016-12-06 11:03:45 +01:00
Akihiro Suda
e8a2c7196a Merge pull request #28939 from duglin/HideDupWarnings
Only show global warnings once
2016-12-06 16:12:34 +09:00
Aleksa Sarai
e440a57a79
apparmor: switch IsLoaded to return bool
Signed-off-by: Aleksa Sarai <asarai@suse.de>
2016-12-06 00:10:08 +11:00
Yong Tang
a6be56b54e Convert DanglingOnly to Filters for docker image prune
This fix convert DanglingOnly in ImagesPruneConfig to Filters,
so that it is possible to maintain API compatibility in the future.

Several integration tests have been added to cover changes.

This fix is related to 28497.

A follow up to this PR will be done once this PR is merged.

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
2016-12-02 20:08:49 -08:00
Brian Goff
3cb310c210 Merge pull request #28988 from vdemeester/28985-dont-validate-hostname
Remove hostname validation as it seems to break users
2016-12-02 21:16:56 -05:00
Alexander Morozov
0fb0d67008 Merge pull request #29075 from cpuguy83/29070_fix_tmpfs_opts
Fix issue where TmpfsOptions are not sent to swarm
2016-12-02 13:40:20 -08:00
Alexander Morozov
6e023ac748 Merge pull request #29039 from thaJeztah/fix-restart-limit-validation
Fix restartpolicy max-retry validation
2016-12-02 09:19:54 -08:00
Brian Goff
a5b3649bfa Fix issue where TmpfsOptions are not sent to swarm
Signed-off-by: Brian Goff <cpuguy83@gmail.com>
2016-12-02 11:43:47 -05:00
Sebastiaan van Stijn
9db5d649ae
Fix restartpolicy max-retry validation
the restart policy validation was moved from
the client to the daemon in 94e95e4711

As part of that change, retry-counts < 1
were marked as "invalid".

However, the default is 0 (unlimited), causing

    docker run -d --restart=on-failure nginx

To fail.

This changes the validation to only invalidate
retry-counts < 0.

A test was added, and other tests renamed
to allow running just these tests :)

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2016-12-02 02:39:16 +01:00
Aaron Lehmann
0e70d96a68 api: Hide UpdateStatus when it is not present
When UpdateStatus was not present, the empty values of the timestamps
would be present:

        "UpdateStatus": {
            "StartedAt": "0001-01-01T00:00:00Z",
            "CompletedAt": "0001-01-01T00:00:00Z"
        }

To fix this, make the timestamps pointers, so they can be set to nil
when they should not be shown.

Also make UpdateStatus itself a pointer, so an empty object does not
show up when there is no UpdateStatus.

Signed-off-by: Aaron Lehmann <aaron.lehmann@docker.com>
2016-12-01 15:08:41 -08:00
Justin Cormack
a756c1ac65 Merge pull request #28996 from Microsoft/jjh/sqlite-remove-windows
Windows: Factor out sqlite
2016-12-01 13:56:11 -08:00
John Howard
3f6127b173 Windows: Factor out sqlite
Signed-off-by: John Howard <jhoward@microsoft.com>
2016-12-01 09:38:08 -08:00
Tonis Tiigi
b7ea1bdb02 Switch cluster locking strategy
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2016-11-30 14:59:12 -08:00
Alexander Morozov
6151ad19ad Merge pull request #28797 from miaoyq/fix-a-err-of-logger
Fix a error of the function 'CopyMessage' in 'daemon/logger/logger.go'
2016-11-30 13:27:40 -08:00
Ahmed Kamal
4addda3f07 zfs: expose mountpoint/dataset on inspection
Signed-off-by: Ahmed Kamal <email.ahmedkamal@googlemail.com>
2016-11-30 23:20:42 +02:00
Vincent Demeester
6367c67ab7 Merge pull request #28487 from cpuguy83/stack_dumps
Move stack dump dir to exec root
2016-11-30 20:01:29 +01:00
Vincent Demeester
ef39256dfb
Remove hostname validation as it seems to break users
Validation is still done by swarmkit on the service side.

Signed-off-by: Vincent Demeester <vincent@sbr.pm>
2016-11-30 19:22:07 +01:00
Anusha Ragunathan
9c2f1669a0 Merge pull request #28965 from cpuguy83/move_plugin_shutdown
Move plugin shutdown after layerstore shtudown
2016-11-30 10:15:49 -08:00
Doug Davis
ff42a2eb41 Only show global warnings once
Upon each container create I'm seeing these warning **every** time in the
daemon output:
```
WARN[0002] Your kernel does not support swap memory limit
WARN[0002] Your kernel does not support cgroup rt period
WARN[0002] Your kernel does not support cgroup rt runtime
```
Showing them for each container.create() fills up the logs and encourages
people to ignore the output being generated - which means its less likely
they'll see real issues when they happen.  In short, I don't think we
need to show these warnings more than once, so let's only show these
warnings at daemon start-up time.

Signed-off-by: Doug Davis <dug@us.ibm.com>
2016-11-30 10:11:42 -08:00
Doug Davis
4a0e295cd1 Merge pull request #28725 from Microsoft/jjh/builderenvcaseinsensitive
Windows: Builder case insensitive env
2016-11-30 08:33:29 -05:00
Vincent Demeester
768f4ce02b Merge pull request #28899 from aaronlehmann/dont-pull-image-id
Don't resolve or pull images referenced by ID
2016-11-30 10:08:43 +01:00
Brian Goff
4b400ecc4d Move plugin shutdown after layerstore shtudown
This ensures that graphdriver plugins can properly cleanup on daemon
exit.
Also prevents errors during shutdown when it tries to send the plugin a
`Cleanup()` request but ultimately times out since it's already been
shutdown.

Signed-off-by: Brian Goff <cpuguy83@gmail.com>
2016-11-29 20:00:02 -05:00
Madhu Venugopal
4fae94f663 Merge pull request #28721 from dongluochen/attachable_network
Fix network attachable option
2016-11-29 11:04:49 -08:00
Sebastiaan van Stijn
492bc8eb45 Merge pull request #28905 from jlhawn/reject_unspecified_advertise_addr
Reject unspecified advertise addr on swarm init
2016-11-29 16:24:45 +01:00
Sebastiaan van Stijn
209c6a419a Merge pull request #28935 from likel/improve-style
Initialize field with name
2016-11-29 15:52:13 +01:00
Ke Li
da6944ec87 Initialize field with name
Signed-off-by: Ke Li <kel@splunk.com>
2016-11-29 19:36:56 +08:00
Aaron Lehmann
9dba9e3248 cluster: Refuse swarm spec not named "default"
If, using the API, a user submits an init request with a spec that has a
name other than "default", the engine will rename the "default" cluster
object. Some parts of swarmkit depend on having a cluster object named
"default". Reject any specs that use other names.

Signed-off-by: Aaron Lehmann <aaron.lehmann@docker.com>
2016-11-28 17:19:29 -08:00
Dong Chen
abcb699ad1 Fix network attachable option.
Signed-off-by: Dong Chen <dongluo.chen@docker.com>
2016-11-28 16:54:56 -08:00
Josh Hawn
eeac871946 Reject unspecified advertise addr on swarm init
Docker-DCO-1.1-Signed-off-by: Josh Hawn <josh.hawn@docker.com> (github: jlhawn)
2016-11-28 15:44:06 -08:00
Aaron Lehmann
089842c4b4 Don't resolve or pull images referenced by ID
If a swarm service is created using an image ID, it's useless to try to
pull this reference or resolve it to a manifest digest. Avoid doing this
when a fully qualified image ID is given.

Signed-off-by: Aaron Lehmann <aaron.lehmann@docker.com>
2016-11-28 13:53:52 -08:00
John Howard
49f392ff6b Windows: Builder case insensitive env
Signed-off-by: John Howard <jhoward@microsoft.com>
2016-11-28 10:30:45 -08:00
Doug Davis
937027a0cb Merge pull request #28514 from Microsoft/jjh/workdir
Refix COPY file . after WORKDIR (now always created)
2016-11-28 12:58:17 -05:00
Antonio Murdaca
76a0dfaa8e Merge pull request #28710 from miaoyq/eliminate-redundant-parameters
Eliminate the redundant parameter
2016-11-26 14:37:17 +01:00
Antonio Murdaca
022c13271b Merge pull request #28829 from lixiaobing10051267/masterDaemon
check typos and fix in daemon directory
2016-11-26 14:33:09 +01:00
lixiaobing10051267
cf4f5b4771 check typos and fix in daemon directory
Signed-off-by: lixiaobing10051267 <li.xiaobing1@zte.com.cn>

Signed-off-by: lixiaobing10051267 <li.xiaobing1@zte.com.cn>
2016-11-26 17:23:21 +08:00
Justin Cormack
cd5c8e9c2d Fix grammar on error message
Signed-off-by: Justin Cormack <justin.cormack@docker.com>
2016-11-25 14:58:20 +00:00
Sebastiaan van Stijn
e026f80a4d Merge pull request #28759 from miaoyq/optimization-context-name1
Optimize the function 'Context.Name()' and replace 'Context.Container…
2016-11-25 13:25:17 +01:00
Justin Cormack
8602d97835 Merge pull request #28804 from bfirsh/better-service-network-overlay-error-message
Improve error when connecting service to network
2016-11-24 09:06:51 -08:00
Ben Firshman
70acb89fa2
Improve error when connecting service to network
The error didn't hint at how to resolve it. Google auto-suggest
also implies that people have been Googling this error.

Signed-off-by: Ben Firshman <ben@firshman.co.uk>
2016-11-24 14:43:24 +00:00
Yanqiang Miao
3b82eac65f Fix a error of the function 'CopyMessage' in 'daemon/logger/logger.go'
Signed-off-by: Yanqiang Miao <miao.yanqiang@zte.com.cn>

add a test for 'CopyMessage'

Signed-off-by: Yanqiang Miao <miao.yanqiang@zte.com.cn>

update

Signed-off-by: Yanqiang Miao <miao.yanqiang@zte.com.cn>
2016-11-24 20:08:54 +08:00
Yanqiang Miao
52fd6e4664 Optimize the function 'Context.Name()' and replace 'Context.ContainerName' that need to remove slash with 'Context.Name()'.
Signed-off-by: Yanqiang Miao <miao.yanqiang@zte.com.cn>

update

Signed-off-by: Yanqiang Miao <miao.yanqiang@zte.com.cn>

update

Signed-off-by: Yanqiang Miao <miao.yanqiang@zte.com.cn>
2016-11-24 09:24:29 +08:00
Yong Tang
c90ec05175 Restrict checkpoint name to prevent directory traversal
This fix tries to address the issue raised in 28769 where
checkpoint name was not checked before passing to containerd.
As a result, it was possible to use a special checkpoint name
to get outside of the container's directory.

This fix add restriction `[a-zA-Z0-9][a-zA-Z0-9_.-]+` (`RestrictedNamePattern`).
This is the same as container name restriction.

This fix fixes 28769.

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
2016-11-23 13:23:07 -08:00
John Howard
286ab6d69b COPY file . after WORKDIR (now always created)
Signed-off-by: John Howard <jhoward@microsoft.com>
2016-11-23 09:56:02 -08:00
Antonio Murdaca
30b8712e93
daemon: remove not needed unmarshal
Signed-off-by: Antonio Murdaca <runcom@redhat.com>
2016-11-23 12:53:25 +01:00
Yanqiang Miao
58028a2919 Eliminate redundant parameters
Signed-off-by: Yanqiang Miao <miao.yanqiang@zte.com.cn>

update

Signed-off-by: Yanqiang Miao <miao.yanqiang@zte.com.cn>
2016-11-23 09:28:13 +08:00
Tõnis Tiigi
5c1826ec4d Merge pull request #28683 from darrenstahlmsft/SystemDLL
Swap usage of LazyDLL and LoadDLL to LazySystemDLL
2016-11-22 16:58:30 -08:00