Commit graph

38113 commits

Author SHA1 Message Date
Sebastiaan van Stijn
4840fd8953
pkg/mount: SA4011: ineffective break statement (staticcheck)
```
pkg/mount/mountinfo_linux.go:93:5: SA4011: ineffective break statement. Did you mean to break out of the outer loop? (staticcheck)
				break
				^
```

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2019-10-18 00:46:02 +02:00
Sebastiaan van Stijn
af3bbcc00c
aufs: SA4011: did you mean to break out of the outer loop? (staticcheck)
As caught by staticcheck (after disabling the default exclusion rules);

Based on the comment, this break was indeed meant to break the
loop and return the error.

```
daemon/graphdriver/aufs/mount.go:54:4: SA4011: ineffective break statement. Did you mean to break out of the outer loop? (staticcheck)
			break
			^
```

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2019-10-18 00:46:00 +02:00
Sebastiaan van Stijn
6d9c219c54
daemon: S1033: unnecessary guard around call to delete (gosimple)
```
daemon/container_operations.go:787:2: S1033: unnecessary guard around call to delete (gosimple)
	if _, ok := container.NetworkSettings.Networks[n.ID()]; ok {
	^
```

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2019-10-18 00:45:46 +02:00
Sebastiaan van Stijn
cba180cac9
graphdriver/btrfs: SA4003: no value of type uint64 is less than 0 (staticcheck)
```
daemon/graphdriver/btrfs/btrfs.go:609:5: SA4003: no value of type uint64 is less than 0 (staticcheck)
	if driver.options.size <= 0 {
	   ^
```

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2019-10-18 00:45:39 +02:00
Sebastiaan van Stijn
04fcb6cfbf
pkg/jsonmessage: fix SA1006: printf-style function with no arguments
Also fixed some incorrectly formatted comments

```
pkg/jsonmessage/jsonmessage.go:180:20: SA1006: printf-style function with dynamic format string and no further arguments should use print-style function instead (staticcheck)
		fmt.Fprintf(out, endl)
		                 ^
```

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2019-10-18 00:45:37 +02:00
Sebastiaan van Stijn
1f7beb8594
daemon/events/testutils: remove redundant variable
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2019-10-18 00:45:35 +02:00
Sebastiaan van Stijn
5f47cef514
fix nolint comments for SA1019: filters.ToParamWithVersion is deprecated
The old nolint comment didn't seem to work anymore;

```
client/container_list.go:39:22: SA1019: filters.ToParamWithVersion is deprecated: do not use in any new code; use ToJSON instead  (staticcheck)
client/events.go:94:22:         SA1019: filters.ToParamWithVersion is deprecated: do not use in any new code; use ToJSON instead  (staticcheck)
client/image_list.go:28:22:     SA1019: filters.ToParamWithVersion is deprecated: do not use in any new code; use ToJSON instead  (staticcheck)
```

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2019-10-18 00:45:33 +02:00
Sebastiaan van Stijn
ec1fd4b1b0
distribution: SA4021: x = append(y) is equivalent to x = y (staticcheck)
```
distribution/push_v2_test.go:552:29: SA4021: x = append(y) is equivalent to x = y (staticcheck)
	return nil, errcode.Errors(append([]error{errcode.ErrorCodeUnauthorized.WithMessage("unauthorized")}))
	                           ^
```

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2019-10-18 00:45:31 +02:00
Sebastiaan van Stijn
94647b5d86
graphdriver/aufs: SA4021: x = append(y) is equivalent to x = y (staticcheck)
```
daemon/graphdriver/aufs/aufs_test.go:746:8: SA4021: x = append(y) is equivalent to x = y (staticcheck)
	ids = append(ids[2:])
	      ^
```

Also pre-allocating the ids slice while we're at it.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2019-10-18 00:45:29 +02:00
Sebastiaan van Stijn
301a2fbeca
builder/dockerfile/mockbackend_test.go: suppress SA9005 (staticcheck)
```
builder/dockerfile/mockbackend_test.go:107:21: SA9005: struct doesn't have any exported fields, nor custom marshaling (staticcheck)
	return json.Marshal(rawImage(*i))
	                   ^
```

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2019-10-18 00:45:27 +02:00
Sebastiaan van Stijn
05469b5fa2
daemon: add "isWindows" const
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2019-10-17 23:49:43 +02:00
Brian Goff
1e000435e6
Merge pull request #40096 from cpuguy83/c8d_no_healthcheck_loop
Wait for c8d process exit instead of polling API
2019-10-17 14:24:28 -07:00
Justin Cormack
19a4fa7bf1
Merge pull request #40076 from AkihiroSuda/update-rootless-docs
docs/rootless.md: update
2019-10-17 11:39:33 -07:00
Kirill Kolyshkin
0a96ee7ff8
Merge pull request #40080 from thaJeztah/client_string_matching
client: reduce string-matching in tests
2019-10-17 11:38:00 -07:00
Justin Cormack
f681590a25
Merge pull request #40081 from thaJeztah/http_constants
Use http constants for HTTP methods and status codes
2019-10-17 11:30:26 -07:00
Justin Cormack
dde030a6b1
Merge pull request #40083 from thaJeztah/daemon_consts
daemon: use constants for AppArmor and Seccomp
2019-10-17 11:12:37 -07:00
Kirill Kolyshkin
098144291d
Merge pull request #40098 from thaJeztah/bump_gelf
bump Graylog2/go-gelf to 1550ee647df0510058c9d67a45c56f18911d80b8
2019-10-17 11:09:17 -07:00
Justin Cormack
4dfa060acd
Merge pull request #40097 from SamWhited/export_logt
Export the LogT type and use it in the options
2019-10-17 11:07:42 -07:00
Sebastiaan van Stijn
1fab7c6457
bump Graylog2/go-gelf to 1550ee647df0510058c9d67a45c56f18911d80b8
4143646226...1550ee647d

includes

- Graylog2/go-gelf#20 Prevent panic when unmarshalling JSON
- Graylog2/go-gelf#23 Feat: Use more precise time stamps
- Graylog2/go-gelf#31 bugfix. Not goroutine safe for TCP writer

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2019-10-17 18:41:03 +02:00
Sam Whited
95ea6e7069 Export the LogT type and use it in the options
Signed-off-by: Sam Whited <sam@samwhited.com>
2019-10-16 16:27:37 -04:00
Brian Goff
bef73d8b07 Wait for c8d process exit instead of polling API
In the containerd supervisor, instead of polling the healthcheck API
every 500 milliseconds we can just wait for the process to exit.

Signed-off-by: Brian Goff <cpuguy83@gmail.com>
2019-10-16 12:23:10 -07:00
Sebastiaan van Stijn
58a6faab4c
daemon/top_unix_test: cleanup test cases and use subtests
The t.Log() caused some unneeded noise; changing these
tests to us subtests instead, so that we can track them
more easily.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2019-10-16 03:55:54 +02:00
Sebastiaan van Stijn
2030daf2ee
TestParseInitVersion: add some additional tests
Also slightly harden parseInitVersion

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2019-10-16 03:54:14 +02:00
Brian Goff
f5bb374a0c
Merge pull request #39822 from Rid/39608-short-libnetwork-id
daemon: Use short libnetwork ID in exec-root
2019-10-15 09:54:31 -07:00
Grant Millar
df7b8f458a daemon: Use short libnetwork ID in exec-root & update libnetwork
Signed-off-by: Grant Millar <rid@cylo.io>
2019-10-15 11:40:24 +01:00
Sebastiaan van Stijn
7521bd1bc9
Merge pull request #39231 from dperny/add-service-status
Add support for sending down service Running and Desired task counts
2019-10-15 10:55:04 +02:00
Kirill Kolyshkin
11f36877df
Merge pull request #40044 from thaJeztah/buildkit_dockerfile_formatting
Dockerfile formatting changes and optimisations
2019-10-14 16:04:28 -07:00
Drew Erny
f36042d259 Add support for sending down service Running and Desired task counts
Adds a new ServiceStatus field to the Service object, which includes the
running and desired task counts. This new field is gated behind a
"status" query parameter.

Signed-off-by: Drew Erny <drew.erny@docker.com>
2019-10-14 10:43:00 -05:00
Akihiro Suda
e582a10b59
Merge pull request #40070 from cpuguy83/oci_regression
Use ocischema package instead of custom handler
2019-10-14 13:07:07 +09:00
Sebastiaan van Stijn
133eddaee8
Merge pull request #39987 from devonestes/fix-splunk-ack
Add ability to handle index acknowledgment with splunk log driver
2019-10-14 03:02:35 +02:00
Sebastiaan van Stijn
717575b585
daemon: make supportsSeccomp a const
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2019-10-13 19:16:31 +02:00
Sebastiaan van Stijn
a33cf495f2
daemon: use constants for AppArmor profiles
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2019-10-13 19:16:12 +02:00
Sebastiaan van Stijn
aa655a4d73
pkg/plugins: use constants for http methods
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2019-10-13 19:11:30 +02:00
Sebastiaan van Stijn
5ba167ce8a
pkg/authorization: use constants for http methods
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2019-10-13 19:11:28 +02:00
Sebastiaan van Stijn
9c590ed5c5
daemon/logger/splunk: use constants for http methods
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2019-10-13 19:11:26 +02:00
Sebastiaan van Stijn
984d5bc30c
builder-next: use constants for http status codes
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2019-10-13 19:11:24 +02:00
Sebastiaan van Stijn
3b84875216
builder-next: use constants for http methods
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2019-10-13 19:11:22 +02:00
Sebastiaan van Stijn
63e62d13a0
registry: use constants for http status codes
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2019-10-13 19:11:18 +02:00
Sebastiaan van Stijn
441b031bda
registry: use constants for http methods
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2019-10-13 17:30:25 +02:00
Sebastiaan van Stijn
d1817b6135
client: use constants for http status codes
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2019-10-13 17:30:23 +02:00
Sebastiaan van Stijn
dabc7cdb56
client: use constants for http methods
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2019-10-13 17:30:21 +02:00
Sebastiaan van Stijn
93100adb69
api/server: use constants for http methods
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2019-10-13 17:30:19 +02:00
Sebastiaan van Stijn
a617809fe7
testutil: use constants for http methods
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2019-10-13 17:30:17 +02:00
Sebastiaan van Stijn
23b6b5a9ae
integration-cli: use constants for http methods
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2019-10-13 17:30:15 +02:00
Sebastiaan van Stijn
9ed58987ce
integration: use constants for http methods
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2019-10-13 17:30:13 +02:00
Sebastiaan van Stijn
de10c7d013
client: reduce string-matching in tests
These checks were redundant, as we were not expecting
a specific string, just that a server-error or authentication
error was returned.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2019-10-13 17:00:40 +02:00
Akihiro Suda
e76dea157e docs/rootless.md: update
Signed-off-by: Akihiro Suda <akihiro.suda.cz@hco.ntt.co.jp>
2019-10-13 20:19:00 +09:00
Akihiro Suda
d1e837d2a8
Merge pull request #39992 from thaJeztah/apparmor_fix_network_paths
AppArmor: add missing rules for running in userns
2019-10-13 03:14:45 +09:00
Brian Goff
28b645755a
Merge pull request #40062 from thaJeztah/testutil_improvements
Various testutil improvements
2019-10-11 15:37:48 -07:00
Brian Goff
e443512ce4 Use ocischema package instead of custom handler
Previously we were re-using schema2.DeserializedManifest to handle oci
manifests. The issue lies in the fact that distribution started
validating the media type string during json deserialization. This
change broke our usage of that type.

Instead distribution now provides direct support for oci schemas, so use
that instead of our custom handlers.

Signed-off-by: Brian Goff <cpuguy83@gmail.com>
2019-10-11 10:19:29 -07:00