Commit Graph

30724 Commits

Author SHA1 Message Date
00a54e78b7 Merge pull request #33481 from tpot/33480-fix-assert-message
Fix incorrect assert message in TestReadProcBool
Upstream-commit: 7057f6fa0cac7413f113ccd718bb7c8d7c34e583
Component: engine
2017-06-02 11:52:29 +02:00
73a826b637 Merge pull request #33473 from thaJeztah/update-deprecated
Update deprecated.md for removal of --email flag
Upstream-commit: 9ff8068ca2bb1ba308ceec8f6a6ccb0fe7e7e746
Component: engine
2017-06-02 08:57:21 +02:00
cfcd7c0452 Merge pull request #33436 from Microsoft/jjh/parserdirective
Builder: Fix parser directive refactoring
Upstream-commit: 57ca00240b9b73d967aad1deae07294fef092f98
Component: engine
2017-06-01 21:21:46 -07:00
b6073e5ee6 Fix incorrect assert message in TestReadProcBool
Closes #33480.

Signed-off-by: Tim Potter <tpot@hpe.com>
Upstream-commit: cd457e7885ecb0b00e91162113ce597f131c8386
Component: engine
2017-06-02 10:15:58 +10:00
d6016b7163 Merge pull request #33474 from mlaventure/test-with-actual-cli-version
Use actual cli version for TestConfigHTTPHeader
Upstream-commit: 986510951ae3c1accb7c6be2993f54300edcad77
Component: engine
2017-06-01 16:18:04 -07:00
10e27f6561 Merge pull request #33335 from cpuguy83/33334_check_unset_sig
Check signal is unset before using user stopsignal
Upstream-commit: 872e28bb1452c6e333549a55dcb651fcff2a6bd1
Component: engine
2017-06-01 23:10:16 +02:00
d4709bb827 Merge pull request #33446 from raja-sami-10p/pkg/platform
Increase the Coverage of pkg/platform
Upstream-commit: 7ff205571f6016c10638e16026d1673b2f5b6615
Component: engine
2017-06-01 19:14:15 +02:00
be69462c28 Use actual cli version for TestConfigHTTPHeader
Signed-off-by: Kenfe-Mickael Laventure <mickael.laventure@gmail.com>
Upstream-commit: 0b90edc22fa95e04b4d3208a72bb276be699b260
Component: engine
2017-06-01 09:35:30 -07:00
9d937bfa88 Update deprecated.md for removal of --email flag
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: 43239f62bedc4721d27744d21c122622988bb3ae
Component: engine
2017-06-01 17:05:42 +02:00
5f38794750 Merge pull request #32590 from moypray/containerd
Fix when containerd restarted, event handler may exit
Upstream-commit: d7c125791a3fa6cf233a8f9d017c28ae65d5b535
Component: engine
2017-06-01 08:16:24 -04:00
02f992f2b8 Fix Typos: continer,contianer -> container
Signed-off-by: Chen Min <chenmin46@huawei.com>
Upstream-commit: 2b62eb434be4770c101ef79666a952fd7f43a742
Component: engine
2017-06-01 19:21:01 +08:00
4cb2e1a089 Builder: Fix parser directive refactoring
Signed-off-by: John Howard <jhoward@microsoft.com>
Upstream-commit: c97170d618b7a1f35f47672143bd287666802287
Component: engine
2017-05-31 18:48:27 -07:00
61ed140656 Merge pull request #33443 from DeliangFan/fix_download_image_fails
Fix downloading image fails when build docker
Upstream-commit: 555bd548cacfbe02447ebb055d3efa5eeaabe972
Component: engine
2017-05-31 21:03:37 +02:00
733e94a59a Merge pull request #33363 from tonistiigi/fix-chunked-build
Fix cancelling builder on chunked requests
Upstream-commit: 7ea0d1ecc6436063bfc9c72d09a75f15b029ac88
Component: engine
2017-05-31 20:18:35 +02:00
6fa6566523 Merge pull request #33329 from wenjianhn/EINVAL
Don't log EINVAL when unmount IPC
Upstream-commit: 41c3c9cc866d0e310664e2c4cbd42f0df1b88efa
Component: engine
2017-05-31 11:17:19 -07:00
a5b7ff8786 Merge pull request #33305 from thaJeztah/suppress-logger-close-error
Don't log error if file is already closed
Upstream-commit: 316681cd2a644ef7f98fbaf4ca91a45a021b4b22
Component: engine
2017-05-31 17:09:09 +02:00
02dca610a4 Merge pull request #33249 from ripcurld0/env_validate
Add container environment variables correctly to the health check
Upstream-commit: 7c2f20107a0599008152179a18cc8d0323ccc589
Component: engine
2017-05-31 07:35:28 -07:00
421a16553e Increase the Coverage of pkg/platform
Signed-off-by: Raja Sami <raja.sami@tenpearls.com>
Upstream-commit: bdc87676bfee0f9a26fe12323dbe6875af783645
Component: engine
2017-05-31 13:26:40 +05:00
8e156ee521 Don't warn if the shm or mquere is not mounted
Fix #33328

Signed-off-by: Jacob Wen <jian.w.wen@oracle.com>
Upstream-commit: cfa2591d3f2636221e5005b3609aeb572e0c6653
Component: engine
2017-05-31 16:19:59 +08:00
6ed8b96066 Fix downloading image fails when build docker
Generate a token for each download process to avoid token expired.

Closes: #33441

Signed-off-by: vanderliang <lansheng@meili-inc.com>
Upstream-commit: cb502cd4e894a78e723902a4d2f23174b69430ce
Component: engine
2017-05-31 14:21:32 +08:00
4c527a90e5 Merge pull request #33387 from cpuguy83/go1.8.3
Bump go to go1.8.3
Upstream-commit: 75e685d620d6a37ec2db87c3c44ca5d918db740c
Component: engine
2017-05-31 02:18:09 +02:00
1369e3364d Merge pull request #33419 from runcom/fix-reaper-containerd
libcontainerd: fix reaper goroutine position
Upstream-commit: 4f55e390c4e5230bad232c462d60f8564faea17f
Component: engine
2017-05-30 10:55:38 -07:00
0a1989cb37 Check signal is unset before using user stopsignal
This fixes an issue where if a stop signal is set, and a user sends
SIGKILL, `container.ExitOnNext()` is not set, thus causing the container
to restart.

Signed-off-by: Brian Goff <cpuguy83@gmail.com>
Upstream-commit: 114652ab86609e5c0cbfad84f642942b466a0596
Component: engine
2017-05-30 13:04:36 -04:00
9b30256194 Merge pull request #33360 from aaronlehmann/vendor-swarmkit-7e096ced
Vendor swarmkit 7e096ced
Upstream-commit: 6629f1d0e753edc960f30030299e0e5d48b845aa
Component: engine
2017-05-30 09:59:48 -07:00
9ac5a90734 Bump go to go1.8.3
Note that go1.8.2 contains a security fix (CVE-2017-8932).

Signed-off-by: Brian Goff <cpuguy83@gmail.com>
Upstream-commit: 0c7c900e9e66335a6bd486be008af43ae83a5a37
Component: engine
2017-05-30 10:15:59 -04:00
c13c5f5760 Merge pull request #33311 from msabansal/dnssearch
Adding support for DNS search on RS1
Upstream-commit: 4bf8714fac11e95e835cf78eb15ba5a518c67c4b
Component: engine
2017-05-30 13:09:18 +02:00
7502b7e1e9 Merge pull request #33411 from vdemeester/move-configdir-away
Move cli.Configdir away (in `flags`).
Upstream-commit: 599f207b45e74648a8a6a7ac87d77e40930504e9
Component: engine
2017-05-30 11:49:40 +02:00
04f354cc94 Merge pull request #33413 from flx42/fix-plugin-retry
Do not reuse a http.Request after a failure in callWithRetry
Upstream-commit: 6f46afd9786f2d09b797ba196f75317f1aab4d1a
Component: engine
2017-05-29 17:30:51 -07:00
58ecec6e8e Move cli.Configdir away (in flags).
This makes integration not depend anymore of `cli` and thus not
require `cobra` and other packages to compile.

Signed-off-by: Vincent Demeester <vincent@sbr.pm>
Upstream-commit: 71d60ec0eb7eeddc73d2cf63748ab7debe3f06af
Component: engine
2017-05-29 16:22:33 -07:00
e9185f10cf Don't log error if file is already closed
When closing the log-file, and the file is already
closed, there's no need to log an error.

This patch adds a `closed` boolean to check if the
file was closed, and if so, skip closing the file.
This prevents errors like this being logged:

    level=error msg="Error closing logger: invalid argument"

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: 07b51ed300429e88871e40b4d67dc031e2e8901c
Component: engine
2017-05-29 17:42:37 +02:00
bad34014ad Merge pull request #33423 from gesellix/swagger-docs-typo
Fix typo in swagger doc
Upstream-commit: d192db0d9350222d2b8bb6eba8525b04c3be7d61
Component: engine
2017-05-29 15:58:50 +02:00
7acd97d8f9 Merge pull request #33257 from mtesselH/master
Add CreatedAt filed to volume. Display when volume is inspected.
Upstream-commit: 79b19c2e16c43f22187538953f49b2c048b063f8
Component: engine
2017-05-29 10:48:07 +01:00
8329f806d3 Merge pull request #33422 from cpuguy83/dont_unmount_all_the_things
Don't unmount entire plugin manager tree on remove
Upstream-commit: c12becaca72e705b7a52c8a8aeb498db880d0203
Component: engine
2017-05-28 19:25:12 -07:00
1a6d5b7b4c Fix typo in swagger doc
Signed-off-by: Tobias Gesellchen <tobias@gesellix.de>
Upstream-commit: 56da4f2fb2509f9b2c2bc1c1c609c1dabeaec07d
Component: engine
2017-05-27 22:37:36 +02:00
dd2f64591e Don't unmount entire plugin manager tree on remove
This was mistakenly unmounting everything under `plugins/*` instead of
just `plugins/<id>/*` anytime a plugin is removed.

Signed-off-by: Brian Goff <cpuguy83@gmail.com>
Upstream-commit: db5f31732a9868c1e9e4f9a49be70b794ff82d4f
Component: engine
2017-05-27 12:30:37 -04:00
13833c9420 libcontainerd: fix reaper goroutine position
It has observed defunct containerd processes accumulating over
time while dockerd was permanently failing to restart containerd.
Due to a bug in the runContainerdDaemon() function, dockerd does not clean up
its child process if containerd already exits very soon after the (re)start.

The reproducer and analysis below comes from docker 1.12.x but bug
still applies on latest master.

- from libcontainerd/remote_linux.go:

  329 func (r *remote) runContainerdDaemon() error {
   :
   :      // start the containerd child process
   :
  403     if err := cmd.Start(); err != nil {
  404             return err
  405     }
   :
   :      // If containerd exits very soon after (re)start, it is
possible
   :      // that containerd is already in defunct state at the time
when
   :      // dockerd gets here. The setOOMScore() function tries to
write
   :      // to /proc/PID_OF_CONTAINERD/oom_score_adj. However, this
fails
   :      // with errno EINVAL because containerd is defunct. Please see
   :      // snippets of kernel source code and further explanation
below.
   :
  407     if err := setOOMScore(cmd.Process.Pid, r.oomScore); err != nil
{
  408             utils.KillProcess(cmd.Process.Pid)
   :
   :              // Due to the error from write() we return here. As
the
   :              // goroutine that would clean up the child has not
been
   :              // started yet, containerd remains in the defunct
state
   :              // and never gets reaped.
   :
  409             return err
  410     }
   :
  417     go func() {
  418             cmd.Wait()
  419             close(r.daemonWaitCh)
  420     }() // Reap our child when needed
   :
  423 }

This is the kernel function that gets invoked when dockerd tries to
write
to /proc/PID_OF_CONTAINERD/oom_score_adj.

- from fs/proc/base.c:

 1197 static ssize_t oom_score_adj_write(struct file *file, ...
 1198                                         size_t count, loff_t
*ppos)
 1199 {
   :
 1223         task = get_proc_task(file_inode(file));
   :
   :          // The defunct containerd process does not have a virtual
   :          // address space anymore, i.e. task->mm is NULL. Thus the
   :          // following code returns errno EINVAL to dockerd.
   :
 1230         if (!task->mm) {
 1231                 err = -EINVAL;
 1232                 goto err_task_lock;
 1233         }
   :
 1253 err_task_lock:
   :
 1257         return err < 0 ? err : count;
 1258 }

The purpose of the following program is to demonstrate the behavior of
the oom_score_adj_write() function in connection with a defunct process.

$ cat defunct_test.c

\#include <unistd.h>

main()
{
    pid_t pid = fork();

    if (pid == 0)
        // child
        _exit(0);

    // parent
    pause();
}

$ make defunct_test
cc     defunct_test.c   -o defunct_test

$ ./defunct_test &
[1] 3142

$ ps -f | grep defunct_test | grep -v grep
root      3142  2956  0 13:04 pts/0    00:00:00 ./defunct_test
root      3143  3142  0 13:04 pts/0    00:00:00 [defunct_test] <defunct>

$ echo "ps 3143" | crash -s
  PID    PPID  CPU       TASK        ST  %MEM     VSZ    RSS  COMM
  3143   3142   2  ffff880035def300  ZO   0.0       0      0
defunct_test

$ echo "px ((struct task_struct *)0xffff880035def300)->mm" | crash -s
$1 = (struct mm_struct *) 0x0
                          ^^^ task->mm is NULL

$ cat /proc/3143/oom_score_adj
0

$ echo 0 > /proc/3143/oom_score_adj
-bash: echo: write error: Invalid argument"

---

This patch fixes the above issue by making sure we start the reaper
goroutine as soon as possible.

Signed-off-by: Antonio Murdaca <runcom@redhat.com>
Upstream-commit: 27087eacbf96e6ef9d48a6d3dc89c7c1cff155b4
Component: engine
2017-05-27 15:13:59 +02:00
81bb7bdddf Do not reuse a http.Request after a failure in callWithRetry
Closes: #33412

Signed-off-by: Felix Abecassis <fabecassis@nvidia.com>
Upstream-commit: 62871ef2fa52b0a2e426c30f36d35a9ba1e92fac
Component: engine
2017-05-26 18:02:31 -07:00
f35cfc66e5 prevent image prune panic
Signed-off-by: Alfred Landrum <alfred.landrum@docker.com>
Upstream-commit: 32da2a4234c5c68ff466dc1afc91ba98dbbe199a
Component: engine
2017-05-26 12:54:39 -07:00
3d97792442 Add CreatedAt filed to volume. Display when volume is inspected.
Closes #32663 by adding CreatedAt field when volume is created.
Displaying CreatedAt value when volume is inspected
Adding tests to verfiy the new field is correctly populated

Signed-off-by: Marianna <mtesselh@gmail.com>

Moving CreatedAt tests from the CLI

Moving the tests added for the newly added CreatedAt field for Volume, from CLI to API tests

Signed-off-by: Marianna <mtesselh@gmail.com>
Upstream-commit: a46f757c4043031379362c5d6b3bad7562ab9fed
Component: engine
2017-05-26 11:47:02 -07:00
933e100f5e Merge pull request #33384 from Microsoft/jjh/sandboxpath
Windows: Remove unused SandboxPath
Upstream-commit: e925820bfd5af066497800a02c597d6846988398
Component: engine
2017-05-25 11:21:15 -07:00
1fc413c063 Merge pull request #33320 from sbko/33138-generic-api-error-messages
Stop referring CLI flags in error messages if API client is unknown
Upstream-commit: a2f3f6660d08dfb667f091e0fd8454c815dd1c81
Component: engine
2017-05-25 10:48:29 -07:00
4b25f2f51d Merge pull request #33061 from dnephin/refactor-builder-probe-cache
[Builder] Refactor builder probe cache and container backend
Upstream-commit: 8d20641d43a05ee04dad0818ac51d5319a8e5e30
Component: engine
2017-05-25 10:10:49 -07:00
292fba1b59 Fix when containerd restarted, event handler may exit
Description:
Kill docker-containerd continuously, and use kill -SIGUSR1 <dockerpid>
to check docker callstacks. And we will find that event
handler: startEventsMonitor or handleEventStream will exit.

This will only happen when system is busy, containerd need more time to
startup, and the monitor gorotine maybe exit.

Signed-off-by: Wentao Zhang <zhangwentao234@huawei.com>
Upstream-commit: 02ce73f62e73e78a4ec29b29fb2ba552221fe885
Component: engine
2017-05-25 17:32:05 +08:00
6a7791114d Merge pull request #33292 from keloyang/attach-restart-check
Add a restarting check to ContainerAttach
Upstream-commit: da3c3ec1458588d5d263dc3babd3dca95fdc7d8d
Component: engine
2017-05-24 18:30:05 -07:00
cfc2b7a626 Merge pull request #33365 from darrenstahlmsft/revendorGowinio
Update go-winio to v0.4.2
Upstream-commit: c22ad736aa2eb2b796cd9a662017e66b1cf970e0
Component: engine
2017-05-24 22:08:59 +01:00
be30b971d7 Windows: Remove unused SandboxPath
Signed-off-by: John Howard <jhoward@microsoft.com>
Upstream-commit: 2f038c25868727310992104b7b267fed6c7dad39
Component: engine
2017-05-24 13:44:35 -07:00
553a2e157c Merge pull request #33376 from nhorman/keepalive
Ensure that a device mapper task is referenced until task is complete
Upstream-commit: e4abe7c2ce9bb496f12adbd6e00713e776fd1807
Component: engine
2017-05-24 15:57:04 -04:00
65da2e84f0 Merge pull request #33358 from vdemeester/fix-integration-request-package
Fix `request.SockRequestRaw` error check
Upstream-commit: ffd3d6ccd92312fe15e080c0267d0f9bdfe90bd4
Component: engine
2017-05-24 11:49:34 -07:00
af8a181696 Merge pull request #33095 from chrisdias/chrisdias/multistagebuild
syntax highlighting: support FROM...AS for multi stage build
Upstream-commit: 08894a7f237945c70ffc1790f5c297a416f85e87
Component: engine
2017-05-24 11:35:17 -07:00
c4ff71019e Merge pull request #33167 from utzb/rpmbuilds
adding rpm builds for ppc64le and s390x
Upstream-commit: 4050e3061ceaeeb6644e1a6fa33a69e81afba4c6
Component: engine
2017-05-24 17:24:23 +01:00