Commit Graph

33228 Commits

Author SHA1 Message Date
bf25aa33ff Merge pull request #37209 from thaJeztah/bump_libnetwork
bump libnetwork to 3931ba4d815e385ab97093c64477b82f14dadefb
Upstream-commit: 21291e5aefe1f13f3208d57bcc4183848c492bd1
Component: engine
2018-06-06 13:41:33 -07:00
5028541e5c Merge pull request #37192 from thaJeztah/update_miekd_dns
Update miekg/dns to v1.0.7
Upstream-commit: 9b0b9a0ece532caa806594b5fbc5eef2d6777b10
Component: engine
2018-06-06 11:24:54 -07:00
f6411898cc Merge pull request #36895 from dmcgowan/vendor-containerd-master
Update containerd to 1.1
Upstream-commit: fd2f2a919e392b96de74795ae9af2dc5e510bc4c
Component: engine
2018-06-05 21:43:31 -07:00
4cdb057509 bump libnetwork to 3931ba4d815e385ab97093c64477b82f14dadefb
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: fe02b187555b25cb1a92ecaaac2b8b9f5b6a293d
Component: engine
2018-06-05 11:29:23 -07:00
50be59326e Fix wrong assertion in volume/service package
This last assertion shouldn't be there, those cases should be handled
by the for/switch above.

Signed-off-by: Vincent Demeester <vincent@sbr.pm>
Upstream-commit: 04207c2db9cd82e47aa82bc2834fe3820086a697
Component: engine
2018-06-05 18:51:17 +02:00
2452577cb1 Merge pull request #37194 from AntaresS/fix-test-failure
fix a failed test
Upstream-commit: ca25df3b54300e897d96029dcc4f86b8c4215a27
Component: engine
2018-06-05 02:38:04 +02:00
0e7017a3ae Merge pull request #36688 from cpuguy83/volumes_service
Extract volume interaction to a volumes service
Upstream-commit: 5037c5a8ce762b46638378b7a7d1081572eadba1
Component: engine
2018-06-05 02:16:20 +02:00
77116c8094 Update containerd daemon
Signed-off-by: Derek McGowan <derek@mcgstyle.net>
Upstream-commit: a0009345f51d7a58a2f188d7ffc7e0e837a5238d
Component: engine
2018-06-04 15:37:03 -07:00
60c800804e Update containerd to 1.1
Updates swarmkit, grpc, and all related vendors

Signed-off-by: Derek McGowan <derek@mcgstyle.net>
Upstream-commit: 52ed3e0896c203013388a3eb603658f345a9d80a
Component: engine
2018-06-04 15:37:03 -07:00
94cab3b97b Merge pull request #37191 from adshmh/use-unique-names-for-integration-tests-secret
use unique names for resources in integration tests of secret package
Upstream-commit: d7e94d6ea7c1a76c79b6da722491c79118236999
Component: engine
2018-06-05 00:06:50 +02:00
82d56e0c15 fix a failed test
Signed-off-by: Anda Xu <anda.xu@docker.com>
Upstream-commit: 1d9973c0d4c51362e8c5b38e585a025c90baf085
Component: engine
2018-06-04 14:29:00 -07:00
f5f666914b Merge pull request #37197 from tonistiigi/vendor-buildkit
vendor: dockerfile parser from buildkit
Upstream-commit: e466f999aa9d2add9ccaca655f8d53c3112c121d
Component: engine
2018-06-04 14:53:22 +02:00
f01f23683f vendor: add new opentracing deps for session tracing
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
Upstream-commit: ad77dee8baafc478baa18f65a4972ba19b6e973f
Component: engine
2018-06-02 11:10:38 -07:00
2f23577c7a vendor: use dockerfile parser from buildkit
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
Upstream-commit: c9ebd2f13b3aab49c2d90cc38dcf2cd0d059697f
Component: engine
2018-06-02 11:10:34 -07:00
de438df3a8 Allow to add any args when doing a make run
`make DOCKERD_ARGS=--init binary run` should start the daemon with
`--init` as flags (with any other "automagically" added ones).

Signed-off-by: Vincent Demeester <vincent@sbr.pm>
Upstream-commit: d2af0d96e3fbdfec340cb707b795b863411b00e1
Component: engine
2018-06-01 19:19:20 +02:00
9d9413af9f Update miekg/dns to v1.0.7
This dependency now uses SemVer, tagged releases.
Also updates dependencies

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: 4acddf21b7c11c2c6a71f0f9ba1d329cfbb99e5f
Component: engine
2018-06-01 16:24:59 +02:00
37acacf605 use unique names for resources in integration tests of integration/secret package
Signed-off-by: Arash Deshmeh <adeshmeh@ca.ibm.com>
Upstream-commit: a70794aff0fc5a02db9c939397d663f174d2f726
Component: engine
2018-06-01 06:46:52 -04:00
d2c390cca0 Merge pull request #37177 from cpuguy83/minor_plugin_addr_change
Move plugin client to separate interface
Upstream-commit: 71cd53e4a197b303c6ba086bd584ffd67a884281
Component: engine
2018-05-31 08:22:04 -07:00
6aff3ef24e Merge pull request #37174 from thaJeztah/no_additional_magic_matching
Be explicit about github.com prefix being a legacy feature
Upstream-commit: 2ea4ece674e04c04174ee9fff8005cdccdc4fad0
Component: engine
2018-05-31 09:45:59 +02:00
065fbace32 Merge pull request #37178 from tonistiigi/layer-leak
builder: fix layer leak on multi-stage wildcard copy
Upstream-commit: 3e494c4b934b7fc3756d91b6e8117c9e4d7c28f1
Component: engine
2018-05-31 09:39:28 +02:00
98281f1a9c fix the mis-used skip condition
Signed-off-by: Anda Xu <anda.xu@docker.com>
Upstream-commit: d8e6f273b5016880c5d49673ddf531ceecc2bc0d
Component: engine
2018-05-30 17:13:20 -07:00
84cf46c71d Merge pull request #37134 from thaJeztah/fix-env-substitution
builder: fix processing of invalid substitusion syntax
Upstream-commit: b2719e35f58c5420ae3dd6ab8e583fba8c6cf6d9
Component: engine
2018-05-30 16:52:01 -07:00
442215fe6a builder: fix layer leak on multi-stage wildcard copy
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
Upstream-commit: 4a18c11bdc1300692def2453c441190d73e1e942
Component: engine
2018-05-30 15:18:40 -07:00
ab001b0599 Merge pull request #37169 from AntaresS/add-version-checking
add api version checking for tests from new feature
Upstream-commit: 0a94468a5bed080a77a01847515123b9c2eff62e
Component: engine
2018-05-30 09:58:45 -10:00
285424548c Move plugin client to separate interface
This makes it a bit simpler to remove this interface for v2 plugins
and not break external projects (libnetwork and swarmkit).

Note that before we remove the `Client()` interface from `CompatPlugin`
libnetwork and swarmkit must be updated to explicitly check for the v1
client interface as is done int his PR.

This is just a minor tweak that I realized is needed after trying to
implement the needed changes on libnetwork.

Signed-off-by: Brian Goff <cpuguy83@gmail.com>
Upstream-commit: 7c77df8acc597cd4f540d873de5fe53a3d414ba9
Component: engine
2018-05-30 15:22:10 -04:00
75e47b0eb6 Merge pull request #36874 from kolyshkin/stop-timeout
daemon.ContainerStop(): fix for a negative timeout
Upstream-commit: b85799b63fb25423620ed16e717a99401cd3a39b
Component: engine
2018-05-30 13:38:42 -04:00
231bc963aa Merge pull request #37017 from cpuguy83/plugins_addr
Move plugin client creation to the extension point
Upstream-commit: cbbe0ff5119c7e3480827f57a2210f03152644f7
Component: engine
2018-05-30 09:54:46 -07:00
90dfa0b4ee Be explicit about github.com prefix being a legacy feature
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: babb0c14fd1281b309de46c3481a5bea88b8031d
Component: engine
2018-05-30 11:09:14 +02:00
f21c0ccd84 Merge pull request #37131 from kolyshkin/top-opt
Optimize ContainerTop() aka docker top
Upstream-commit: 65bd038fc5e47ed37d2702cbdd6ce484d320380b
Component: engine
2018-05-30 03:28:07 +02:00
a99e1e1ff6 add api version checking for tests from new feature
Signed-off-by: Anda Xu <anda.xu@docker.com>
Upstream-commit: 8ed0fdebe714c64aa697ed7e2187d2233e34eb22
Component: engine
2018-05-29 15:25:33 -07:00
8b1898b015 Merge pull request #37166 from yongtang/05282018-unique-service-name
Add `t.Name()` to tests so that service names are unique
Upstream-commit: 864b36255dce627443b18e7e44549d506a71f14a
Component: engine
2018-05-29 12:04:21 +02:00
37672d40d5 Add t.Name() to tests so that service names are unique
This fix adds `t.Name()` to tests in integration/network
so that services created in those tests have unique names.

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
Upstream-commit: 76195f8047eb9a6be710d53ec493ab97bcf86e20
Component: engine
2018-05-28 22:57:52 +00:00
2c7c1d708b Alternative failure mitigation of TestExecInteractiveStdinClose
Begin to copy the data until the command to exit and any coping to
stdin or copy from stdout/stderr has completed.
Also adding defense code to trim the possible '\x00' null value.

Signed-off-by: Dennis Chen <dennis.chen@arm.com>
Upstream-commit: 386e0f36c42593ef434517448ccfac5262f958d6
Component: engine
2018-05-28 11:25:31 +08:00
4c7a840b18 Move plugin client creation to the extension point
Signed-off-by: Brian Goff <cpuguy83@gmail.com>
Upstream-commit: f51a96c0165fdcbbe11f62b66b582b7e202f211b
Component: engine
2018-05-25 15:18:53 -04:00
feb51dbad1 Extract volume interaction to a volumes service
This cleans up some of the package API's used for interacting with
volumes, and simplifies management.

Signed-off-by: Brian Goff <cpuguy83@gmail.com>
Upstream-commit: e4b6adc88e967971de634596654d9bc33e7bd7e0
Component: engine
2018-05-25 14:21:07 -04:00
87e43e1762 Handle multi-digit positional parameters
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: 2628896b5e813491f8767ec7fa9d0f057ed4a86e
Component: engine
2018-05-25 18:51:11 +02:00
45e3784610 Add detection of "special parameters" for substitution
Detect Special parameters as defined in
http://pubs.opengroup.org/onlinepubs/009695399/utilities/xcu_chap02.html#tag_02_05_02

Treat these as parameters that are not set, instead of
producing an error that a modifier is missing.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: 9654e9b6f80e1b931763c04400a19596e256c99a
Component: engine
2018-05-25 18:20:22 +02:00
0ed9886f87 Add more test-cases for positional parameters
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: 8687a3f4b8b7ffbc3f32dfe959cb771d662211e6
Component: engine
2018-05-25 18:20:10 +02:00
ad9f08c725 Add line-numbers to asserts
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: b80e0309d220268a2b9e6aec5bb05d7af330e591
Component: engine
2018-05-25 18:20:01 +02:00
1f9af8d4f9 Fix detection for missing parameter in substitution
`${}`, `${:}` and so on are invalid because there's
no parameter within the brackets; fix detection for
this situation and add/update tests.

There were some existing test-cases that were testing
for the wrong behavior, which are now updated.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: 334bf3ea76004d0abe02dd1698989f9eaf87a86a
Component: engine
2018-05-25 18:19:32 +02:00
c8db46ad05 builder: fix processing of invalid substitusion syntax
The builder did not detect syntax errors in substitusions in the
Dockerfile, causing those values to be processed incorrectly instead of
producing an error.

Example 1: missing `}`

    docker build --no-cache -<<'EOF'
    FROM busybox
    ARG var=${aaa:-bbb
    RUN echo $var
    EOF

Before:

    Step 3/3 : RUN echo $var
     ---> Running in f06571e77146
    bbb

After:

    Step 2/3 : ARG var=${aaa:-bbb
    failed to process "${aaa:-bbb": syntax error: missing '}'

Example 2: missing closing `}`, no default value

    docker build --no-cache -<<'EOF'
    FROM busybox
    ARG var=${aaa
    RUN echo $var
    EOF

Before:

    Step 2/3 : ARG var=${aaa
    failed to process "${aaa": missing ':' in substitution

After:

    Step 2/3 : ARG var=${aaa
    failed to process "${aaa": syntax error: missing '}'

Example 3: double opening bracket (`{`)

    docker build --no-cache -<<'EOF'
    FROM busybox
    ARG var=${{aaa:-bbb}
    RUN echo $var
    EOF

Before:

    Step 2/3 : ARG var=${{aaa:-bbb}
    failed to process "${{aaa:-bbb}": missing ':' in substitution

After:

    Step 2/3 : ARG var=${{aaa:-bbb}
    failed to process "${{aaa:-bbb}": syntax error: bad substitution

Example 4: double opening bracket (`{`), no default value

    docker build --no-cache -<<'EOF'
    FROM busybox
    ARG var=${{aaa}
    RUN echo $var
    EOF

Before:

    Step 2/3 : ARG var=${{aaa}
    failed to process "${{aaa}": missing ':' in substitution

After:

    Step 2/3 : ARG var=${{aaa}
    failed to process "${{aaa}": syntax error: bad substitution

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: 955a6ad95f7891a45692d975793abf1eeb07cdd5
Component: engine
2018-05-25 18:19:17 +02:00
7cd3587aa3 Merge pull request #37141 from thaJeztah/bump_api_v1_38
Update API version to v1 38
Upstream-commit: 9c2c887b125df56e622d20ebbbe626c55b61e44a
Component: engine
2018-05-24 17:54:05 -10:00
034a285949 ContainerTop: improve error message
If "ps" fails, in many cases it prints a meaningful error message
which a user can benefit from. Let's use it.

While at it, let's use errdefs.System to classify the error,
as well as errors.Wrap.

Before:

> $ docker top $CT <any bad ps options>
> Error response from daemon: Error running ps: exit status 1

After:

> $ docker top $CT auxm
> Error response from daemon: ps: error: thread display conflicts with forest display

or

> $ docker top $CT saur
> Error response from daemon: ps: error: conflicting format options

or, if there's no meaningful error on stderr, same as before:

> $ docker top $CT 1234
> Error response from daemon: ps: exit status 1

Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
Upstream-commit: a41328d5704b8d1adbcd099fb4bb0697060df806
Component: engine
2018-05-24 18:24:36 -07:00
b7dcd71938 ContainerTop: speed up
Current ContainerTop (a.k.a. docker top) implementation uses "ps"
to get the info about *all* running processes, then parses it, then
filters the results to only contain PIDs used by the container.
Collecting data only to throw most of it away is inefficient,
especially on a system running many containers (or processes).
For example, "docker top" on a container with a single process
can take up to 0.5 seconds to execute (on a mostly idle system)
which is noticeably slow.

Since the containers PIDs are known beforehand, let's use ps's
"-q" option to provide it with a list of PIDs we want info about.

The problem with this approach is, some ps options can't be used
with "-q" (the only one I'm aware of is "f" ("forest view") but
there might be more). As the list of such options is not known,
in case ps fails, it is executed again without "q" (retaining
the old behavior).

Next, the data produced by "ps" is filtered in the same way as before.
The difference here is, in case "-q" worked, the list is much shorter.

I ran some benchmarks on my laptop, with about 8000 "sleep" processes
running to amplify the savings.

The improvement in "docker top" execution times is 5x to 10x (roughly
0.05s vs 0.5s).

The improvement in ContainerTop() execution time is up to 100x
(roughly 3ms vs 300ms).

I haven't measured the memory or the CPU time savings, guess those
are not that critical.

NOTE that busybox ps does not implement -q so the fallback is always
used, but AFAIK it is not usable anyway and Docker expects a normal
ps to be on the system (say the list of fields produced by
"busybox ps -ef" differs from normal "ps -ef" etc.).

Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
Upstream-commit: a076badb8b33f1ecdc5d46f0a3701f10c0579f73
Component: engine
2018-05-24 18:24:27 -07:00
8c68c67c26 Merge pull request #37136 from muesli/sdnotify-api-const
Use go-systemd const instead of magic string in Linux version of dockerd
Upstream-commit: 80bfcc3a7a870c5b3683489ebc6fec9d67a3dfc4
Component: engine
2018-05-24 14:30:28 +02:00
d75e37db71 Merge pull request #37133 from cpuguy83/bump_continuity
Bump continuity
Upstream-commit: aa2d23a7357d4e827391705b8796a59df78c466d
Component: engine
2018-05-24 13:56:59 +02:00
db35657a47 Adjust API version to match correct release
This fix was not yet included in Docker 17.05, so
API version v1.37 was not the right selector (Docker
18.03, 18.04 and 18.05 all support API v1.37).

We should change these checks for engine versions,
or use a different method to skip tests when running
against older engines.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: a061b1e2d8f6117b0524e44de7b6bc391245864e
Component: engine
2018-05-24 02:39:56 +02:00
17b4dbf7d5 Bump API version to v1.38
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: df5175e1ee955a429ac5a4f8bdfacffd4d066c26
Component: engine
2018-05-24 02:39:28 +02:00
1a3da70ee0 Merge pull request #37108 from thaJeztah/remove_unneeded_aliases
Various code-cleanup
Upstream-commit: 8e2f9203065987116aec9e2d2a1d5c7039e1a5d4
Component: engine
2018-05-24 01:38:56 +02:00
75bf6c61a8 Adapt listeners to upstream API changes in go-systemd
Signed-off-by: Christian Muehlhaeuser <muesli@gmail.com>
Upstream-commit: 703c3c573599e20e1059d18f74cb4a05647587ae
Component: engine
2018-05-23 21:57:30 +02:00