Commit graph

34862 commits

Author SHA1 Message Date
Brian Goff
9d46c4c138 Support cancellation in directory.Size()
Makes sure that if the user cancels a request that the daemon stops
trying to traverse a directory.

Signed-off-by: Brian Goff <cpuguy83@gmail.com>
2018-03-29 15:49:15 -04:00
Vincent Demeester
deed26f7f0
Merge pull request #36631 from vdemeester/e2e-integration-cli-run
e2e integration cli run
2018-03-29 12:06:29 +02:00
Vincent Demeester
e55d6fc857 Skip some tests in certain condition to run with e2e image
Signed-off-by: Vincent Demeester <vincent@sbr.pm>
2018-03-29 09:10:39 +02:00
Anusha Ragunathan
f12574891c
Merge pull request #36638 from ctelfer/rolling-update-libnetwork-import
Import libnetwork fix for rolling updates
2018-03-28 21:27:14 -07:00
Anusha Ragunathan
18d1688530
Merge pull request #36711 from cpuguy83/plugin_mounts_sorting
Don't sort plugin mounts slice
2018-03-28 11:57:38 -07:00
Chris Telfer
c27417aa7d Remove (now) extra call to sb.DisableService()
This call was added as part of commit a042e5a20 and at the time was
useful.  sandbox.DisableService() basically calls
endpoint.deleteServiceInfoFromCluster() for every endpoint in the
sandbox.  However, with the libnetwork change, endpoint.sbLeave()
invokes endpoint.deleteServiceInfoFromCluster(). The releaseNetwork()
call invokes sandbox.Delete() immediately after
sandbox.DisableService().  The sandbox.Delete() in turn ultimately
invokes endpoint.sbLeave() for every endpoint in the sandbox which thus
removes the endpoint's load balancing entry via
endpoint.deleteServiceInfoFromCluster().  So the call to
sandbox.DisableService() is now redundant.

It is noteworthy that, while redundant, the presence of the call would
not cause errors.  It would just be sub-optimal.  The DisableService()
call would cause libnetwork to down-weight the load balancing entries
while the call to sandbox.Delete() would cause it to remove the entries
immediately afterwards.  Aside from the wasted computation, the extra
call would also propagate an extra state change in the networkDB gossip
messages.  So, overall, it is much better to just avoid the extra
overhead.

Signed-off-by: Chris Telfer <ctelfer@docker.com>
2018-03-28 14:16:31 -04:00
Chris Telfer
50dbdeff9f Import libnetwork fix for rolling updates
This patch allows endpoints to complete servicing connections while
being removed from a service.  The fix is entirely within libnetwork
and requires no changes to the moby codebase proper.  It operates
by initially down-weighting a container endpoint in the load balancer
to 0 while keeping the endpoint present in the load balancer.  This
allows traffic to continue to flow to the endpoint while preventing new
connections from going to the endpoint.  This allows the container
to complete requests during the "stop_grace_period" and then exit when
finished without interruption of service.

This change requires propagating the status of disabled service
endpoints via the networkDB.  Accordingly, the patch includes both code
to generate and handle service update messages.  It also augments the
service structure with a ServiceDisabled boolean to convey whether an
endpoint should ultimately be removed or just disabled.  This,
naturally, required a rebuild of the protocol buffer code.

The protocol buffer encoding is designed to support additions of fields
to messages in a backwards-compatible manner.  Protocol buffer
unmarshalling code automatically skips past any fields that it isn't
aware of.  As a result, an older moby daemon without this fix can
receive and will process correctly networkDB messages from newer moby
daemons with this patch.

As it turns out, the additional field is simply a bool that is otherwise
irrelevent on networkDB create and delete events.  So its absence in
older moby daemon processing has no impact.  However, the fix leverages
the "update" networkDB message which was previously unused in
libnetwork.  Although older libnetwork implementations parse the message
cleanly, they will see the message as unexpected and as such issue a log
at error level indicating the receipt of such.

Other than this there should be no other negative impact for use of this
patch in mixed environments. (Although older mobys won't be able to
gracefully downgrade connections on their nodes of course.)

Signed-off-by: Chris Telfer <ctelfer@docker.com>
2018-03-28 14:16:31 -04:00
Sebastiaan van Stijn
3858865672
Merge pull request #36697 from vdemeester/network-macvlan-test-migration
Migrate test-integration-cli experimental macvlan test to integration
2018-03-28 17:56:42 +02:00
Brian Goff
ec90839ca3 Don't sort plugin mounts slice
This was added as part of a53930a04f with
the intent to sort the mounts in the plugin config, but this was sorting
*all* the mounts from the default OCI spec which is problematic.

In reality we don't need to sort this because we are only adding a
self-binded mount to flag it as rshared.

We may want to look at sorting the plugin mounts before they are added
to the OCI spec in the future, but for now I think the existing behavior
is fine since the plugin author has control of the order (except for the
propagated mount).

Signed-off-by: Brian Goff <cpuguy83@gmail.com>
2018-03-28 09:10:43 -04:00
Vincent Demeester
ef5bc60326
Migrate test-integration-cli experimental macvlan test to integration
All `Macvlan` related test on `DockerSuite` and `DockerNetworkSuite`
are migrated to `macvlan_test.go`.

Also, as `macvlan` seems to be out of experimental, this removes
the *skip* when the run is not experimental (and doesn't start a
daemon with experimental either).

The end goal being to remove the `experimental` builds.

Signed-off-by: Vincent Demeester <vincent@sbr.pm>
2018-03-28 10:47:11 +02:00
Vincent Demeester
b6a7d027e9
Merge pull request #36651 from keloyang/judgment-daemonWaitCh
Add if judgment before receiving operations on daemonWaitCh
2018-03-28 10:07:57 +02:00
Vincent Demeester
ed7b6428c1
Merge pull request #36704 from thaJeztah/bump-go-digest
Bump go-digest to v1.0.0-rc.1
2018-03-27 14:31:50 +02:00
John Stephens
29fc64b590
Merge pull request #35089 from Microsoft/jjh/fromplatformbuilder
LCOW - Change platform parser directive to FROM statement flag
2018-03-26 14:17:49 -07:00
Daniel Nephin
e2062f7571
Merge pull request #36700 from dnephin/remove-myself-as-codeowner
Remove myself from CODEOWNERS
2018-03-26 16:37:22 -04:00
Sebastiaan van Stijn
82c44711cc
Bump go-digest to v1.0.0-rc.1
Changes included:

- digest: allow separators in algorithm field
- disallow upper characters (/A-F/) in hex-encoded portion

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2018-03-26 22:17:35 +02:00
Daniel Nephin
92dfe76911 Remove myself from CODEOWNERS
Signed-off-by: Daniel Nephin <dnephin@docker.com>
2018-03-26 13:45:05 -04:00
Sebastiaan van Stijn
7cfd3f4229
Merge pull request #36692 from katakonst/unique_names_container_rename_Test
Use unique names for container/rename_test.go
2018-03-26 11:29:01 +01:00
Sebastiaan van Stijn
e5eb527ebd
Merge pull request #36694 from thaJeztah/update-ripcurld-handle
Update curators list
2018-03-26 11:13:58 +01:00
Akihiro Suda
6b3f66c418
Merge pull request #36646 from anusha-ragunathan/err_return
Add missing error return for plugin creation.
2018-03-26 18:34:47 +09:00
Sebastiaan van Stijn
c85ee9828c
Update curators list
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2018-03-26 10:39:52 +02:00
Catalin Pirvu
90b514922b Use unique names for container/rename_test.go
Signed-off-by: Catalin Pirvu <pirvu.catalin94@gmail.com>
2018-03-25 21:16:32 +03:00
Anusha Ragunathan
89a882e2f1 Add missing error return for plugin creation.
Signed-off-by: Anusha Ragunathan <anusha.ragunathan@docker.com>
2018-03-23 12:07:43 -07:00
Sebastiaan van Stijn
5f17312653
Merge pull request #36672 from anshulpundir/election
Increase raft ElectionTick to 10xHeartbeatTick
2018-03-23 19:57:24 +01:00
Sebastiaan van Stijn
2e3056128c
Merge pull request #35149 from AkihiroSuda/image-v1
image/spec: add historical information about v1 spec
2018-03-23 16:47:16 +01:00
Sebastiaan van Stijn
52d3dceac5
Merge pull request #36676 from arm64b/enable-criu-on-non-arm64-v2
Enable CRIU on non-amd64 architectures (v2)
2018-03-23 13:05:45 +01:00
Vincent Demeester
c3b3be5296
Merge pull request #36509 from xujihui1985/master
fix(distribution): digest cache should not be moved if it was an auth
2018-03-23 11:17:43 +01:00
Dennis Chen
803a756941 Remove the uname -m in Dockerfile
Using `dpkg --print-architecture` instead of the `uname -m` to abstract
the architecture value from the container images, which the build process
is running inside, to match exactly the behavior specified by the following
Docker file while not 'passthru' to the host.

Signed-off-by: Dennis Chen <dennis.chen@arm.com>
2018-03-23 08:56:35 +00:00
Dennis Chen
7fd54a7a48 Enable CRIU on non-amd64 architectures
Since the recent release of CRIU has already supported other
arches such as AArch64, ppc64le, and s390x, so we can enable
it now.

Signed-off-by: Dennis Chen <dennis.chen@arm.com>
2018-03-23 05:52:35 +00:00
Akihiro Suda
57c504799d
Merge pull request #36662 from adshmh/use-unique-resource-names-for-container-inspect-ps-stop-integration-tests
Use unique names for test resources of container/inspect, container/ps, container/stop tests
2018-03-23 12:16:53 +09:00
Anshul Pundir
6abee2008b Increase raft ElectionTick to 10xHeartbeatTick
Signed-off-by: Anshul Pundir <anshul.pundir@docker.com>
2018-03-22 15:04:10 -07:00
Sebastiaan van Stijn
766d9edf39
Merge pull request #36670 from stevvooe/use-context-error
daemon: use context error rather than inventing new one
2018-03-22 20:45:20 +01:00
Stephen J Day
d84da75f01
daemon: use context error rather than inventing new one
Signed-off-by: Stephen J Day <stephen.day@docker.com>
2018-03-22 09:38:59 -07:00
Vincent Demeester
69091990c7
Merge pull request #36663 from tonistiigi/hijackconn-fix
client: fix hijackedconn reading from buffer
2018-03-22 17:10:06 +01:00
Vincent Demeester
b67c1e078c
Merge pull request #36587 from justincormack/unpriv-caps
If container will run as non root user, drop permitted, effective caps early
2018-03-22 14:51:29 +01:00
Sebastiaan van Stijn
00c59ed77e
Merge pull request #36647 from adshmh/use-unique-names-for-container-nat-test-containers
use unique names for test containers of container/nat integration tests
2018-03-22 14:03:36 +01:00
Sebastiaan van Stijn
e2bede01e4
Merge pull request #36172 from kolyshkin/systemd-memlimit
Test for systemd cgroupdriver memory setting
2018-03-22 13:36:43 +01:00
Akihiro Suda
3baa588959
Merge pull request #36653 from thaJeztah/refactor-windows-service-code
Split daemon service code to _windows file
2018-03-22 21:14:17 +09:00
Vincent Demeester
cd01c147b1
Merge pull request #36551 from selansen/36247
Fix for Flaky test TestServiceWithPredefinedNetwork
2018-03-22 10:01:20 +01:00
Tonis Tiigi
f094a05e26 client: fix hijackedconn reading from buffer
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2018-03-21 15:29:44 -07:00
Arash Deshmeh
78e4be9133 use unique names for resources used by integration tests container/inspect_test, container/ps_test, container/stop_test
Signed-off-by: Arash Deshmeh <adeshmeh@ca.ibm.com>
2018-03-21 17:47:49 -04:00
selansen
dabffd806c Fix for Flaky test TestServiceWithPredefinedNetwork
TestServiceWithPredefinedNetwork test case was failing
	at times. To fix the issue, added new API to check
	for services after we clean up all services. Tested
	multiple times and this sould fix flaky issue.

Signed-off-by: selansen <elango.siva@docker.com>
2018-03-21 11:49:23 -04:00
Sebastiaan van Stijn
cd3e84c6b3
Split daemon service code to _windows file
This moves some of the code that was conditionally
executed on Windows to a separate, windows-only file.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2018-03-21 12:57:53 +01:00
Shukui Yang
a50d9c0765 Add if judgment before receiving operations on daemonWaitCh
receive operations on a nil channel will always block, this lead containerd not started.

Signed-off-by: Shukui Yang <yangshukui@huawei.com>
2018-03-21 05:53:55 -04:00
Vincent Demeester
4460472f4e
Merge pull request #36594 from vdemeester/e2e-more-run
integration/*: make e2e run without failure
2018-03-21 08:54:39 +01:00
Vincent Demeester
8aa694c91a
Merge pull request #36515 from vdemeester/migrate-trusted-suite
Remove DockerTrustSuite to docker/cli e2e tests
2018-03-21 08:50:59 +01:00
Arash Deshmeh
b4d1547af6 container/nat integration tests use unique names for test containers
Signed-off-by: Arash Deshmeh <adeshmeh@ca.ibm.com>
2018-03-20 17:11:03 -04:00
Tõnis Tiigi
0c1006f1ab
Merge pull request #36466 from thaJeztah/fix-exec-apparmor
Fix AppArmor not being applied to Exec processes
2018-03-19 15:12:41 -07:00
Justin Cormack
15ff09395c
If container will run as non root user, drop permitted, effective caps early
As soon as the initial executable in the container is executed as a non root user,
permitted and effective capabilities are dropped. Drop them earlier than this, so
that they are dropped before executing the file. The main effect of this is that
if `CAP_DAC_OVERRIDE` is set (the default) the user will not be able to execute
files they do not have permission to execute, which previously they could.

The old behaviour was somewhat surprising and the new one is definitely correct,
but it is not in any meaningful way exploitable, and I do not think it is
necessary to backport this fix. It is unlikely to have any negative effects as
almost all executables have world execute permission anyway.

Use the bounding set not the effective set as the canonical set of capabilities, as
effective will now vary.

Signed-off-by: Justin Cormack <justin.cormack@docker.com>
2018-03-19 14:45:27 -07:00
John Howard
14429056d3 Builder: Review feedback
Signed-off-by: John Howard <jhoward@microsoft.com>
2018-03-19 14:29:36 -07:00
John Howard
317513d698 Builder: Fix CI issues
Signed-off-by: John Howard <jhoward@microsoft.com>
2018-03-19 14:29:36 -07:00