Commit Graph

32159 Commits

Author SHA1 Message Date
ae6e09bc74 Merge component 'packaging' from git@github.com:docker/docker-ce-packaging master 2017-06-01 23:09:14 +00:00
089484b881 Merge component 'cli' from git@github.com:docker/cli master 2017-06-01 21:02:34 +00:00
aa101def38 Merge component 'engine' from git@github.com:moby/moby master 2017-06-01 20:46:42 +00:00
5f4e132587 Merge pull request #144 from thaJeztah/allow-some-flags-during-rollback
Allow --detach and --quiet flags when using --rollback
Upstream-commit: 30af87981d
Component: cli
2017-06-01 14:47:08 -04: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
830b3113ae Merge pull request #136 from johnstep/fix_stack_service_volumes
Fix stack compose bind-mount volumes for Windows
Upstream-commit: bf22fc6781
Component: cli
2017-06-01 11:06:06 -04:00
e1f6bc3e4f Allow --detach and --quiet flags when using --rollback
Commit 78c204ef79 added
(f9bd8ec8b268581f93095c5a80679f0a8ff498bf in the moby repo)
a validation to prevent `--rollback` from being used
in combination with other flags that update the
service spec.

This validation was not taking into account that
some flags only affect the CLI behavior, and
are okay to be used when rolling back.

This patch updates the validation, and adds
`--quiet` and `--detach` to the list of allowed
flags.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: f10f29df8d
Component: cli
2017-06-01 16:31:07 +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
144f2f5310 Fix stack compose bind-mount volumes for Windows
For stack compose files, use filepath.IsAbs instead of path.IsAbs, for
bind-mounted service volumes, because filepath.IsAbs handles Windows
paths, while path.IsAbs does not.

Signed-off-by: John Stephens <johnstep@docker.com>
Upstream-commit: 9043d39dea
Component: cli
2017-05-31 21:13:58 -07:00
472b98cb50 Merge pull request #132 from mavenugo/stack-host
Host and Bridge network support in docker stack deploy
Upstream-commit: efaadcf465
Component: cli
2017-05-31 15:07:56 -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
81dbbfda23 Merge component 'cli' from git@github.com:docker/cli master 2017-05-31 16:43:39 +00:00
f4929f012a Change ARCH to be reflective
Signed-off-by: Eli Uriegas <seemethere101@gmail.com>
Upstream-commit: 930db40ec8424555612ce70781e94d5cb172aa4c
Component: packaging
2017-05-31 11:15:19 -05:00
4e36db9541 Rename deb dockerfiles to $(uname -m) equivalents
Signed-off-by: Eli Uriegas <seemethere101@gmail.com>
Upstream-commit: 3f7e423438733fb5f593f666d12714ae2f63fcc9
Component: packaging
2017-05-31 11:14:20 -05:00
66970d08f9 Update GO_VERSION to 1.8.3 (#8)
Signed-off-by: Eli Uriegas <seemethere101@gmail.com>
Upstream-commit: 121e1c478d94a9be5713e944dde113f8637d6e41
Component: packaging
2017-05-31 09:06:42 -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
5c0019b6e8 Merge pull request #129 from dnephin/remove-gox
Remove gox, add support for s390x
Upstream-commit: 6c59636498
Component: cli
2017-05-30 14:05:58 -07:00
ee28c840c7 Remove gox, add support for s390x
Signed-off-by: Daniel Nephin <dnephin@docker.com>
Upstream-commit: b7b7d784d8
Component: cli
2017-05-30 16:01:21 -04: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
5146944e21 Merge pull request #118 from cpuguy83/no_prune_volume
Don't prune volumes on `docker system prune`
Upstream-commit: f3cb13c550
Component: cli
2017-05-30 10:21:15 -07:00
f001f628d8 Merge pull request #135 from johnstep/fix_stack_service_configs
Include stack service configs in service specs
Upstream-commit: ebd5191c0e
Component: cli
2017-05-30 13:17:49 -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
a89e29d68b Don't prune volumes on docker system prune
Volumes tend to carry important data and pruning them on `docker system
prune` can easily cause unwanted data loss.

Let's play it safe and not prune volumes on `system prune` by default,
and instead provide an option.

Signed-off-by: Brian Goff <cpuguy83@gmail.com>
Upstream-commit: 37fd6128dc
Component: cli
2017-05-30 12:50:30 -04: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
94d3fb628e Include stack service configs in service specs
Signed-off-by: John Stephens <johnstep@docker.com>
Upstream-commit: b7cac96f69
Component: cli
2017-05-26 21:41:04 -07:00
8870137e27 Remove stack configs on stack removal
Signed-off-by: John Stephens <johnstep@docker.com>
Upstream-commit: f05cd11ee2
Component: cli
2017-05-26 18:17:43 -07: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
a582df93a3 Merge pull request #126 from marcusmartins/handle_empty_registry_info
Handle a Docker daemon without registry info
Upstream-commit: 1b8b63be5c
Component: cli
2017-05-26 15:32:09 -07:00
a9dda5c374 Handle a Docker daemon without registry info
The current implementation of the ElectAuthServer doesn't handle well when the
default Registry server is not included in the response from the daemon Info
endpoint.

That leads to the storage and usage of the credentials for the default registry
(`https://index.docker.io/v1/`) under an empty string on the client config file.

Sample config file after a login via a Docker Daemon without Registry
information:
```json
{
	"auths": {
		"": {
			"auth": "***"
		}
	}
}
```

That can lead to duplication of the password for the default registry and
authentication failures against the default registry if a pull/push is performed
without first authenticating via the misbehaving daemon.

Also, changes the output of the warning message from stdout to sdterr as
per dnephin suggestion.

Signed-off-by: Marcus Martins <marcus@docker.com>
Upstream-commit: 862649707e
Component: cli
2017-05-26 14:46:39 -07:00
c7ff61d425 Add armhf dockerfiles for deb building (#4)
Add armhf dockerfiles for deb building

Signed-off-by: Eli Uriegas <seemethere101@gmail.com>
Upstream-commit: f0c8cea1b79b049743cd1503f7ac4a34c265f476
Component: packaging
2017-05-26 13:10:27 -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