Commit graph

36419 commits

Author SHA1 Message Date
Brian Goff
9c83848fc9
Merge pull request #38808 from alexellis/derek/add_pr_description_required
Update Derek behaviour
2019-02-28 15:45:30 -08:00
Brian Goff
45eae4cb2b
Merge pull request #38806 from tonistiigi/rootless-build-fixes
builder-next: fixes for rootless mode
2019-02-28 15:44:40 -08:00
Sebastiaan van Stijn
5c152ea10f
Merge pull request #38810 from thaJeztah/network_dangling_docs
docs follow-ups for networks "dangling" filter
2019-02-28 21:00:39 +01:00
Sebastiaan van Stijn
989d497d51
Merge pull request #38565 from dave-tucker/jenkinsfile
Add Jenkinsfile
2019-02-28 20:49:52 +01:00
Tonis Tiigi
f9b9d5f584 builder-next: fixes for rootless mode
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2019-02-28 10:44:21 -08:00
Vincent Demeester
dc52692458
Merge pull request #38675 from thaJeztah/refactor_pkg_sysinfo
Refactor pkg/sysinfo
2019-02-28 19:28:33 +01:00
Sebastiaan van Stijn
ca91918dd4
docs follow-ups for networks "dangling" filter
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2019-02-28 17:54:31 +01:00
Yong Tang
ed681c5c0d
Merge pull request #38805 from thaJeztah/better_polling
Add more details to RunningTasksCount
2019-02-28 08:47:16 -08:00
Alex Ellis
3c9b9409e2 Update Derek behaviour
- adds new opt-in feature "pr_description_required" see docs for more:
https://github.com/alexellis/derek/blob/master/USER_GUIDE.md

Signed-off-by: Alex Ellis <alexellis2@gmail.com>
2019-02-28 11:20:18 +00:00
Sebastiaan van Stijn
8df160dde7
Merge pull request #38790 from nakabonne/refactor-setting-graph-driver
Refactor setting graph driver name
2019-02-28 10:42:09 +01:00
Vincent Demeester
ba641fef28
Merge pull request #31551 from KarthikNayak/dry_run
Network: add support for 'dangling' filter
2019-02-28 08:14:45 +01:00
Sebastiaan van Stijn
348d793351
Merge pull request #38737 from thaJeztah/fix_stopped_restart_containers
Fix stopped containers with restart-policy showing as "restarting"
2019-02-28 02:41:47 +01:00
Sebastiaan van Stijn
8c0ecb6387
Fix stopped containers with restart-policy showing as "restarting"
When manually stopping a container with a restart-policy, the container
would show as "restarting" in `docker ps` whereas its actual state
is "exited".

Stopping a container with a restart policy shows the container as "restarting"

    docker run -d --name test --restart unless-stopped busybox false

    docker stop test

    docker ps
    CONTAINER ID        IMAGE               COMMAND             CREATED             STATUS                       PORTS               NAMES
    7e07409fa1d3        busybox             "false"             5 minutes ago       Restarting (1) 4 minutes ago                     test

However, inspecting the same container shows that it's exited:

    docker inspect test --format '{{ json .State }}'
    {
      "Status": "exited",
      "Running": false,
      "Paused": false,
      "Restarting": false,
      "OOMKilled": false,
      "Dead": false,
      "Pid": 0,
      "ExitCode": 1,
      "Error": "",
      "StartedAt": "2019-02-14T13:26:27.6091648Z",
      "FinishedAt": "2019-02-14T13:26:27.689427Z"
    }

And killing the container confirms this;

    docker kill test
    Error response from daemon: Cannot kill container: test: Container 7e07409fa1d36dc8d8cb8f25cf12ee1168ad9040183b85fafa73ee2c1fcf9361 is not running

    docker run -d --name test --restart unless-stopped busybox false

    docker stop test

    docker ps
    CONTAINER ID        IMAGE               COMMAND             CREATED             STATUS                PORTS               NAMES
    d0595237054a        busybox             "false"             5 minutes ago       Restarting (1)       4 minutes ago                       exit

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2019-02-28 00:18:22 +01:00
Sebastiaan van Stijn
91d934b41b
Merge pull request #38791 from thaJeztah/update_api_changes
Fix container update resetting pidslimit on older API clients
2019-02-27 23:30:18 +01:00
karthik nayak
131cbaf5b7 Network: add support for 'dangling' filter
Like its counterpart in images and volumes, introduce the dangling
filter while listing networks. When the filter value is set to true,
only networks which aren't attached to containers and aren't builtin
networks are shown. When set to false, all builtin networks and
networks which are attached to containers are shown.

Signed-off-by: Karthik Nayak <Karthik.188@gmail.com>
2019-02-27 15:08:44 -05:00
Sebastiaan van Stijn
67d6f174ae
Add more details to RunningTasksCount
Provide slightly better information about the current state
of tasks.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2019-02-27 17:08:44 +01:00
John Howard
de7172b600
Merge pull request #38782 from Microsoft/fix-restart
Windows: Fix restart for Hyper-V containers
2019-02-26 22:44:36 -08:00
Brian Goff
501cb131a7
Merge pull request #38800 from dani-docker/esc-1090
Increase grpc limit for GetConfigs api
2019-02-26 13:15:07 -08:00
Dave Tucker
4d7721cdcc Add Jenkinsfile
This commit uses the exitings jenkins freestyle job configuration to
create a jenkinsfile. This allows the project to use multi-branch
pipelines in Jenkins and to allow others to contribute to the CI setup.

Signed-off-by: Dave Tucker <dt@docker.com>
2019-02-26 20:03:29 +00:00
Brian Goff
8073c4febd
Merge pull request #38786 from gaorong/installer-shell-interpreter
fix hack/dockerfile/install/containerd.installer lf statment's operator
2019-02-26 10:36:27 -08:00
Dani Louca
3fbbeb703c set bigger grpc limit for GetConfigs api
Signed-off-by: Dani Louca <dani.louca@docker.com>
2019-02-26 11:09:25 -05:00
Rong Gao
5e77399b92 fix hack/dockerfile/install/containerd.installer test statement
Signed-off-by: Rong Gao <gaoronggood@163.com>
2019-02-26 18:19:04 +08:00
Vincent Demeester
19c5ff9c64
Merge pull request #38792 from thaJeztah/update_api_changelog
Add new PidsLimit options to API version history
2019-02-26 09:12:36 +01:00
Brian Goff
95faf3582c
Merge pull request #38428 from thaJeztah/only_create_new_daemon_if_needed
Testing: create new daemon (only) if needed
2019-02-25 22:20:05 -08:00
Sebastiaan van Stijn
5861a0db22
Fix container update resetting pidslimit on older API clients
Older API clients did not use a pointer for `PidsLimit`, so
API requests would always send `0`, resulting in any previous
value to be reset after an update:

Before this patch:

(using a 17.06 Docker CLI):

```bash
docker run -dit --name test --pids-limit=16 busybox
docker container inspect --format '{{json .HostConfig.PidsLimit}}' test
16

docker container update --memory=100M --memory-swap=200M test

docker container inspect --format '{{json .HostConfig.PidsLimit}}' test
0

docker container exec test cat /sys/fs/cgroup/pids/pids.max
max
```

With this patch applied:

(using a 17.06 Docker CLI):

```bash
docker run -dit --name test --pids-limit=16 busybox
docker container inspect --format '{{json .HostConfig.PidsLimit}}' test
16

docker container update --memory=100M --memory-swap=200M test

docker container inspect --format '{{json .HostConfig.PidsLimit}}' test
16

docker container exec test cat /sys/fs/cgroup/pids/pids.max
16
```

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2019-02-24 16:32:32 +01:00
Sebastiaan van Stijn
fc77445147
Add new PidsLimit options to API version history
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2019-02-24 14:27:30 +01:00
Ryo Nakao
894ecb24d1 Merge the divided loops
Signed-off-by: Ryo Nakao <nakabonne@gmail.com>
2019-02-24 16:16:19 +09:00
Sebastiaan van Stijn
dd94555787
Merge pull request #32519 from darkowlzz/32443-docker-update-pids-limit
Add pids-limit support in docker update
2019-02-23 15:20:59 +01:00
Sebastiaan van Stijn
308438c1ec
Merge pull request #38783 from Microsoft/jjh/restarthypertests
Windows: Disable 2 restart tests on Hyper-V isolation
2019-02-23 14:00:50 +01:00
Sebastiaan van Stijn
b3407d2029
Testing: create new daemon (only) if needed
Some tests were skipped if the local daemon did not have
experimental features enabled; at the same time, some tests
unconditionally created a new (experimental) daemon, even if
the local daemon already had experimental enabled.

This patch;

- Checks if the "testEnv" is an experimental Linux daemon
- If not, and the daemon is running locally; spin up a new
  experimental daemon to be used during the test.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2019-02-23 13:32:59 +01:00
John Howard
faaffd5d6d Windows:Disable 2 restart test when Hyper-V
Signed-off-by: John Howard <jhoward@microsoft.com>
2019-02-22 11:15:51 -08:00
akolomentsev
5afe2705ac Windows: Fix restart for Hyper-V containers
Signed-off-by: Andrey Kolomentsev <andrey.kolomentsev@docker.com>
2019-02-22 10:37:39 -08:00
Sunny Gogoi
74eb258ffb Add pids-limit support in docker update
- Adds updating PidsLimit in UpdateContainer().
- Adds setting PidsLimit in toContainerResources().

Signed-off-by: Sunny Gogoi <indiasuny000@gmail.com>
Signed-off-by: Brian Goff <cpuguy83@gmail.com>
2019-02-21 14:17:38 -08:00
Brian Goff
cbb885b07a
Merge pull request #38632 from dperny/gmsa-support
Add support for GMSA CredentialSpecs from Swarmkit configs
2019-02-21 09:05:58 -08:00
Sebastiaan van Stijn
0e54f5e3a9
Merge pull request #38686 from cpuguy83/remove_deprecated_newclient
Completely remove deprecated `d.NewClient` from testing tools
2019-02-21 16:12:21 +01:00
Sebastiaan van Stijn
9688f120a2
Merge pull request #38758 from thaJeztah/add_missing_char_device_mode
Graphdriver: fix "device" mode not being detected if "character-device" bit is set
2019-02-20 23:25:26 +01:00
Sebastiaan van Stijn
c7a38c2c06
Graphdriver: fix "device" mode not being detected if "character-device" bit is set
Due to a bug in Golang (github.com/golang#27640), the "character device"
bit was omitted when checking file-modes with `os.ModeType`.

This bug was resolved in Go 1.12, but as a result, graphdrivers
would no longer recognize "device" files, causing pulling of
images that have a file with this filemode to fail;

    failed to register layer:
    unknown file type for /var/lib/docker/vfs/dir/.../dev/console

The current code checked for an exact match of Modes to be set. The
`os.ModeCharDevice` and `os.ModeDevice` bits will always be set in
tandem, however, because the code was only looking for an exact
match, this detection broke now that `os.ModeCharDevice` was added.

This patch changes the code to be more defensive, and instead
check if the `os.ModeDevice` bit is set (either with, or without
the `os.ModeCharDevice` bit).

In addition, some information was added to the error-message if
no type was matched, to assist debugging in case additional types
are added in future.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2019-02-20 11:08:58 +01:00
Drew Erny
6f1d7ddfa4 Use Runtime target
The Swarmkit api specifies a target for configs called called "Runtime"
which indicates that the config is not mounted into the container but
has some other use. This commit updates the Docker api to reflect this.

Signed-off-by: Drew Erny <drew.erny@docker.com>
2019-02-19 13:14:17 -06:00
Yong Tang
7403497573
Merge pull request #38756 from kolyshkin/fix-test-int
make test-integration: use correct dockerd binary
2019-02-19 10:09:18 -08:00
Brian Goff
447ce1325d
Merge pull request #38741 from Microsoft/jjh/signalname
Windows:Update dumpstack event name
2019-02-19 09:13:10 -08:00
Kir Kolyshkin
228bc35e82 make test-integration: use correct dockerd binary
Here's what happens:
1. One runs `make binary` once
2. Days go by...
3. One makes changes to dockerd sources
4. One runs `make test-integration` to test the changes
5. One spends a long time figuring out why on Earth
   those changes in step 3 are ignored by step 4.
6. One writes this patch
7. ...
8. PROFIT!!

OK, so `make test-integration` builds a dockerd binary
in bundles/dynbinary-daemon/, when starts a daemon instance
for testing. The problem is, the script that starts the
daemon sets PATH to try `bundles/binary-daemon/` first,
and `bundles/dynbinary-daemon/` second.

Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
2019-02-18 22:20:49 -08:00
Sebastiaan van Stijn
c093c1e08b
Merge pull request #38718 from thaJeztah/update_containerd_1.2.4
Update containerd 1.2.4
2019-02-17 14:24:22 +01:00
John Howard
733a69e26b Windows:Update dumpstack event name
Signed-off-by: John Howard <jhoward@microsoft.com>
2019-02-15 15:26:56 -08:00
Brian Goff
fcb286895b
Merge pull request #38364 from cpuguy83/fix_stale_container_on_start
Delete stale containerd object on start failure
2019-02-14 14:48:11 -08:00
Brian Goff
5ba30cd1dc Delete stale containerd object on start failure
containerd has two objects with regard to containers.
There is a "container" object which is metadata and a "task" which is
manging the actual runtime state.

When docker starts a container, it creartes both the container metadata
and the task at the same time. So when a container exits, docker deletes
both of these objects as well.

This ensures that if, on start, when we go to create the container metadata object
in containerd, if there is an error due to a name conflict that we go
ahead and clean that up and try again.

Signed-off-by: Brian Goff <cpuguy83@gmail.com>
2019-02-14 11:46:44 -08:00
Sebastiaan van Stijn
818d2ddf02
Merge pull request #38730 from AkihiroSuda/rootlesskit-030alpha2
bump up rootlesskit (fix CentOS failure)
2019-02-14 20:01:10 +01:00
Sebastiaan van Stijn
206004e3a7
Merge pull request #38728 from AkihiroSuda/fix-rootless-stick-xdg
dockerd: call StickRuntimeDirContents only in rootless mode
2019-02-14 20:00:07 +01:00
Akihiro Suda
f1a87919e0 bump up rootlesskit (fix CentOS failure)
Changes:
7905ee34b3...7bbbc48a6f

Signed-off-by: Akihiro Suda <suda.akihiro@lab.ntt.co.jp>
2019-02-14 14:27:28 +09:00
Akihiro Suda
56bea903ef dockerd: call StickRuntimeDirContents only in rootless mode
Signed-off-by: Akihiro Suda <suda.akihiro@lab.ntt.co.jp>
2019-02-14 12:48:41 +09:00
Sebastiaan van Stijn
defb2b57a7
Update containerd client to 1.2.4
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2019-02-14 04:47:27 +01:00