Commit Graph

35 Commits

Author SHA1 Message Date
d359ab9e02 Added an apparmorEnabled boolean in the Daemon struct to indicate if AppArmor is enabled or not. It is set in NewDaemon using sysInfo information.
Signed-off-by: Roberto Muñoz Fernández <robertomf@gmail.com>

Added an apparmorEnabled boolean in the Daemon struct to indicate if AppArmor is enabled or not. It is set in NewDaemon using sysInfo information.

Signed-off-by: Roberto Muñoz Fernández <robertomf@gmail.com>

gofmt'd

Signed-off-by: Roberto Muñoz Fernández <robertomf@gmail.com>

change the function name to something more adequate and changed the behaviour to show empty value on an apparmor disabled system.

Signed-off-by: Roberto Muñoz Fernández <robertomf@gmail.com>

go fmt

Signed-off-by: Roberto Muñoz Fernández <robertomf@gmail.com>
Upstream-commit: d97a00dfd5ec884a98e087b1fc6e705459ca81e9
Component: engine
2017-01-30 16:23:23 +01:00
1296feade8 Windows: Graph driver implementation
Signed-off-by: John Howard <jhoward@microsoft.com>
Upstream-commit: 52f4d09ffb376ffaa6677cb1e0413c6a97f53f24
Component: engine
2015-07-10 14:33:11 -07:00
4d0125faee Fix regression in parsing capabilities list when a single string is given
Signed-off-by: Antonio Murdaca <runcom@linux.com>
Upstream-commit: 10a3061c5f342477703e96d9b8b2e877d9cdddf5
Component: engine
2015-07-01 21:28:02 +02:00
7f87043716 Merge pull request #14294 from mavenugo/bnone
fixed incorrect assumption on --bridge=none treated as disable network
Upstream-commit: a2621ac6dacf87bf713ac327f7c0e14eb77e52bc
Component: engine
2015-06-30 13:40:52 -07:00
521162c904 fixed incorrect assumption on --bridge=none treated as disable network
libnetwork host, none and bridge driver initialization is incorrectly
disabled if the daemon flag --bridge=none. The expected behavior of
setting --bridge as none is to disable the bridge driver alone and let
all other modes to be operational.

Signed-off-by: Madhu Venugopal <madhu@docker.com>
Upstream-commit: c9328c6ccf120abda297d11fcfc7e60c7c31ec21
Component: engine
2015-06-30 13:04:28 -07:00
9161e24479 Move /nat to /pkg/nat
By convention /pkg is safe to use from outside the docker tree, for example
if you're building a docker orchestrator.

/nat currently doesn't have any dependencies outside of /pkg, so it seems
reasonable to move it there.

This rename was performed with:

```
gomvpkg -vcs_mv_cmd="git mv {{.Src}} {{.Dst}}" \
	-from github.com/docker/docker/nat \
        -to   github.com/docker/docker/pkg/nat

```

Signed-off-by: Peter Waller <p@pwaller.net>
Upstream-commit: 9c2374d19623581028f070bc93fa4c60a660dce4
Component: engine
2015-06-30 17:43:17 +01:00
5ec67f98b1 Fix endpoint leave failure for --net=host mode
When a container is started with `--net=host` with
a particular name and it is subsequently destroyed,
then all subsequent creations of the container with
the same name will fail. This is because in `--net=host`
the namespace is shared i.e the host namespace so
trying to destroy the host namespace by calling
`LeaveAll` will fail and the endpoint is left with
the dangling state. So the fix is, for this mode, do
not attempt to destroy the namespace but just cleanup
the endpoint state and return.

Signed-off-by: Jana Radhakrishnan <mrjana@docker.com>
Upstream-commit: 9bb69f9726e7f8cba0cdf681e5060e47b9c45298
Component: engine
2015-06-24 12:33:52 -07:00
058521db69 Adding container to secondary network to support port mapping
With publish-service and default-network support, a container could be
connected to a user-defined network that is backed by any driver/plugin.
But if the user uses port mapping or expose commands, the expectation
for that container is to behave like existing bridge network.
Thanks to the Libnetwork's CNM model, containers can be connected
to the bridge network as a secondary network in addition to the
user-specified network.

Signed-off-by: Madhu Venugopal <madhu@docker.com>
Upstream-commit: 739996c1d78976f7435c7274300b3e8f2e598b17
Component: engine
2015-06-22 04:15:57 -07:00
ef111c5452 Reworked ReleaseNetwork to make use of libnetwork's new LeaveAll API
Signed-off-by: Madhu Venugopal <madhu@docker.com>
Upstream-commit: 1e59169509449e2e9e4c7cd6aec7e29c1673123f
Component: engine
2015-06-22 04:15:57 -07:00
4a5258148d Vendoring in libnetwork for native multihost networking
- brings in vxlan based native multihost networking
- added a daemon flag required by libkv for dist kv operations
- moved the daemon flags to experimental

Signed-off-by: Madhu Venugopal <madhu@docker.com>
Upstream-commit: 508065a7adc84e5e63f47b00c379dad6a79d3c5e
Component: engine
2015-06-22 04:15:41 -07:00
cb3c5d7cf6 Support for --publish-service flag in docker run
This commit makes use of the CNM model supported by LibNetwork and
provides an ability to let a container to publish a specified service.
Behind the scenes, if a service with the given name doesnt exist, it is
automatically created on appropriate network and attach the container.

Signed-off-by: Alessandro Boch <aboch@docker.com>
Signed-off-by: Madhu Venugopal <madhu@docker.com>
Upstream-commit: 1ac350a0ecfe9d28c82d6dff6a763a378ff9c472
Component: engine
2015-06-20 11:03:38 -07:00
4c8d2626b0 register libnetwork API and UI with docker parent chain
This commit also brings in the ability to specify a default network and its
corresponding driver as daemon flags. This helps in existing clients to
make use of newer networking features provided by libnetwork.

Signed-off-by: Madhu Venugopal <madhu@docker.com>
Upstream-commit: da5a3e6dee80f1f5d4059851e4762ffb0484f7e9
Component: engine
2015-06-18 12:07:58 -07:00
7832a73409 Vendoring in libnetwork to 3be488927db8d719568917203deddd630a194564
This PR brings the vendored libnetwork code to
3be488927db8d719568917203deddd630a194564, which pulls in quite a few
fixes to support kvstore, windows daemon compilation fixes,
multi-network support for Bridge driver, etc...

Signed-off-by: Madhu Venugopal <madhu@docker.com>
Upstream-commit: 083300168fb0f42e022e9fa2ce47a7b2aac9967a
Component: engine
2015-06-12 16:10:40 -07:00
4d366ead20 Cleanup: remove some useless code and change verifyHostConfig to verifyContainerSetting
Signed-off-by: Lei Jitang <leijitang@huawei.com>
Upstream-commit: 67552fb22d254ba5e515aa899b1da3173f474a14
Component: engine
2015-06-08 09:06:58 +08:00
bda4b578b4 Fix for #13720
Signed-off-by: Alessandro Boch <aboch@docker.com>
Upstream-commit: ea180a73bc00491915d620c14877318cc33b2a73
Component: engine
2015-06-03 23:39:27 -07:00
8b93ea90be Using container NetworkDisabled to fix #13725
container.config.NetworkDisabled is set for both daemon's
DisableNetwork and --networking=false case. Hence using
this flag instead to fix #13725.

There is an existing integration-test to catch this issue,
but it is working for the wrong reasons.

Signed-off-by: Madhu Venugopal <madhu@docker.com>
Upstream-commit: 83208a531d1824ea7b0a55f9419e915e446c780a
Component: engine
2015-06-03 17:31:22 -07:00
07eda82273 Merge pull request #13536 from Mic92/master
remove redundant mount/unmount calls on commit
Upstream-commit: 1f472c37687fd1f66e574df3ba773fde5be57e2d
Component: engine
2015-06-01 15:57:14 -07:00
f9a83491c5 Merge pull request #13464 from davidrjenni/10184-fix-auto-created-devices
Fixes issue #10184.
Upstream-commit: 6fb454b9f08249449a343ca56348b02ae41ac9c5
Component: engine
2015-06-01 09:30:04 -07:00
d27d17578c Merge pull request #13390 from mrjana/cnm_integ
Do not attempt releasing network when not attached to any network
Upstream-commit: b4450043641ffbe8d8b0b5255de99ae0e78141b2
Component: engine
2015-06-01 08:25:20 -07:00
64ffe806a7 Fix issue #10184.
Merge user specified devices correctly with default devices.
Otherwise the user specified devices end up without permissions.

Signed-off-by: David R. Jenni <david.r.jenni@gmail.com>
Upstream-commit: c913c9921b7caa11e8500d2ebb4fa97303c876be
Component: engine
2015-05-30 11:09:47 +02:00
6226136075 Remove PortSpecs from Config
Signed-off-by: Antonio Murdaca <me@runcom.ninja>
Upstream-commit: 15134a3320fbacee36e86a0342e7ffb49285f297
Component: engine
2015-05-29 22:38:09 +02:00
097c5661ee remove redundant mount/unmount calls on commit
daemon.Diff already implements mounting for naivegraphdriver and
aufs which does diffing on its owns does not need the container to be mounted.
So new filesystem driver should mount filesystems on their own if it is needed
to implement Diff(). This issue was reported by @kvasdopil while working on a
freebsd port, because freebsd does not allow mount an already mounted
filesystem. Also it saves some cycles for other operating systems as well.

Signed-off-by: Jörg Thalheim <joerg@higgsboson.tk>
Upstream-commit: 6473b0f127c63e8a45b2b456d69e3de03273705c
Component: engine
2015-05-28 08:43:31 +02:00
d177b20750 Merge pull request #13493 from jlhawn/volume_unmount_fix
Fix container unmount networkMounts
Upstream-commit: 2029257e3cfd524b5fec0288eef039f182e460f7
Component: engine
2015-05-27 08:44:11 -07:00
aee141571b Fix container unmount networkMounts
UnmountVolumes used to also unmount 'specialMounts' but it no longer does after
a recent refactor of volumes. This patch corrects this behavior to include
unmounting of `networkMounts` which replaces `specialMounts` (now dead code).

Docker-DCO-1.1-Signed-off-by: Josh Hawn <josh.hawn@docker.com> (github: jlhawn)
Upstream-commit: 04f99a6ca8232e43169b9a0706e435c551c798a3
Component: engine
2015-05-26 17:38:26 -07:00
5066df6b7c Merge pull request #13440 from LK4D4/fix_bridge_none
Fix network with -b none
Upstream-commit: 47e727d1fcef00c270851ecc3e5efa7d7b65240d
Component: engine
2015-05-26 14:08:21 -07:00
a749f0fc90 Windows: Fix up container again
Signed-off-by: John Howard <jhoward@microsoft.com>
Upstream-commit: 5d207de5092f4532a1696939fdb64a85d370fb01
Component: engine
2015-05-26 09:33:55 -07:00
7623ba5e39 Fix network with -b none
* Don't AllocateNetwork when network is disabled
* Don't createNetwork in execdriver when network is disabled

Signed-off-by: Alexander Morozov <lk4d4@docker.com>
Upstream-commit: 3cb14df68c1a59981907fec3bccab80a1d0dda59
Component: engine
2015-05-24 08:26:59 -07:00
710f67f354 Merge pull request #13424 from mavenugo/vendorin
Vendoring in libnetwork 67438080724b17b641b411322822c00d0d3c3201
Upstream-commit: f83073d3eb23a3f3c22bef9401090df5da53cc2f
Component: engine
2015-05-23 21:08:58 -07:00
2f63354a90 Vendoring in libnetwork 67438080724b17b641b411322822c00d0d3c3201
This version brings in upto-date important bug-fixes from libnetwork

Signed-off-by: Madhu Venugopal <madhu@docker.com>
Upstream-commit: a3d22c764cfc3e175cdfb992f3b2314f23540236
Component: engine
2015-05-23 18:42:34 -07:00
89782c55eb Volumes refactor and external plugin implementation.
Signed by all authors:

Signed-off-by: Michael Crosby <crosbymichael@gmail.com>
Signed-off-by: Arnaud Porterie <arnaud.porterie@docker.com>
Signed-off-by: David Calavera <david.calavera@gmail.com>
Signed-off-by: Jeff Lindsay <progrium@gmail.com>
Signed-off-by: Alexander Morozov <lk4d4@docker.com>
Signed-off-by: Luke Marsden <luke@clusterhq.com>
Signed-off-by: David Calavera <david.calavera@gmail.com>
Upstream-commit: 81fa9feb0cdc0773eff99d7393c16271e84aac08
Component: engine
2015-05-21 20:34:17 -07:00
34120dcd16 Do not attempt releasing network when not attached to any network
Sometimes container.cleanup() can be called from multiple paths
for the same container during error conditions from monitor and
regular startup path. So if the container network has been already
released do not try to release it again.

Signed-off-by: Jana Radhakrishnan <mrjana@docker.com>
Upstream-commit: 6cdf8623d52e7e4c5b5265deb5f5b1d33f2e6e95
Component: engine
2015-05-21 18:57:17 +00:00
aee8d65658 Add missing return error check
Signed-off-by: Lei Jitang <leijitang@huawei.com>
Upstream-commit: a9bc05a2f8e0978f47473b07b43d79692cf498bc
Component: engine
2015-05-21 17:03:43 +08:00
986a53d09e Make docker ps --size show virtual size really work
Signed-off-by: Lei Jitang <leijitang@huawei.com>
Upstream-commit: d0de2b1e2f0939b25c83183f450c71b8309d1d32
Component: engine
2015-05-21 08:57:11 +08:00
13426de5e6 Docker integration with libnetwork
- Updated Dockerfile to satisfy libnetwork GOPATH requirements.
    - Reworked daemon to allocate network resources using libnetwork.
    - Reworked remove link code to also update network resources in libnetwork.
    - Adjusted the exec driver command population to reflect libnetwork design.
    - Adjusted the exec driver create command steps.
    - Updated a few test cases to reflect the change in design.
    - Removed the dns setup code from docker as resolv.conf is entirely managed
      in libnetwork.
    - Integrated with lxc exec driver.

Signed-off-by: Jana Radhakrishnan <mrjana@docker.com>
Upstream-commit: d18919e304c240df84502cdcc5ed655d92d12d4f
Component: engine
2015-05-19 22:40:19 +00:00
c4f071bd48 Windows: Refactor container
Signed-off-by: John Howard <jhoward@microsoft.com>
Upstream-commit: b9e4b95788e0d8eae5363b82f301dafb9ea687f7
Component: engine
2015-05-16 12:38:20 -07:00