Commit Graph

34702 Commits

Author SHA1 Message Date
97a704b2a7 Merge pull request #52 from seemethere/cherry_pick_33335
Check signal is unset before using user stopsignal
2017-06-12 19:24:57 -07:00
6f00f5603d Merge pull request #59 from seemethere/cherry_pick_33473
Update deprecated.md for removal of --email flag
2017-06-12 15:43:01 -07:00
ad098a7a03 Merge pull request #64 from seemethere/cherry_pick_143
Remove deprecated -e/--email flag from docker login
2017-06-12 15:42:02 -07:00
8c2c3e21a3 Remove "-e" / "--email" from integration tests
This option is no longer supported in docker 17.06,
so should not be used.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2017-06-12 10:18:49 -07:00
da2d17a18f Merge pull request #65 from seemethere/cherry_pick_33609
Merge pull request #29418 from aboch/p66
2017-06-12 09:27:42 -07:00
514d89f021 Merge pull request #55 from andrewhsu/revendor-libnetwork-netlink
revendor libnetwork and netlink in engine component
2017-06-11 10:32:17 -07:00
0189f9d259 Merge pull request #57 from seemethere/cherry_pick_33413
Do not reuse a http.Request after a failure in callWithRetry
2017-06-10 22:10:48 -07:00
ca7df6fe42 Merge pull request #61 from seemethere/cherry_pick_33583
Logging driver should receive same file in start/stop request
2017-06-10 22:09:47 -07:00
47c1b00158 Merge pull request #60 from seemethere/cherry_pick_144
Allow --detach and --quiet flags when using --rollback
2017-06-10 15:48:54 -07:00
f7e9f2cefa Merge pull request #58 from seemethere/cherry_pick_33363
Fix cancelling builder on chunked requests
2017-06-10 15:48:02 -07:00
960ddece48 Merge pull request #62 from seemethere/cherry_pick_33598
daemon: Remove daemon datastructure dump functionality
2017-06-10 14:41:21 -07:00
5a5e9e32bd Merge pull request #63 from seemethere/cherry_pick_33606
Backport 17.05.0-ce changelog to master
2017-06-10 13:41:31 -07:00
eff2539693 Merge pull request #44 from nishanttotla/cpick-cli-121
[cherry-pick] Enable client side digest pinning for stack deploy
2017-06-10 13:29:54 -07:00
e92c400a01 Merge pull request #32 from nishanttotla/cpick-moby-33279-17.06
[cherry-pick] vendor: Ensure service images get default tag and print familiar strings
2017-06-10 13:27:49 -07:00
5d4843baa3 Merge pull request #56 from tiborvass/cli-go1.8
Update golang 1.8.3
2017-06-09 18:28:53 -07:00
4e1370233e Merge pull request #13 from mlaventure/chp-moby-33279
Ensure service images get default tag and print familiar strings
2017-06-09 17:58:16 -07:00
091732e350 Merge pull request #29418 from aboch/p66
[1.13.x] Fix buildIpamResources()
(cherry picked from commit 4d2be03b68dd54d8f2307e8b4178ad8ed8d5d343)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
(cherry picked from commit 27498a3c60018ea2880a18beec65710fd27971a7)
Signed-off-by: Eli Uriegas <eli.uriegas@docker.com>
2017-06-09 17:38:11 -07:00
1af533909d Remove deprecated -e/--email flag from docker login
The `docker login -e` / `docker login --email` option was deprecated in
Docker 1.11 (https://github.com/moby/moby/releases/tag/v1.11.0) through
aee260d4eb3aa0fc86ee5038010b7bbc24512ae5 (April 2016), and when used has
been outputing a deprecation warning since;

    Flag --email has been deprecated, will be removed in 17.06.

Originally this option was scheduled to be removed in docker 1.13, but
extended to docker 17.06 due to a change in our deprecation policy.

Given that only docker 1.10 and older use this flag (which is EOL, including
for CS versions, as of February 2017), will now be removed.

With this patch, `docker login` will now produce an Error if the flag
is used.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
(cherry picked from commit 8b383d2351)
Signed-off-by: Eli Uriegas <eli.uriegas@docker.com>
2017-06-09 17:37:14 -07:00
a014274b80 bump to GA
Signed-off-by: Victor Vieux <victorvieux@gmail.com>
(cherry picked from commit 89658bed64c2a8fe05a978e5b87dbec409d57a0f)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
(cherry picked from commit d94f281d78e85f4c7de6b8347ab95d0afd5b8a8d)
Signed-off-by: Eli Uriegas <eli.uriegas@docker.com>
2017-06-09 17:35:56 -07:00
7b65e51031 bump to rc2
Signed-off-by: Victor Vieux <victorvieux@gmail.com>
(cherry picked from commit c57fdb2a14cfba584686ddad909e3006284d10aa)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
(cherry picked from commit b4d36e47c3501541dc66b6336e286b8c11cbcec7)
Signed-off-by: Eli Uriegas <eli.uriegas@docker.com>
2017-06-09 17:35:34 -07:00
ab5798a6f7 daemon: Remove daemon datastructure dump functionality
When sending SIGUSR1 to the daemon, it can crash because of a concurrent
map access panic, showing a stack trace involving dumpDaemon. It appears
it's not possible to recover from a concurrent map access panic. Since
it's important that SIGUSR1 not be a destructive operation, sadly the
best course of action I can think of is to remove this functionality.

Signed-off-by: Aaron Lehmann <aaron.lehmann@docker.com>
(cherry picked from commit a4c68ee8574c9b8a3309ebebee0d90108042ba61)
Signed-off-by: Eli Uriegas <eli.uriegas@docker.com>
2017-06-09 17:34:45 -07:00
899ed1b641 Logging driver should receive same file in start/stop request
Signed-off-by: Peter Bücker <peter.buecker@gmail.com>
(cherry picked from commit e908e1a357b435d7fab497d51cdd3e58458a0590)
Signed-off-by: Eli Uriegas <eli.uriegas@docker.com>
2017-06-09 17:33:46 -07:00
a9a1a9c7de Merge pull request #43 from cyli/re-vendor-swarmkit
[17.06] Re-vendor swarmkit
2017-06-09 17:32:55 -07:00
5ed0b2e10c 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>
(cherry picked from commit f10f29df8d)
Signed-off-by: Eli Uriegas <eli.uriegas@docker.com>
2017-06-09 17:31:40 -07:00
7950a39242 Update deprecated.md for removal of --email flag
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
(cherry picked from commit 43239f62bedc4721d27744d21c122622988bb3ae)
Signed-off-by: Eli Uriegas <eli.uriegas@docker.com>
2017-06-09 17:30:43 -07:00
5bd868da90 Fix cancelling builder on chunked requests
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
(cherry picked from commit 23628bd7efb0aae565cea5ee040e373b0c93fd8d)
Signed-off-by: Eli Uriegas <eli.uriegas@docker.com>
2017-06-09 17:29:44 -07:00
e142124317 Do not reuse a http.Request after a failure in callWithRetry
Closes: #33412

Signed-off-by: Felix Abecassis <fabecassis@nvidia.com>
(cherry picked from commit 62871ef2fa52b0a2e426c30f36d35a9ba1e92fac)
Signed-off-by: Eli Uriegas <eli.uriegas@docker.com>
2017-06-09 17:28:34 -07:00
0fa9fe7713 Fixing e2e test
Because of cherry-pick from commit
5efcec77170dd6c4087d4f1fb3695c32d94edfb4 into
components/cli/vendor/github.com/docker/docker

Signed-off-by: Nishant Totla <nishanttotla@gmail.com>
2017-06-10 00:27:43 +00:00
69fc734572 Comment out vendoring for docker/docker in components/cli
Because of cherry-pick from commit 5efcec77170dd6c4087d4f1fb3695c32d94edfb4
into components/cli/vendor/github.com/docker/docker

Signed-off-by: Andrew Hsu <andrewhsu@docker.com>
2017-06-10 00:27:43 +00:00
5e405a94e8 Ensure service images get default tag and print familiar strings
Signed-off-by: Nishant Totla <nishanttotla@gmail.com>
(cherry picked from commit 5efcec77170dd6c4087d4f1fb3695c32d94edfb4)

Conflicts resolved:
components/cli/vendor/github.com/docker/docker/client/service_create.go

Signed-off-by: Andrew Hsu <andrewhsu@docker.com>
2017-06-10 00:27:05 +00:00
897b692e1c Merge pull request #53 from seemethere/cherry_pick_33419
libcontainerd: fix reaper goroutine position
2017-06-09 17:21:17 -07:00
d8fc4f1ad2 Merge pull request #54 from andrewhsu/opost
revert Set OPOST on bsd
2017-06-09 17:17:37 -07:00
af4ae65a0d Merge pull request #51 from seemethere/cherry_pick_33307
Event tests need to wait for events
2017-06-09 16:59:23 -07:00
c8fa12c15c Merge pull request #49 from seemethere/cherry_pick_33464
Do not log the CA config CA signing key in debug mode.
2017-06-09 15:36:06 -07:00
36f4ffb042 Merge pull request #50 from seemethere/cherry_pick_33524
Fix Cache with ONBUILD
2017-06-09 15:34:01 -07:00
0cbae9b2ee Merge pull request #48 from seemethere/cherry_pick_33330
Don't create source directory while the daemon is being shutdown, fix…
2017-06-09 15:33:19 -07:00
dcd1f685c8 Merge pull request #47 from seemethere/cherry_pick_33249
Add container environment variables correctly to the health check
2017-06-09 15:32:27 -07:00
05648d36b5 Merge pull request #46 from seemethere/cherry_pick_cli_162
Handle case of configs on old daemon
2017-06-09 15:31:43 -07:00
e1ebcf33f6 Merge pull request #45 from seemethere/cherry_pick_33578
Service alias should not be copied to task alias
2017-06-09 15:31:00 -07:00
4ea6f802a5 Update golang 1.8.3
Signed-off-by: Stefan Scherer <scherer_stefan@icloud.com>
(cherry picked from commit b38c49411b)
Signed-off-by: Tibor Vass <tibor@docker.com>
2017-06-09 22:26:59 +00:00
be7a008421 revendoring netlink in engine component
bumping vendor of vishvananda/netlink to bd6d5de5ccef2d66b0a26177928d0d8895d7f969

Signed-off-by: Andrew Hsu <andrewhsu@docker.com>
2017-06-09 21:37:15 +00:00
fcd821892e revendoring libnetwork in engine component
bumping vendor of docker/libnetwork to 411846172fb457a6459ea94eb536f91717ee0a04

Signed-off-by: Andrew Hsu <andrewhsu@docker.com>
2017-06-09 21:27:44 +00:00
1f928815e5 Revert "Set OPOST on bsd"
This reverts commit fff42c853a.

Signed-off-by: Andrew Hsu <andrewhsu@docker.com>
2017-06-09 20:55:50 +00:00
ad8c94e585 Revert "[vendor] Set OPOST on bsd"
This reverts commit 972de9a657.

Signed-off-by: Andrew Hsu <andrewhsu@docker.com>
2017-06-09 20:55:49 +00:00
058e676c7f Revert "Comment out vendoring for docker/docker in components/cli"
This reverts commit 8928dccaa6.

Signed-off-by: Andrew Hsu <andrewhsu@docker.com>
2017-06-09 20:55:41 +00:00
11637f7d81 Re-vendor swarmkit to include the following fixes:
- https://github.com/docker/swarmkit/pull/2218
- https://github.com/docker/swarmkit/pull/2215
- https://github.com/docker/swarmkit/pull/2233

Signed-off-by: Ying <ying.li@docker.com>
2017-06-09 13:25:15 -07:00
5965f0216f 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>

(cherry picked from commit 27087eacbf96e6ef9d48a6d3dc89c7c1cff155b4)

Signed-off-by: Eli Uriegas <eli.uriegas@docker.com>

Signed-off-by: Eli Uriegas <eli.uriegas@docker.com>
2017-06-09 13:23:20 -07:00
3910d5b571 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>
(cherry picked from commit 114652ab86609e5c0cbfad84f642942b466a0596)
Signed-off-by: Eli Uriegas <eli.uriegas@docker.com>
2017-06-09 13:21:29 -07:00
03d8258b7d Event tests need to wait for events
Signed-off-by: Dong Chen <dongluo.chen@docker.com>
(cherry picked from commit 59b2d0473af5155bb31adcc17bc36857ebd13a15)
Signed-off-by: Eli Uriegas <eli.uriegas@docker.com>
2017-06-09 13:19:58 -07:00
1c2ce3d977 Fix Cache with ONBUILD
Signed-off-by: Daniel Nephin <dnephin@docker.com>
(cherry picked from commit f1ade82d82e6436971c6b7d08eb1da57ed9ba756)
Signed-off-by: Eli Uriegas <eli.uriegas@docker.com>
2017-06-09 13:17:47 -07:00