Commit graph

37634 commits

Author SHA1 Message Date
Sebastiaan van Stijn
1fbadd76b7
Jenkinsfile: Windows: enabled debug-mode for daemon under test
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2019-09-03 18:48:30 +02:00
Sebastiaan van Stijn
6ee61f5493
Jenkinsfile: create bundles for Windows stages
CI already stores the logs of the test daemon, so we might as well
store them as artifacts

```
[2019-09-03T12:49:39.835Z] INFO: Tidying up at end of run
[2019-09-03T12:49:39.835Z] INFO: Saving daemon under test log (d:\CI-2\CI-3593e7622\dut.out) to C:\windows\TEMP\CIDUT.out
[2019-09-03T12:49:39.835Z] INFO: Saving daemon under test log (d:\CI-2\CI-3593e7622\dut.err) to C:\windows\TEMP\CIDUT.err
```

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2019-09-03 18:48:27 +02:00
Sebastiaan van Stijn
f505abb6a7
Merge pull request #39855 from thaJeztah/bump_libnetwork
bump libnetwork and dependencies to 92d1fbe1eb0883cf11d283cea8e658275146411d
2019-09-03 18:12:08 +02:00
Sebastiaan van Stijn
492945c2d5
bump hashicorp/go-sockaddr v1.0.2
full diff: 6d291a969b...v1.0.2

Relevant changes:
  - hashicorp/go-sockaddr#25 Add android os
  - hashicorp/go-sockaddr#28 Add go.mod

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2019-09-03 11:54:32 +02:00
Sebastiaan van Stijn
720b66ee1f
bump hashicorp/go-multierror v1.0.0, add errwrap v1.0.0
full diff: fcdddc395d...v1.0.0

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2019-09-03 11:52:45 +02:00
Sebastiaan van Stijn
bab58c1924
bump lib network to 92d1fbe1eb0883cf11d283cea8e658275146411d
full diff: 09cdcc8c0e...92d1fbe1eb

relevant changes included (omitting some changes that were added _and_ reverted in this bump):

- docker/libnetwork#2433 Fix parseIP error when parseIP before get AddressFamily
  - fixes docker/libnetwork#2431 parseIP Error ip=[172 17 0 2 0 0 0 0 0 0 0 0 0 0 0 0]
  - https://github.com/docker/libnetwork/issues/2289
  - this was a regression introduced in docker/libnetwork#2416 Fix hardcoded AF_INET for IPv6 address handling
- docker/libnetwork#2440 Bump hashicorp go-sockaddr v1.0.2, go-multierror v1.0.0

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2019-09-03 11:49:06 +02:00
Akihiro Suda
1d19062b64
Merge pull request #39798 from thaJeztah/bump_grpc
bump google.golang.org/grpc v1.23.0 (CVE-2019-9512, CVE-2019-9514, CVE-2019-9515)
2019-09-03 18:46:46 +09:00
Sebastiaan van Stijn
a114a2c019
Merge pull request #39250 from shuchow/706-cifs-lookup
Enable DNS Lookups for CIFS Volumes
2019-09-03 11:07:20 +02:00
Sebastiaan van Stijn
e128f17508
Rename variable for consistency
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2019-09-03 10:51:45 +02:00
Sebastiaan van Stijn
6e5a304675
container.ConfigFilePath: use same signature on Windows
This made my IDE unhappy; `ConfigFilePath` is an exported function, so
it makes sense to use the same signature for both Linux and Windows.

This patch also adds error handling (same as on Linux), even though the
current implementation will never return an error (it's good practice
to handle errors, so I assumed this would be the right approach)

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2019-09-03 10:51:43 +02:00
Kir Kolyshkin
2e0cafb01b
awslogs: refactor create()
Get rid of too many nested if statements. Remove the redundand check for
err != nil, fixing the following lint issue:

> daemon/logger/awslogs/cloudwatchlogs.go:452:10: nilness: tautological condition: non-nil != nil (govet)
> 		if err != nil {
> 		       ^

Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
2019-09-03 10:39:10 +02:00
Sebastiaan van Stijn
ef2872132d
awslogs: replace deprecated session.New() with session.NewSession()
```
16:04:35 daemon/logger/awslogs/cloudwatchlogs.go:312:25: SA1019: session.New is deprecated: Use NewSession functions to create sessions instead. NewSession has the same functionality as New except an error can be returned when the func is called instead of waiting to receive an error until a request is made.  (staticcheck)
16:04:35 	return ec2metadata.New(session.New())
```

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2019-09-03 10:39:08 +02:00
Sebastiaan van Stijn
54d021ef8f
awslogs: remove unused eventBuffer update
We return immediately after this, so no need to update eventBuffer:

```
16:04:35 daemon/logger/awslogs/cloudwatchlogs.go:554:5: SA4006: this value of `eventBuffer` is never used (staticcheck)
16:04:35 				eventBuffer = eventBuffer[:0]
```

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2019-09-03 10:39:06 +02:00
Sebastiaan van Stijn
02c9b0674f
integration-cli: getContainerCount() fix trimming prefix
caught by staticcheck:

```
integration-cli/docker_utils_test.go:66:29: SA1024: cutset contains duplicate characters (staticcheck)
```

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2019-09-03 10:37:23 +02:00
Jintao Zhang
e6fce00ec8 TestCase: use icmd.RunCmd instead icmd.StartCmd
Use `cli.Docker` instead `dockerCmdWithResult`.

Signed-off-by: Jintao Zhang <zhangjintao9020@gmail.com>
2019-09-03 07:12:58 +08:00
Kirill Kolyshkin
1a117b8b5c
Merge pull request #39804 from thaJeztah/defender_warning_only
integration: windows.ps1: turn defender error into a warning
2019-09-02 18:34:48 +03:00
Kirill Kolyshkin
6f9e294a40
Merge pull request #39842 from tklauser/rm-solaris-files
Remove *_solaris.go files
2019-09-02 18:25:56 +03:00
Kirill Kolyshkin
d99b0302d3
Merge pull request #39836 from thaJeztah/hack_linting_nits
hack/make/binary-daemon: fix some linting issues
2019-09-02 16:45:24 +03:00
Sebastiaan van Stijn
ce77a804b8
docker-py: skip flaky AttachContainerTest::test_attach_no_stream
Seen failing a couple of times:

```
[2019-09-02T08:40:15.796Z] =================================== FAILURES ===================================
[2019-09-02T08:40:15.796Z] __________________ AttachContainerTest.test_attach_no_stream ___________________
[2019-09-02T08:40:15.796Z] tests/integration/api_container_test.py:1250: in test_attach_no_stream
[2019-09-02T08:40:15.796Z]     assert output == 'hello\n'.encode(encoding='ascii')
[2019-09-02T08:40:15.796Z] E   AssertionError: assert b'' == b'hello\n'
[2019-09-02T08:40:15.796Z] E     Right contains more items, first extra item: 104
[2019-09-02T08:40:15.796Z] E     Use -v to get the full diff
```

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2019-09-02 15:36:32 +02:00
Sebastiaan van Stijn
c0ef45e90c
Merge pull request #39831 from StefanScherer/fix-dutimgVersion
Fix docker inspect for dutimgVersion
2019-09-02 10:41:03 +02:00
Tobias Klauser
6751718196 Remove *_solaris.go files
Support for GOOS=solaris was removed in PR #35373. Remove two leftover
*_solaris.go files missed in this PR.

Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
2019-09-02 10:15:15 +02:00
Akihiro Suda
e20b7323fb rootless: harden slirp4netns with mount namespace and seccomp
When slirp4netns v0.4.0+ is used, now slirp4netns is hardened using
mount namespace ("sandbox") and seccomp to mitigate potential
vulnerabilities.

bump up rootlesskit: 2fcff6ceae...791ac8cb20

Signed-off-by: Akihiro Suda <akihiro.suda.cz@hco.ntt.co.jp>
2019-09-02 14:58:58 +09:00
Sebastiaan van Stijn
70d3677825
hack/make/binary-daemon: fix some linting issues
- Add quotes to prevent word splitting in `cp` statement (SC2046)
- Replace legacy back tics with `$()`
- Replace `which` with `command -v` (SC2230)
- Fix incorrect (`==`) comparison

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2019-08-31 12:12:25 +02:00
Sebastiaan van Stijn
339dd0a2e5
Merge pull request #39801 from kolyshkin/loopback-idx
Use correct `LOOP_CTL_GET_FREE` API in `pkg/loopback`
2019-08-30 21:49:52 +02:00
Kirill Kolyshkin
b608ae379a
Merge pull request #39830 from thaJeztah/fix_rs1_NdisAdapters_leak
windows.ps1: fix leaked NdisAdapters not being cleaned up on RS1
2019-08-30 11:41:32 -07:00
Sebastiaan van Stijn
1cfc3060a8
Merge pull request #39825 from secrethub/fix/os-darwin
Fix getting the operating system on Darwin
2019-08-30 15:38:47 +02:00
Stefan Scherer
52a53e2587
Fix docker inspect for dutimgVersion
Signed-off-by: Stefan Scherer <stefan.scherer@docker.com>
2019-08-30 12:44:20 +02:00
Sebastiaan van Stijn
02b4533a78
Merge pull request #39588 from zappy-shu/DESKTOP-1286-win-admin-error-readability
Improve readability of Windows connect error
2019-08-30 11:33:55 +02:00
Sebastiaan van Stijn
d2ec6d0535
Merge pull request #39826 from secrethub/fix/get-os-version
Fix compiling pkg/parsers/operatingsystem on unix
2019-08-30 01:26:04 +02:00
Sebastiaan van Stijn
1655593dfc
Merge pull request #39828 from thaJeztah/fix_containerStart_unhandled_error
daemon:containerStart() fix unhandled error for saveApparmorConfig
2019-08-30 01:11:06 +02:00
Sebastiaan van Stijn
8877d8e1b9
Merge pull request #39824 from crosbymichael/sigprocmask
Add sigprocmask to default seccomp profile
2019-08-30 00:56:30 +02:00
Sebastiaan van Stijn
156ad54fb7
windows.ps1: fix leaked NdisAdapters not being cleaned up on RS1
Windows RS1 has problems with leaking NdisAdapters during the integration
tests; the windows.ps1 script has a cleanup stesp to remove those
leaked adapters.

For internal testing at Microsoft on internal builds, this cleanup step
was skipped, and only ran on the CI machines in our Jenkins.

Due to the move to our new Jenkins, the names of Windows machines changed,
and because of that, the cleanup step was never executed, resulting in the
leaked adapters not being cleaned up:

```
20:32:23  WARNING: There are 608 NdisAdapters leaked under Psched\Parameters
20:32:23  WARNING: Not cleaning as not a production RS1 server
20:32:24  WARNING: There are 608 NdisAdapters leaked under WFPLWFS\Parameters
20:32:24  WARNING: Not cleaning as not a production RS1 server
```

```
22:01:31  WARNING: There are 1209 NdisAdapters leaked under Psched\Parameters
22:01:31  WARNING: Not cleaning as not a production RS1 server
22:01:31  WARNING: There are 1209 NdisAdapters leaked under WFPLWFS\Parameters
22:01:31  WARNING: Not cleaning as not a production RS1 server
```

This patch removes the check for non-production builds, and unconditionally
cleans up leaked adapters if they are found.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2019-08-29 23:47:23 +02:00
Sebastiaan van Stijn
1250e42a43
daemon:containerStart() fix unhandled error for saveApparmorConfig
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2019-08-29 20:28:58 +02:00
Michael Crosby
e4605cc2a5 Add sigprocmask to default seccomp profile
Signed-off-by: Michael Crosby <crosbymichael@gmail.com>
2019-08-29 13:52:45 -04:00
Simon Barendse
fa29ff2212
Fix compiling pkg/parsers/operatingsystem on unix
fmt.Error does not exist. I've replaced it with errors.New.

Signed-off-by: Simon Barendse <simon.barendse@gmail.com>
2019-08-29 18:46:17 +02:00
Simon Barendse
ea65f0bca2
Fix getting the operating system on Darwin
This used to return "Darwin\n", but now returns "Darwin"

Signed-off-by: Simon Barendse <simon.barendse@gmail.com>
2019-08-29 18:39:04 +02:00
Sebastiaan van Stijn
8769255d1b
bump containerd/ttrpc 92c8520ef9f86600c650dd540266a007bf03670f
full diff: 699c4e40d1...92c8520ef9

changes:

- containerd/ttrpc#37 Handle EOF to prevent file descriptor leak
- containerd/ttrpc#38 Improve connection error handling
- containerd/ttrpc#40 Support headers
- containerd/ttrpc#41 Add client and server unary interceptors
- containerd/ttrpc#43 metadata as KeyValue type
- containerd/ttrpc#42 Refactor close handling for ttrpc clients
- containerd/ttrpc#44 Fix method full name generation
- containerd/ttrpc#46 Client.Call(): do not return error if no Status is set (gRPC v1.23 and up)
- containerd/ttrpc#49 Handle ok status

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2019-08-29 00:16:46 +02:00
Sebastiaan van Stijn
f1cd79976a
bump google.golang.org/grpc v1.23.0
full diff: https://github.com/grpc/grpc-go/compare/v1.20.1...v1.23.0

This update contains security fixes:

- transport: block reading frames when too many transport control frames are queued (grpc/grpc-go#2970)
  - Addresses CVE-2019-9512 (Ping Flood), CVE-2019-9514 (Reset Flood), and CVE-2019-9515 (Settings Flood).

Other changes can be found in the release notes:
https://github.com/grpc/grpc-go/releases/tag/v1.23.0

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2019-08-29 00:13:39 +02:00
Sebastiaan van Stijn
31885181fc
integration: windows.ps1: turn defender error into a warning
Some integration tests are known to fail if Windows Defender is
enabled. On the machines that run our CI, defender is disabled
for that reason.

Contributors likely will have defender enabled, and because of
that are currently not able to run the integration tests.

This patch changes the ERROR into a WARNING, so that contributors
can still run (a limited set of) the integration tests, but get
informed that some may fail.

We should make this requirement more specific, and only skip
tests that are known to require defender to be disabled, but
while that's not yet in place, let's print a warning instead.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2019-08-28 16:08:53 +02:00
Tibor Vass
7ce0e26c16
Merge pull request #39809 from thaJeztah/fix_da_build_build_build
fix build after merge of outdated PR
2019-08-27 18:57:37 -07:00
Tianon Gravi
f584fe1308
Merge pull request #39808 from thaJeztah/jenkinsfile_fix_bundle_script
Jenkinsfile: fix invalid expression in bundles script
2019-08-27 18:17:47 -07:00
Sebastiaan van Stijn
7e8f7efdd1
fix build after merge of outdated PR
this broke after e554ab5589,
was merged but the PR was outdated.

```
[2019-08-28T00:27:12.031Z] builder/dockerfile/copy.go:566:29: too many arguments in call to system.MkdirAll
[2019-08-28T00:27:12.031Z] 	have (string, number, string)
[2019-08-28T00:27:12.031Z] 	want (string, os.FileMode)
```

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2019-08-28 03:14:28 +02:00
Sebastiaan van Stijn
ca1e7a3b4a
Jenkinsfile: fix invalid expression in bundles script
This was introduced in a76ff632a4:

    + find bundles -path */root/*overlay2 -prune -o -type f ( -o -name *.log -o -name *.prof ) -print
    find: invalid expression; you have used a binary operator '-o' with nothing before it.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2019-08-28 02:16:40 +02:00
Tibor Vass
32688a47f3
Merge pull request #39699 from thaJeztah/mkdirall_dropin
Allow system.MkDirAll() to be used as drop-in for os.MkDirAll()
2019-08-27 16:27:53 -07:00
Tianon Gravi
7a8a9c186b
Merge pull request #39604 from seemethere/in_container_question_mark
hack: Remove inContainer check, it wasn't useful
2019-08-27 16:10:47 -07:00
Sebastiaan van Stijn
c33872e3f4
Merge pull request #39797 from thaJeztah/switch_libprotobuf
Replace libprotobuf-c0-dev with libprotobuf-c-dev
2019-08-27 15:49:02 +02:00
Sebastiaan van Stijn
001b78bffe
Merge pull request #39790 from thaJeztah/jenkinsfile_linting_and_skipping
integration: fix some linting issues, and don't fail build on artifact uploads
2019-08-27 15:34:04 +02:00
Daniel Sweet
db2bc43017 Use correct LOOP_CTL_GET_FREE API in pkg/loopback
The `ioctl` interface for the `LOOP_CTL_GET_FREE` request on
`/dev/loop-control` is a little different from what `unix.IoctlGetInt`
expects: the first index is the returned status in `r1`, not an `int`
pointer as the first parameter.

Unfortunately we have to go a little lower level to get the appropriate
loop device index out, using `unix.Syscall` directly to read from
`r1`. Internally, the index is returned as a signed integer to match the
internal `ioctl` expectations of interpreting a negative signed integer
as an error at the userspace ABI boundary, so the direct interface of
`ioctlLoopCtlGetFree` can remain as-is.

[@kolyshkin: it still worked before this fix because of
/dev scan fallback in ioctlLoopCtlGetFree()]

Signed-off-by: Daniel Sweet <danieljsweet@icloud.com>
Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
2019-08-27 06:22:10 -07:00
Sebastiaan van Stijn
556d26c07d
pkg/term: refactor TestEscapeProxyRead
- use subtests to make it clearer what the individual test-cases
  are, and to prevent tests from depending on values set by the
  previous test(s).
- remove redundant messages in assert (gotest.tools already prints
  a useful message if assertions fail).

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2019-08-27 15:07:02 +02:00
Kirill Kolyshkin
5c0d487416
Merge pull request #39795 from thaJeztah/remove_bundles_latest_symlink
hack/make.sh remove "latest" symlink
2019-08-26 23:14:20 -07:00