Commit Graph

3928 Commits

Author SHA1 Message Date
894a7b4b95 Convert dockerd to use cobra and pflag
Signed-off-by: Daniel Nephin <dnephin@docker.com>
Upstream-commit: fb83394714a9797f8ca5a08023a89560ce6c4aa3
Component: engine
2016-08-25 13:09:03 -04:00
385734b9bc Merge pull request #24153 from frodenas/syslog-fix
Syslog Driver: RFC 5425 Message Framing should be used only when protocol is TCP+TLS
Upstream-commit: 15f3d060ace45384ed5f549eecf2bc8919a82f7f
Component: engine
2016-08-25 12:15:06 -04:00
a0d759f31d Merge pull request #25786 from splunk/splunk-logging-driver-raw-format-using-json
Splunk Logging Driver: formats and verifyconnection
Upstream-commit: 78771b62255456bef110a3e310eb20165e5ece9f
Component: engine
2016-08-25 09:12:31 -07:00
84a36bbfd3 Merge pull request #24073 from johnharris85/move-restart-policy-check-to-daemon
Move restart-policy validation from client to daemon.
Upstream-commit: d13ad3ef7684bf330cec2eaa4a14048e3fbc2d94
Component: engine
2016-08-25 17:02:30 +02:00
33b0fc15a4 Merge pull request #25920 from coolljt0725/fix_inspect_dead
Fix inspect Dead container
Upstream-commit: 8ebb7dba8b25ff3a418791b2df8e3add2b40a669
Component: engine
2016-08-25 17:00:59 +02:00
96297e96b5 Merge pull request #25933 from dtrott/25932-container-name
Added the word "container" to clarify the error message.
Upstream-commit: 4844d13bd73bbd35a548d3121d3d87844469b013
Component: engine
2016-08-24 16:15:10 -04:00
598c701bb9 Merge pull request #25959 from estesp/fail-on-graphdir-perms
Don't start daemon in userns mode if graphdir inaccessible
Upstream-commit: 4a1b048c1539ca67c8be5fd3d12fe10f65ee600e
Component: engine
2016-08-24 20:15:58 +02:00
b5333a8cfd Don't start daemon in userns mode if graphdir inaccessible
Warn the user and fail daemon start if the graphdir path has any
elements which will deny access to the remapped root uid/gid.

Docker-DCO-1.1-Signed-off-by: Phil Estes <estesp@linux.vnet.ibm.com>
Upstream-commit: 43a1df6be2fa0c76b521680bbd5dc84db2cfd898
Component: engine
2016-08-24 11:25:30 -04:00
de8125122b daemon: no map[string]bool from GetNetworkDriverList
No user of GetNetworkDriverList needs to access the map by key.
The only user of GetNetworkDriverList is in docker info and with a map
the network list is always flipping because loop is not deterministic.
Fix this by returning a string slice which instead is.

Signed-off-by: Antonio Murdaca <runcom@redhat.com>
Upstream-commit: 7ca635a1ec2962358a5f7d3c021faca83ff5e55f
Component: engine
2016-08-24 16:02:15 +02:00
3a11a917d1 Fix issue in docker stats with NetworkDisabled=true
This fix tries to address the issue in 25000 where `docker stats`
will not show network stats with `NetworkDisabled=true`.

The `NetworkDisabled=true` could be either invoked through
remote API, or through `docker daemon -b none`.

The issue was that when `NetworkDisabled=true` either by API or
by daemon config, there is no SandboxKey for container so an error
will be returned.

This fix fixes this issue by skipping obtaining SandboxKey if
`NetworkDisabled=true`.

Additional test has bee added to cover the changes.

This fix fixes 25000.

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
Upstream-commit: 7bb9c5397e69866fcb1142cda430b842a710f751
Component: engine
2016-08-23 16:04:06 -07:00
6aa95ab9d1 Merge pull request #25833 from tonistiigi/update-swarmkit
vendor: update swarmkit to 8a761950f
Upstream-commit: 251bc2bcd74b5899c77a620870d08e6820c4047e
Component: engine
2016-08-22 19:36:44 -07:00
1003bf4b18 Fix inspect Dead container
Signed-off-by: Lei Jitang <leijitang@huawei.com>
Upstream-commit: c35186b0b906dbda224d94c37794022762fcb374
Component: engine
2016-08-22 22:09:25 -04:00
c24691321a Added the word "container" to clarify the error message.
Signed-off-by: David Trott <github@davidtrott.com>
Upstream-commit: c9d0a77657ccc3be144ed4de12d43c8cfcca8590
Component: engine
2016-08-22 13:41:17 -07:00
c2e95ee295 Merge pull request #25824 from dmcgowan/overlay2-make-faster
Avoid fork on mount for overlay2 in common case
Upstream-commit: 2e1a5942374fac33b2b2546e2779f1475693844f
Component: engine
2016-08-22 13:02:22 -07:00
670946bf76 Avoid fork on mount for overlay2 in common case
In the common case where the user is using /var/lib/docker and
an image with less than 60 layers, forking is not needed. Calculate
whether absolute paths can be used and avoid forking to mount in
those cases.

Signed-off-by: Derek McGowan <derek@mcgstyle.net> (github: dmcgowan)
Upstream-commit: c13a985fa1196a5ed782d5ac68a4bbb68dd529ca
Component: engine
2016-08-22 11:43:10 -07:00
32e409f5b7 Update executor changes from swarmkit
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
Upstream-commit: 96a27cf0931974b602acfdd74dfcc5142500c7ba
Component: engine
2016-08-22 11:36:20 -07:00
daeb1250d3 Merge pull request #25872 from coolljt0725/fix_25870
Persist pause state to disk to support container live restore
Upstream-commit: 374caa98d8a1aac01478c1d9b69f9cf13874f1b3
Component: engine
2016-08-22 12:18:01 -04:00
17b771a0a4 Merge pull request #25889 from vdemeester/refactoring-reachable-lisibility
Make reachable/unreachable condition more readable
Upstream-commit: 43640a890f7f271b5dbcdd076948171336635b21
Component: engine
2016-08-22 11:10:03 -04:00
3ab26843b3 Make reachable/unreachable condition more readable
Introducing methods to make the intent of the condition clearer to the
eyes of the reader 👼.

Signed-off-by: Vincent Demeester <vincent@sbr.pm>
Upstream-commit: 82a451bc94729b0dc2cc0ca94be60de70154f1c2
Component: engine
2016-08-19 22:49:58 +02:00
165357a3a8 Persist pause state to disk to support container live restore
Signed-off-by: Lei Jitang <leijitang@huawei.com>
Upstream-commit: f4bbfc34ce1785863dcdea44c981f6532c5e2860
Component: engine
2016-08-19 05:32:33 -04:00
a603b90d7f Add --force in docker volume rm to fix out-of-band volume driver deletion
This fix tries to address the issue in raised #23367 where an out-of-band
volume driver deletion leaves some data in docker. This prevent the
reuse of deleted volume names (by out-of-band volume driver like flocker).

This fix adds a `--force` field in `docker volume rm` to forcefully purge
the data of the volume that has already been deleted.

Related documentations have been updated.

This fix is tested manually with flocker, as is specified in #23367.
An integration test has also been added for the scenario described.

This fix fixes #23367.

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
Upstream-commit: 6c5c34d50d377d1c5318a255240fb2dc9c23cf92
Component: engine
2016-08-18 18:01:25 -07:00
3029b07f3e Splunk Logging Driver: PR feedback
Signed-off-by: Denis Gladkikh <denis@gladkikh.email>
Upstream-commit: 9407322972a93fa5a47436a8a9f0133b49806e6c
Component: engine
2016-08-18 09:17:06 -07:00
46a42da7e0 Merge pull request #25785 from WeiZhang555/fix-flaky-external-volume-driver
bugfix: report "destroy" after all volumes of container destroy
Upstream-commit: 3cebff8b869d2720b12618ef5bff22fa4f0fd4a6
Component: engine
2016-08-18 09:58:54 +02:00
6c683fac48 Replace old oci specs import with runtime-specs
Fixes #25804

The upstream repo changed the import paths.

Signed-off-by: Michael Crosby <crosbymichael@gmail.com>
Upstream-commit: 041e5a21dc0a8856448e3a9ad91e8535b8a7d00d
Component: engine
2016-08-17 09:38:34 -07:00
a410528fcc Merge pull request #25771 from mrunalp/allow_host_ns_with_user
Allow using --pid=host and --net=host when --userns=host
Upstream-commit: 3473980a295067c8a265feff83be2ee306afaceb
Component: engine
2016-08-17 09:57:30 -04:00
e85d8b261b Splunk Logging Driver: formats and verifyconnection
`--log-opt splunk-format=inline|json|raw` allows to change how logging
driver sends data to Splunk, where

`inline` - default value, format used before, message is injected as a
line in JSON payload
`json` - driver will try to parse each line as a JSON object and embed it
inside of the JSON payload
`raw` - driver will send Raw payload instead of JSON, tag and attributes
will be prefixed before the message

`--log-opt splunk-verify-connection=true|false` - allows to skip
verification for Splunk Url

Signed-off-by: Denis Gladkikh <denis@gladkikh.email>
Upstream-commit: 603fd0831513257bc26d20ca1f64efcc4965eae6
Component: engine
2016-08-16 21:45:16 -07:00
bf5e17ead0 bugfix: report "destroy" after all volumes of container destroy
fixes #25766

If a container's AutoRemove is enabled, client will wait until it's
removed after container exits, this is implemented based on "destroy"
event.

Currently an "AutoRemove" container will report "destroy" event to
notify a hanging client to exit before all volumes are removed, this is
wrong, we should wait container until everything is cleaned up.

Signed-off-by: Zhang Wei <zhangwei555@huawei.com>
Upstream-commit: 4df77c11e065bf96b04fc0328a7e7600a2e64937
Component: engine
2016-08-17 11:02:16 +08:00
a0933c7d27 Merge pull request #25721 from cpuguy83/revendor_engine-api
revendor engine-api
Upstream-commit: 37302bbb3f4889e9de2a95d5ea018acdab9e4447
Component: engine
2016-08-16 17:18:43 -04:00
d2ee183037 Allow using --pid=host and --net=host when --userns=host
It is safe to set other namespaces to host when user ns is set to host

Signed-off-by: Mrunal Patel <mrunalp@gmail.com>
Upstream-commit: 3c3d2bf85229f9ca4879a24072762477e96c4344
Component: engine
2016-08-16 14:16:14 -07:00
3dcc0abf19 revendor engine-api
Signed-off-by: Brian Goff <cpuguy83@gmail.com>
Upstream-commit: 6d98e344c7702a8a713cb9e02a19d83a79d3f930
Component: engine
2016-08-16 14:16:12 -04:00
0f2f3d0378 Merge pull request #25746 from lixiaobing10051267/masterName
wrong id when testing exists in daemon aufs
Upstream-commit: d7753dceb814e92c20a067df51fd231fe2d0fda9
Component: engine
2016-08-16 13:00:03 -04:00
060a7d7824 wrong id when testing exists in daemon aufs
Signed-off-by: lixiaobing10051267 <li.xiaobing1@zte.com.cn>
Upstream-commit: cdb6c59eda4e78d626721a6a38fd305a6d2c50f3
Component: engine
2016-08-16 16:42:45 +08:00
cc5b6aa3dd Don't create devices if in a user namespace
If we are running in a user namespace, don't try to mknod as
it won't be allowed.  libcontainer will bind-mount the host's
devices over files in the container anyway, so it's not needed.

The chrootarchive package does a chroot (without mounting /proc) before
its work, so we cannot check /proc/self/uid_map when we need to.  So
compute it in advance and pass it along with the tar options.

Signed-off-by: Serge Hallyn <serge.hallyn@ubuntu.com>
Upstream-commit: 617c352e9225b1d598e893aa5f89a8863808e4f2
Component: engine
2016-08-12 16:26:58 -04:00
05ad7877f1 Merge pull request #24814 from samuelkarp/awslogs
awslogs: Record log line insert order for sorting
Upstream-commit: c6e3818dd11a19b8385e62ed244c0c4e4e75fc89
Component: engine
2016-08-12 15:51:06 -04:00
0cdcb92bda Merge pull request #22208 from msabansal/staticip
Enabling specifying static ip for predefined network on windows
Upstream-commit: 5632768a0f5237ca63275a193266389b7cabcb3b
Component: engine
2016-08-12 11:39:25 -07:00
e8a6674a00 Merge pull request #25635 from dperny/rate-limit-swarm-pull-log
Rate limit logspam during docker service pulls
Upstream-commit: b0431d63dca1573d66624dd67230bf0d9c8ef623
Component: engine
2016-08-12 13:06:39 -04:00
c49627f859 Merge pull request #25628 from cpuguy83/carry_21567_filter_vol_by_label
Carry 21567 filter vol by label
Upstream-commit: be045ee2da7c2c83e859d86cb496e86ec6de8566
Component: engine
2016-08-12 09:43:45 -07:00
1dbc55e6ff Merge pull request #25509 from Microsoft/jjh/23079
Windows: Block ReFS file systems
Upstream-commit: 34cc19f6702c23b2ae4aad2b169ca64154404f9f
Component: engine
2016-08-12 09:32:22 -07:00
95f97c43df Rate limit logspam during docker service pulls
During image pulls on docker service create, logs will only show status
updates and updates every 1 second on long-running actions like
downloading and extracting. Adds golang.org/x/time/rate as dependency.

Ports docker/swarmkit#1352 to docker/docker.

Signed-off-by: Drew Erny <drew.erny@docker.com>
Upstream-commit: fa0054a3eb0363526d34fb4ac912cab30044f3d7
Component: engine
2016-08-11 14:56:38 -07:00
6b32efbe7a Carry #21567
Use `LabeledVolume` interface type instead of manual interface.

Signed-off-by: Brian Goff <cpuguy83@gmail.com>
Upstream-commit: 6d787dae1ae3cd4f2ca062b67592158597f9d40e
Component: engine
2016-08-11 13:47:01 -04:00
29b14d83fb Add label filter support for volume
Since we added labels for volume, it is desired to have
filter support label for volume

Closes: #21416
Signed-off-by: Kai Qiang Wu(Kennan) <wkqwu@cn.ibm.com>
Upstream-commit: 1a72934cd5cb369f75e7bd5714eb579a053b95a9
Component: engine
2016-08-11 13:08:04 -04:00
28fcc3f1f9 Update executor fixes from swarmkit
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
Upstream-commit: 5673c53417d689704ca7b5715f5c4d549fdf710c
Component: engine
2016-08-10 13:27:38 -07:00
db498d9dca Merge pull request #25550 from mrjana/net
Retry creating dynamic networks if not found
Upstream-commit: 92b10b497cf272f8fd307e2e6cc1f27199f132cd
Component: engine
2016-08-10 11:52:56 -07:00
cb1c855c27 Merge pull request #23951 from allencloud/defer-os-file-close
add defer file.Close to avoid potential fd leak
Upstream-commit: 64605d709f9bf5677d513d6ed78d63fffadc697d
Component: engine
2016-08-10 11:07:15 -07:00
1c502571ef add defer file.Close to avoid potential fd leak
Signed-off-by: allencloud <allen.sun@daocloud.io>
Upstream-commit: 0ead624473b6bddc232b46bc7c76ab4f9c743ff5
Component: engine
2016-08-10 08:36:09 +08:00
1ea11295f3 Retry creating dynamic networks if not found
In cases there are failures in task start, swarmkit might be trying to
restart the task again in the same node which might keep failing. This
creates a race where when a failed task is getting removed it might
remove the associated network while another task for the same service
or a different service but connected to the same network is proceeding
with starting the container knowing that the network is still
present. Fix this by reacting to `ErrNoSuchNetwork` error during
container start by trying to recreate the managed networks. If they
have been removed it will be recreated. If they are already present
nothing bad will happen.

Signed-off-by: Jana Radhakrishnan <mrjana@docker.com>
Upstream-commit: 117cef5e9766d6ba228770c225e816c6afd16ff8
Component: engine
2016-08-09 13:37:11 -07:00
fe7b1d72f0 Merge pull request #23391 from Microsoft/WindowsSandboxSize
Windows: Added support for storage-opt size
Upstream-commit: 04e021d7511fcfdc0838a0165f70a4772c0e7718
Component: engine
2016-08-09 15:34:39 +02:00
a4fc4e13d8 Windows: Block ReFS file systems
Signed-off-by: John Howard <jhoward@microsoft.com>
Upstream-commit: 1cb9e9b44e7140d14dd42d48b2a7c038b65e8f16
Component: engine
2016-08-08 14:30:37 -07:00
b2d7ec8107 Merge pull request #20848 from WeiZhang555/move-rm-to-daemon
Move --rm to daemon side
Upstream-commit: 31e3970394998547d64e1220bd437a4c9c1061e3
Component: engine
2016-08-08 22:11:06 +02:00
0d2b77587c fix validation of non-existing bind-mount source
Unlike `docker run -v..`, `docker service create --mount`
does not allow bind-mounting non-existing host paths.

This adds validation for the specified `source`, and
produces an error if the path is not found on the
host.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: 84d5ab96ef33355e65f5c31210eb1777db372c52
Component: engine
2016-08-08 17:24:00 +02:00