Commit graph

6229 commits

Author SHA1 Message Date
Arko Dasgupta
2b216674da
Network not deleted after stack is removed
Make sure adapter.removeNetworks executes during task Remove
adapter.removeNetworks was being skipped for cases when
isUnknownContainer(err) was true after adapter.remove was executed

This fix eliminates the nil return case forcing the function
to continue executing unless there is a true error

Fixes https://github.com/moby/moby/issues/39225

Signed-off-by: Arko Dasgupta <arko.dasgupta@docker.com>
(cherry picked from commit 70fa7b6a3f)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2019-05-25 21:53:13 +02:00
frankyang
750e0ace06
bugfix: fetch the right device number which great than 255
Signed-off-by: frankyang <yyb196@gmail.com>
(cherry picked from commit b9f31912de)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2019-05-21 12:06:26 +02:00
Arko Dasgupta
2a7513a972
Remove a network during task SHUTDOWN instead of REMOVE to
make sure the LB sandbox is removed when a service is updated
with a --network-rm option

Signed-off-by: Arko Dasgupta <arko.dasgupta@docker.com>
(cherry picked from commit 680d0ba4ab)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2019-05-13 15:47:35 -07:00
Sven Dowideit
29ad9379f4 I can lose a screw if its on too loose
Signed-off-by: Sven Dowideit <SvenDowideit@home.org.au>
2019-04-23 11:36:31 +10:00
Sebastiaan van Stijn
688e67e1d3
bump fluent/fluent-logger-golang v1.4.0
- Add RequestAck to enable at-least-once message transferring
- Add Async option to update sending message in asynchronous way
- Deprecate AsyncConnect (Use Async instead)

full diff: https://github.com/fluent/fluent-logger-golang/compare/v1.3.0...v1.4.0

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2019-04-16 11:06:30 +02:00
Sebastiaan van Stijn
c524e15f30
Merge pull request #38952 from alexei38/master
fluentd log driver. failed parse last partial message in fluentd #38951
2019-04-15 20:40:57 +02:00
Sebastiaan van Stijn
ed07e11528
Merge pull request #38968 from imxyb/overlay2-contanst
change hard code: add some overlay2 constant to replace the hard code.
2019-04-12 22:50:16 +02:00
Sebastiaan van Stijn
f7ec606fc1
Merge pull request #39042 from crosbymichael/oci-opts
Refactor few spec generation ops
2019-04-11 21:07:08 +02:00
Michael Crosby
c478553640 Export all spec generation opts
Signed-off-by: Michael Crosby <crosbymichael@gmail.com>
2019-04-10 15:38:36 -04:00
Michael Crosby
cb902f4430 Refactor few spec generation ops
Signed-off-by: Michael Crosby <crosbymichael@gmail.com>
2019-04-09 16:51:40 -04:00
Alexei Margasov
4a9836a20b Adds PartialLogMetadata to encode protobuf for logger plugins
Signed-off-by: Alexei Margasov <alexei38@yandex.ru>
2019-04-09 16:14:33 +05:00
Alexei Margasov
8997b90c2c fluentd log driver. failed parse last partial message in fluentd #38951
Signed-off-by: Alexei Margasov <alexei38@yandex.ru>
2019-04-09 15:21:08 +05:00
Michael Crosby
b9b5dc37e3 Remove inmemory container map
Signed-off-by: Michael Crosby <crosbymichael@gmail.com>
2019-04-05 15:48:07 -04:00
Michael Crosby
45e328b0ac Remove libcontainerd status type
Signed-off-by: Michael Crosby <crosbymichael@gmail.com>
2019-04-04 15:17:13 -04:00
Tonis Tiigi
1a0f04e08e daemon: fix mirrors validation
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2019-04-02 11:38:21 -07:00
imxyb
7ab69cd7e2 change hard code: add some overlay2 constant to replace the hard code.
Signed-off-by: Xiao YongBiao <xyb4638@gmail.com>
2019-04-02 10:57:13 +08:00
Tibor Vass
09d0f91556
Merge pull request #38945 from RenaudWasTaken/master
Update nvidia_devices to call into nvidia-container-runtime-hook
2019-04-01 11:07:05 -07:00
Tibor Vass
739adb46e4 daemon: fix bug in nvidia device registration
Signed-off-by: Tibor Vass <tibor@docker.com>
2019-03-29 16:07:01 -07:00
Renaud Gaubert
bd3d46a9e5 Update nvidia_devices to call into nvidia-container-runtime-hook
Signed-off-by: Renaud Gaubert <rgaubert@nvidia.com>
2019-03-29 16:07:01 -07:00
Brian Goff
ab47e16cc5
Merge pull request #38918 from thaJeztah/bump_selinux
bump opencontainers/selinux to v1.2
2019-03-28 17:27:03 -07:00
Vincent Demeester
da823cf3a5
Merge pull request #38853 from cyphar/integration-cli-ensureImage
integration-cli: don't build -test images if they already exist
2019-03-27 07:32:23 +01:00
Yong Tang
5635c248cd
Merge pull request #38871 from crosbymichael/exec-spec
Use original process spec for execs
2019-03-25 11:58:33 +08:00
Sebastiaan van Stijn
e4cc3adf81
Merge pull request #38922 from Microsoft/jjh/grantvmgroupaccess
LCOW: Add VMGroup SID to layer.vhd; fix layer folder perm
2019-03-23 12:02:19 +01:00
Tibor Vass
02ec758372
Merge pull request #38924 from tiborvass/fix-empty-warnings
ContainerCreate shouldn't return warnings=nil
2019-03-21 17:20:54 -07:00
Tibor Vass
56bb8fb324
Merge pull request #38579 from thaJeztah/fix_net_host_systemd_resolved
Fix: network=host using wrong resolv.conf with systemd-resolved
2019-03-21 15:34:48 -07:00
Tõnis Tiigi
74f145405a
Merge pull request #38593 from fanjiyun/add-vfs-quota-for-daemon
add vfs quota for daemon storage-opts
2019-03-21 14:28:09 -07:00
sh7dm
8f303bd848 ContainerCreate shouldn't return warnings=nil
Fixes #38222
Closes #38614 (carried)

Signed-off-by: Tibor Vass <tibor@docker.com>
2019-03-21 21:20:31 +00:00
Kirill Kolyshkin
6680a5cfe1
Merge pull request #38405 from rst0git/enable-cr-tty
Enable checkpoint/restore of containers with TTY
2019-03-21 14:12:49 -07:00
Tibor Vass
06c9ae1327
Merge pull request #38906 from thaJeztah/carry_38304_fix_swarm_leave_hanging
Fix for situation where swarm leave causes wait forever for agent to stop
2019-03-21 14:12:41 -07:00
Kirill Kolyshkin
c92a8c7904
Merge pull request #38297 from thaJeztah/revert_pagesize_fix
Revert "Add limit to page size used by overlay2 driver"
2019-03-21 13:58:40 -07:00
Tibor Vass
119f892016
Merge pull request #38510 from ZYecho/tune-code
fix: simplify code logic
2019-03-21 13:56:02 -07:00
Tõnis Tiigi
25661a3a04
Merge pull request #38793 from thaJeztah/pids_limit_improvements
Some refactoring on PidsLimit
2019-03-21 13:44:05 -07:00
John Howard
b4db78be5a LCOW: Add SIDs to layer.vhd at creation
Signed-off-by: John Howard <jhoward@microsoft.com>

Some permissions corrections here. Also needs re-vendor of go-winio.

 - Create the layer folder directory as standard, not with SDDL. It will inherit permissions from the data-root correctly.
 - Apply the VM Group SID access to layer.vhd

Permissions after this changes

Data root:

```
PS C:\> icacls test
test BUILTIN\Administrators:(OI)(CI)(F)
     NT AUTHORITY\SYSTEM:(OI)(CI)(F)
```

lcow subdirectory under dataroot
```
PS C:\> icacls test\lcow
test\lcow BUILTIN\Administrators:(I)(OI)(CI)(F)
          NT AUTHORITY\SYSTEM:(I)(OI)(CI)(F)
```

layer.vhd in a layer folder for LCOW
```
.\test\lcow\c33923d21c9621fea2f990a8778f469ecdbdc57fd9ca682565d1fa86fadd5d95\layer.vhd NT VIRTUAL MACHINE\Virtual Machines:(R)
                                                                                       BUILTIN\Administrators:(I)(F)
                                                                                       NT AUTHORITY\SYSTEM:(I)(F)
```

And showing working

```
PS C:\> docker-ci-zap -folder=c:\test
INFO: Zapped successfully
PS C:\> docker run --rm alpine echo hello
Unable to find image 'alpine:latest' locally
latest: Pulling from library/alpine
8e402f1a9c57: Pull complete
Digest: sha256:644fcb1a676b5165371437feaa922943aaf7afcfa8bfee4472f6860aad1ef2a0
Status: Downloaded newer image for alpine:latest
hello
```
2019-03-21 13:12:17 -07:00
Michael Crosby
7603c22c73 Use original process spec for execs
Fixes #38865

Signed-off-by: Michael Crosby <crosbymichael@gmail.com>
2019-03-21 15:41:53 -04:00
Sebastiaan van Stijn
f43826c433
bump opencontainers/selinux to v1.2
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2019-03-21 10:10:05 +01:00
Sebastiaan van Stijn
c7105e3c99
Simplify verifyNetworkingConfig()
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2019-03-20 18:46:56 +01:00
Sebastiaan van Stijn
bcb4a331f9
connectToNetwork: use locally scoped err
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2019-03-20 18:46:46 +01:00
Sebastiaan van Stijn
ebe0174f22
Simplify hasUserDefinedIPAddress, and centralize validation
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2019-03-20 18:46:35 +01:00
Sebastiaan van Stijn
20dde01848
Move EnableServiceDiscoveryOnDefaultNetwork to container-operations
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2019-03-20 18:45:20 +01:00
Sebastiaan van Stijn
0169ad3e2a
Remove redundant isNetworkHotPluggable() function
All platforms now have hot-pluggable networks, so this
check was no longer needed.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2019-03-20 18:45:07 +01:00
John Howard
a3eda72f71
Merge pull request #38541 from Microsoft/jjh/containerd
Windows: Experimental: ContainerD runtime
2019-03-19 21:09:19 -07:00
Sebastiaan van Stijn
e7b5f7dbe9
Merge pull request #38891 from thaJeztah/warn_manager_count
Return a warning when running in a two-manager setup
2019-03-19 22:54:53 +01:00
Kyle Wuolle
e65c680394
Fix for situation where swarm leave causes wait forever for agent to stop
In this case the message to stop the agent is never actually sent
because the swarm node is nil

Signed-off-by: Kyle Wuolle <kyle.wuolle@gmail.com>
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2019-03-19 18:45:14 +01:00
Tibor Vass
8f936ae8cf Add DeviceRequests to HostConfig to support NVIDIA GPUs
This patch hard-codes support for NVIDIA GPUs.
In a future patch it should move out into its own Device Plugin.

Signed-off-by: Tibor Vass <tibor@docker.com>
2019-03-18 17:19:45 +00:00
Sebastiaan van Stijn
81eef17e38
Return a warning when running in a two-manager setup
Running a cluster in a two-manager configuration effectively *doubles*
the chance of loosing control over the cluster (compared to running
in a single-manager setup). Users may have the assumption that having
two managers provides fault tolerance, so it's best to warn them if
they're using this configuration.

This patch adds a warning to the `info` response if Swarm is configured
with two managers:

    WARNING: Running Swarm in a two-manager configuration. This configuration provides
             no fault tolerance, and poses a high risk to loose control over the cluster.
             Refer to https://docs.docker.com/engine/swarm/admin_guide/ to configure the
             Swarm for fault-tolerance.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2019-03-18 14:36:00 +01:00
Sebastiaan van Stijn
2925eb7a2a
Merge pull request #38777 from wk8/wk8/raw_cred_specs
Making it possible to pass Windows credential specs directly to the engine
2019-03-16 16:42:39 +01:00
Jean Rouge
7fdac7eb0f Making it possible to pass Windows credential specs directly to the engine
Instead of having to go through files or registry values as is currently the
case.

While adding GMSA support to Kubernetes (https://github.com/kubernetes/kubernetes/pull/73726)
I stumbled upon the fact that Docker currently only allows passing Windows
credential specs through files or registry values, forcing the Kubelet
to perform a rather awkward dance of writing-then-deleting to either the
disk or the registry to be able to create a Windows container with cred
specs.

This patch solves this problem by making it possible to directly pass
whole base64-encoded cred specs to the engine's API. I took the opportunity
to slightly refactor the method responsible for Windows cred spec as it
seemed hard to read to me.

Added some unit tests on Windows credential specs handling, as there were
previously none.

Added/amended the relevant integration tests.

I have also tested it manually: given a Windows container using a cred spec
that you would normally start with e.g.
```powershell
docker run --rm --security-opt "credentialspec=file://win.json" mcr.microsoft.com/windows/servercore:ltsc2019 nltest /parentdomain
# output:
# my.ad.domain.com. (1)
# The command completed successfully
```
can now equivalently be started with
```powershell
$rawCredSpec = & cat 'C:\ProgramData\docker\credentialspecs\win.json'
$escaped = $rawCredSpec.Replace('"', '\"')
docker run --rm --security-opt "credentialspec=raw://$escaped" mcr.microsoft.com/windows/servercore:ltsc2019 nltest /parentdomain
# same output!
```

I'll do another PR on Swarmkit after this is merged to allow services to use
the same option.

(It's worth noting that @dperny faced the same problem adding GMSA support
to Swarmkit, to which he came up with an interesting solution - see
https://github.com/moby/moby/pull/38632 - but alas these tricks are not
available to the Kubelet.)

Signed-off-by: Jean Rouge <rougej+github@gmail.com>
2019-03-15 19:20:19 -07:00
Sebastiaan van Stijn
ca0b64ee3b
Merge pull request #35621 from kolyshkin/ipc-private
daemon: use 'private' ipc mode by default
2019-03-14 19:27:30 +01:00
Sebastiaan van Stijn
42987cab19
Merge pull request #38874 from thaJeztah/small_error_improvements
Minor error cleanups in projectquota
2019-03-14 09:58:08 +01:00
Sebastiaan van Stijn
aa51dcec94
Merge pull request #38868 from justincormack/google-uuid
Switch to google/uuid
2019-03-14 02:19:01 +01:00