Commit Graph

4708 Commits

Author SHA1 Message Date
280ee18747 Fix api server null pointer def on inspect/ls null ipam-driver networks
- When a network is created with the null ipam driver, docker api server
  thread will deference a nil pointer on `docker network ls` and on
  `docker network inspect <nw>`. This because buildIpamResource()
  assumes a gateway address is always present, which is not correct.

Signed-off-by: Alessandro Boch <aboch@tetrationanalytics.com>
(cherry picked from commit beebfc0cf6240c8af511eb4d7e29314c8de6ddf2)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2017-08-04 13:33:08 +02:00
51acf33ae3 builder: fix copy —from conflict with force pull
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
(cherry picked from commit e430b58811813084df2b9f8b1a9e929114b2187a)
Signed-off-by: Tibor Vass <tibor@docker.com>
2017-07-22 05:38:21 +00:00
2e99eed6f1 Merge pull request #89 from tonistiigi/fix-add-remote
[17.06] build: fix add from remote url
2017-07-12 10:38:32 -07:00
73b8fa7bc6 Make plugin removes more resilient to failure
Before this patch, if the plugin's `config.json` is successfully removed
but the main plugin state dir could not be removed for some reason (e.g.
leaked mount), it will prevent the daemon from being able to be
restarted.

This patches changes this to atomically remove the plugin such that on
daemon restart we can detect that there was an error and re-try. It also
changes the logic so that it only logs errors on restore rather than
erroring out the daemon.

This also removes some code which is now duplicated elsewhere.

Signed-off-by: Brian Goff <cpuguy83@gmail.com>
(cherry picked from commit 11cf394e5ea964636294a219872b188fe5bdf4dd)
Signed-off-by: Andrew Hsu <andrewhsu@docker.com>
2017-07-11 22:51:51 +00:00
d0546cf484 build: fix add from remote url
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
(cherry picked from commit 2981667e11e24e9e1e61252a40ceb11fd7cb9811)
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2017-07-03 11:54:16 -07:00
bb23c93d28 Redact the swarm's spec's signing CA cert when getting swarm info, because
otherwise if the user gets the info from the API, makes a non-CA related change,
then updates, swarm will interpret this as the user trying to remove the signing
key from the swarm.  We are redacting due to usability reasons, not because
the signing cert is secret.  The signing KEY is secret, hence it's redacted.

Signed-off-by: Ying Li <ying.li@docker.com>
(cherry picked from commit bdfbd22afbbf16a07f0316656c6c17453df3e0f7)
Signed-off-by: Tibor Vass <tibor@docker.com>
2017-06-20 01:52:18 +00:00
5d8e13a06c Merge pull request #71 from andrewhsu/dep-v1
cherry-pick: Disable legacy (v1) registries by default
2017-06-12 23:21:57 -07:00
56ecfabb9f Merge pull request #70 from tiborvass/revert-tty-changes
Revert tty changes
2017-06-12 20:53:00 -07:00
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
5e671f7b53 Disable legacy (v1) registries by default
Deprecation of interacting with v1 registries was
started in docker 1.8.3, which added a `--disable-legacy-registry`
flag.

This option was anounced to be the default starting
with docker 17.06, and v1 registries completely
removed in docker 17.12.

This patch updates the default, and disables
interaction with v1 registres by default.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
(cherry picked from commit 128280013f2ad90520c97b47a787be0db883e870)
Signed-off-by: Andrew Hsu <andrewhsu@docker.com>
2017-06-12 23:28:14 +00:00
eaac30972d [engine] Revert ONCLR and OPOST changes
This reverts to a version of runc without the ONCLR cleared to not cause
a regression with different clients using --tty.

This also reverts the OPOST changes to the term package to support the
initial change.

Signed-off-by: Michael Crosby <crosbymichael@gmail.com>
(cherry picked from commit a5e83836a49547b2add871bb52cbd8bfedb57114)
Signed-off-by: Tibor Vass <tibor@docker.com>
2017-06-12 23:27:48 +00: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
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
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
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
36f4ffb042 Merge pull request #50 from seemethere/cherry_pick_33524
Fix Cache with ONBUILD
2017-06-09 15:34:01 -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
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
13934b618c Add container environment variables correctly to the health check
The health check process doesn't have all the environment
varialbes in the container or has them set incorrectly.

This patch should fix that problem.

Signed-off-by: Boaz Shuster <ripcurld.github@gmail.com>
(cherry picked from commit 5836d86ac4d617e837d94010aa60384648ab59ea)
Signed-off-by: Eli Uriegas <eli.uriegas@docker.com>
2017-06-09 13:09:40 -07:00
94f4d72c55 Service alias should not be copied to task alias
If a service alias is copied to task, then the DNS resolution on the
service name will resolve to service VIP and all of Task-IPs and that
will break the concept of vip based load-balancing resulting in all the
dns-rr caching issues.

This is a regression introduced in #33130

Signed-off-by: Madhu Venugopal <madhu@docker.com>
(cherry picked from commit 38c15531501578b96d34be5ce7f33a0be6be078f)
Signed-off-by: Eli Uriegas <eli.uriegas@docker.com>
2017-06-09 12:55:46 -07:00
f15c4fd160 Fixing stack deploy tests to not contact registry
Because of cherry-pick from commit
f790e839fc

Signed-off-by: Nishant Totla <nishanttotla@gmail.com>
2017-06-08 15:20:09 -07:00
9e9c4b52b9 Fix ONBUILD COPY
the source was missing from the second dispatch

Signed-off-by: Daniel Nephin <dnephin@docker.com>
(cherry picked from commit 3f2604157790408acf5ad05c74cebe105f2b6979)
2017-06-05 08:01:05 -07:00
a9548340cb Use actual cli version for TestConfigHTTPHeader
Signed-off-by: Kenfe-Mickael Laventure <mickael.laventure@gmail.com>
(cherry picked from commit 0b90edc22fa95e04b4d3208a72bb276be699b260)
2017-06-01 17:13:23 -07:00
d490134960 Update CLI commit hash
Since this new version of the CLI resolves image digests for swarm
services by default, and we do not want integration tests to talk to
Docker Hub, update CLI tests to suppress this behavior.

Signed-off-by: Aaron Lehmann <aaron.lehmann@docker.com>
Upstream-commit: d012569b78c27e6e52bc5006d9a1d7a2099b1c2b
Component: engine
2017-05-18 12:23:28 -07:00
5f22605796 support cluster events
Signed-off-by: Dong Chen <dongluo.chen@docker.com>
Upstream-commit: 59d45c384a2de7bca73296ce1471646db14cb0c8
Component: engine
2017-05-17 11:46:30 -07:00
0e311d1c4e Merge pull request #33151 from nwt/push-foreign-layers
Add daemon option to push foreign layers
Upstream-commit: a30ef99e8dd2c3e7a54b6410a5709f61db59c07f
Component: engine
2017-05-17 02:04:31 +02:00
67b57727bd Add daemon option to push foreign layers
The --allow-nondistributable-artifacts daemon option specifies
registries to which foreign layers should be pushed.  (By default,
foreign layers are not pushed to registries.)

Additionally, to make this option effective, foreign layers are now
pulled from the registry if possible, falling back to the URLs in the
image manifest otherwise.

This option is useful when pushing images containing foreign layers to a
registry on an air-gapped network so hosts on that network can pull the
images without connecting to another server.

Signed-off-by: Noah Treuhaft <noah.treuhaft@docker.com>
Upstream-commit: 67fdf574d5acd6ddccb6ece0ffe0ace1c1608712
Component: engine
2017-05-16 14:36:36 -07:00
2952e551a8 Merge pull request #32490 from aaronlehmann/start-first-test-failure
Increase health check timeout for TestAPISwarmServicesUpdateStartFirst
Upstream-commit: df4ca50805baa1d1488d811e82125f607c8daa09
Component: engine
2017-05-15 16:23:05 -07:00
81db28deb9 Merge pull request #32996 from dperny/service-logs-support-details
Fix Ambigious Logs Format and Add Support for Details in Service Logs
Upstream-commit: 7fd8a9382c0fd3f23002288e357b5612b869a974
Component: engine
2017-05-15 13:57:44 +02:00
6879ffc828 Merge pull request #33146 from Microsoft/jjh/TestAPIStatsNoStreamGetCpu
Fix flaky TestAPIStatsNoStreamGetCpu
Upstream-commit: 8a03eb0b6cc56879eada4a928c6314f33001fc83
Component: engine
2017-05-15 11:21:53 +02:00
418f2b9f51 Merge pull request #33179 from tonistiigi/fix-from-scratch
Fix resetting image metadata between stages for scratch case
Upstream-commit: 4e0fdc9098e2ff9e4e78287f8d60aef8af465d55
Component: engine
2017-05-13 21:17:02 -07:00
537a743ad7 Merge pull request #33182 from cyli/exclusive-root-pools-in-daemon
Use exclusive root pools if a CA cert file is specified in the daemon
Upstream-commit: 190c6e8cf8b893874a33d83f78307f1bed0bfbcd
Component: engine
2017-05-13 21:15:42 -07:00
a00f1ffcd6 Merge pull request #32874 from cpuguy83/metrics_plugins
Add support for metrics plugins
Upstream-commit: 680084b2a2eb1ac1ced2dd4c695fdc469c25dc7f
Component: engine
2017-05-12 15:44:34 -07:00
deaa6eb130 Use exclusive root pools if a CA cert file is specified in the daemon
Signed-off-by: Ying Li <ying.li@docker.com>
Upstream-commit: ddd5278b07b1c2b12b906244153fd9340e0d7910
Component: engine
2017-05-12 14:43:34 -07:00
033ef466ec Fix resetting image metadata between stages for scratch case
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
Upstream-commit: b192218503427a49b6de0a093e38e2697a22427a
Component: engine
2017-05-12 12:00:55 -07:00
51fcae249a Change log details encoding format and support details on service logs
URL query encode log details, so that characters like spaces don't make
log parsing ambiguous. Add a helper function to parse these details to a
map, if needed

Add support for details on service logs

Signed-off-by: Drew Erny <drew.erny@docker.com>
Upstream-commit: 68f21418ac1f1acb2874b45878a5938475becf1f
Component: engine
2017-05-12 10:53:44 -07:00
31f26ea6ab TestAPISwarmServicesUpdateStartFirst: Increase timeout on health check command
Signed-off-by: Aaron Lehmann <aaron.lehmann@docker.com>
Upstream-commit: 47436e9628149e7077a8e89c2fcac2a8f85bc62a
Component: engine
2017-05-12 10:42:29 -07:00
d7fd55d70a Merge pull request #32993 from cyli/root-rotation-cli
API changes to rotate swarm root CA
Upstream-commit: eb8abc95985bf3882a4a177c409a96e36e25f5b7
Component: engine
2017-05-12 10:12:32 -07:00
e9abb077b7 Add support for metrics plugins
Allows for a plugin type that can be used to scrape metrics.
This is useful because metrics are not neccessarily at a standard
location... `--metrics-addr` must be set, and must currently be a TCP
socket.
Even if metrics are done via a unix socket, there's no guarentee where
the socket may be located on the system, making bind-mounting such a
socket into a container difficult (and racey, failure-prone on daemon
restart).

Metrics plugins side-step this issue by always listening on a unix
socket and then bind-mounting that into a known path in the plugin
container.

Note there has been similar work in the past (and ultimately punted at
the time) for consistent access to the Docker API from within a
container.

Why not add metrics to the Docker API and just provide a plugin with
access to the Docker API? Certainly this can be useful, but gives a lot
of control/access to a plugin that may only need the metrics. We can
look at supporting API plugins separately for this reason.

Signed-off-by: Brian Goff <cpuguy83@gmail.com>
Upstream-commit: 0e8e8f0f318656be80e34db9b5e390ffeef3fd0d
Component: engine
2017-05-12 00:30:09 -04:00
887d3ac7d1 Merge pull request #33108 from justincormack/revert-seccomp-sockets
Revert "Block obsolete socket families in the default seccomp profile"
Upstream-commit: 33ebf32cb0d0b865d002e8afd0c35b6474f04eb6
Component: engine
2017-05-12 00:30:08 +02:00
cb58c9e54e Merge pull request #32336 from aaronlehmann/configs
Configuration files for services
Upstream-commit: 69c35dad8e7ec21de32d42b9dd606d3416ae1566
Component: engine
2017-05-11 13:25:40 -07:00
8d785cac10 Merge pull request #32587 from dmcgowan/trust-key-config
Expose trust key path in config
Upstream-commit: 577168700200e8e993b2692ef87e05a67783a08c
Component: engine
2017-05-11 21:03:47 +02:00
4b2490c791 Add API test to rotate the swarm CA certificate
Signed-off-by: Ying Li <ying.li@docker.com>
Upstream-commit: 376c75d13cedd22c578197a140ffc10e27e84d01
Component: engine
2017-05-11 11:13:14 -07:00
53e0ae35b8 Add integration test coverage for configs
Signed-off-by: Aaron Lehmann <aaron.lehmann@docker.com>
Upstream-commit: d2c5b6ee9f5240e23aa9fa0f374b89a9726d2200
Component: engine
2017-05-11 10:18:44 -07:00
2c6473821e Merge pull request #33054 from dnephin/refactor-builder-named-contexts-interface
[Builder] Expose GetImage interface for builder
Upstream-commit: 974cec945b80bc0004f3917ec318c15e9c038e4a
Component: engine
2017-05-11 11:03:30 -04:00
cfa3cb0b21 Merge pull request #32906 from fcrisciani/init_race_cond
Race condition fix for swarm join/leave
Upstream-commit: 77d5a0996f0e007330424ea4740e908fd887cf37
Component: engine
2017-05-11 05:18:40 -07:00
eaff058a53 Fix race condition between swarm and libnetwork
This commit in conjunction with a libnetwork side commit,
cleans up the libnetwork SetClusterProvider logic interaction.
The previous code was inducing libnetwork to spawn several go
routines that were racing between each other during the agent
init and close.

A test got added to verify that back to back swarm init and leave
are properly processed and not raise crashes

Signed-off-by: Flavio Crisciani <flavio.crisciani@docker.com>
Upstream-commit: e2ec006797fa14f59bcf7b9c23505ccdf1d3ded3
Component: engine
2017-05-10 21:16:52 -07:00