Commit graph

47675 commits

Author SHA1 Message Date
Sebastiaan van Stijn
591c98cdbe
Merge pull request #46573 from cpuguy83/double_trace_logs
Remove duplicated trace logs
2023-10-01 06:50:29 +02:00
Brian Goff
5b16dd6469 Remove duplicated trace logs
This was mistakenly added to bklog.
Since this is getting attached to the standard logger, and bklog is
using the standard logger, we only need this added once.

Signed-off-by: Brian Goff <cpuguy83@gmail.com>
2023-09-30 22:59:47 +00:00
Djordje Lukic
7d30dafd69
Merge pull request #46543 from rumpl/c8d-fix-manifest-platform 2023-09-29 13:58:57 +02:00
Djordje Lukic
4a276afeb5
Merge pull request #46519 from rumpl/c8d-skip-config-image 2023-09-29 13:57:48 +02:00
Sebastiaan van Stijn
e2c23ed57d
Merge pull request #46069 from thaJeztah/update_to_go1.21
update to go1.21.1, default to GOTOOLCHAIN=local
2023-09-28 20:24:21 +02:00
Sebastiaan van Stijn
1239c96413
Merge pull request #46562 from neersighted/go_mod_bump
vendor.mod: bump go line to 1.20
2023-09-28 20:18:42 +02:00
Sebastiaan van Stijn
c4f55b53b0
Merge pull request #46561 from vvoland/c8d-integrationcli-skipsome
c8d: Adjust some integration-cli tests
2023-09-28 18:46:50 +02:00
Bjorn Neergaard
16063c7456
vendor.mod: bump go line to 1.20
Signed-off-by: Bjorn Neergaard <bjorn.neergaard@docker.com>
2023-09-28 10:01:25 -06:00
Paweł Gronowski
a4822abe37
c8d: Skip TestPullFailsWithAlteredManifest
Signed-off-by: Paweł Gronowski <pawel.gronowski@docker.com>
2023-09-28 17:13:38 +02:00
Paweł Gronowski
f9f439763a
c8d/TestPullFailsWithAlteredManifest: Adjust error message
Signed-off-by: Paweł Gronowski <pawel.gronowski@docker.com>
2023-09-28 17:13:36 +02:00
Paweł Gronowski
4001241ccf
c8d/TestPullByDigestNoFallback: Adjust error message
Signed-off-by: Paweł Gronowski <pawel.gronowski@docker.com>
2023-09-28 17:13:33 +02:00
Sebastiaan van Stijn
e465ebf2f3
update to go1.21.1, and fix download-URL
This required changes to the download-URL, as downloads are now provided
using the full version (including the `.0` patch version);

    curl -sI https://go.dev/dl/go1.21.windows-amd64.zip | grep 'location'
    location: https://dl.google.com/go/go1.21.windows-amd64.zip

    curl -sI https://dl.google.com/go/go1.21.windows-amd64.zip
    HTTP/2 404
    # ...

    curl -sI https://dl.google.com/go/go1.21.0.windows-amd64.zip
    HTTP/2 200
    # ...

Unfortunately this also means that the GO_VERSION can no longer be set to
versions lower than 1.21.0 (without additional changes), because older
versions do NOT provide the `.0` version, and Go 1.21.0 and up, no longer
provides URLs _without_ the `.0` version.

Co-authored-by: Bjorn Neergaard <bjorn.neergaard@docker.com>
Signed-off-by: Bjorn Neergaard <bjorn.neergaard@docker.com>
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2023-09-28 00:51:34 +02:00
Sebastiaan van Stijn
aa282973d4
Dockerfile: use GOTOOLCHAIN=local
Related discussion in https://github.com/docker-library/golang/issues/472

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2023-09-28 00:51:18 +02:00
Djordje Lukic
f66c000229 c8d: Fix getting the platform of a single-platform image
Signed-off-by: Djordje Lukic <djordje.lukic@docker.com>
2023-09-28 00:16:51 +02:00
Sebastiaan van Stijn
a1d966c492
Merge pull request #46555 from thaJeztah/distribution_test_fixes
fix faulty tests for distribution-client
2023-09-27 17:06:01 +02:00
Paweł Gronowski
7c0c525764
Merge pull request #46552 from vvoland/internal-compatcontext
internal: Add compatcontext.WithoutCancel
2023-09-27 16:50:18 +02:00
Sebastiaan van Stijn
2c0ad62b24
Merge pull request #46554 from thaJeztah/remove_intermediates
remove some intermediate vars, and small refactor for error-handling
2023-09-27 16:06:46 +02:00
Sebastiaan van Stijn
2c89640ab9
distribution: TestPullSchema2Config fix test response
The test was depending on the client constructing an error based on the
http-status code, and the client not reading the response body if the
response was not a JSON response.

This fix;

- adds the correct content-type headers in the response
- includes error-messages in the response
- adds additional tests to cover both the plain (non-JSON) and JSON
  error responses, as well as an empty response.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2023-09-27 14:03:59 +02:00
Sebastiaan van Stijn
a9fcb775e5
integration-cli: fix getTestTokenService not sending header
This utility was setting the content-type header after WriteHeader was
called, and the header was not sent because of that.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2023-09-27 13:57:48 +02:00
Sebastiaan van Stijn
3197160114
daemon: Daemon.SetNetworkBootstrapKeys: make error-handling idiomatic
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2023-09-27 12:08:28 +02:00
Sebastiaan van Stijn
f91c3cfda6
daemon: Daemon.initNetworkController: remove intermediate var
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2023-09-27 12:08:28 +02:00
Sebastiaan van Stijn
dcc75e1563
libnetwork: Controller: agentInit, agentDriverNotify rm intermediate vars
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2023-09-27 12:08:28 +02:00
Sebastiaan van Stijn
a384102fdf
libnetwork/datastore: Store.Map, Store.List: remove intermediate vars
Inline the closures, and rename a var to be more descriptive.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2023-09-27 12:07:31 +02:00
Paweł Gronowski
f6e44bc0e8
internal: Add compatcontext.WithoutCancel
Copy the implementation of `context.WithoutCancel` introduced in Go 1.21
to be able to use it when building with older versions.
This will use the stdlib directly when building with Go 1.21+.

Signed-off-by: Paweł Gronowski <pawel.gronowski@docker.com>
2023-09-27 11:46:30 +02:00
Sebastiaan van Stijn
605c8fb75d
Merge pull request #46546 from thaJeztah/libnetwork_return_errs
libnetwork: Controller.cleanupLocalEndpoints, sandboxCleanup: return errors
2023-09-27 10:31:56 +02:00
Sebastiaan van Stijn
324cb3d08f
Merge pull request #46545 from thaJeztah/libnetwork_NetworkByID_simplify
libnetwork: Controller.NetworkByID: remove redundant error-handling
2023-09-27 10:30:47 +02:00
Sebastiaan van Stijn
f3143745b2
Merge pull request #46547 from thaJeztah/libnetwork_store_nolock
libnetwork: Controller: remove mutex for "store"
2023-09-27 10:23:32 +02:00
Sebastiaan van Stijn
b1855bb4af
Merge pull request #46548 from thaJeztah/libnetwork_inline_populateSpecial
libnetwork: inline populateSpecial NetworkWalker
2023-09-27 10:13:15 +02:00
Sebastiaan van Stijn
479079c6b1
Merge pull request #46549 from thaJeztah/nwAgent_unexport_mutex
libnetwork: nwAgent: un-export mutex
2023-09-27 10:12:23 +02:00
Bjorn Neergaard
97e28de7e2
Merge pull request #46544 from akerouanton/api-otel-operation
api: Add method and path to trace operation string
2023-09-26 13:07:03 -06:00
Sebastiaan van Stijn
618d9b5d54
libnetwork: nwAgent: un-export mutex
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2023-09-26 19:46:27 +02:00
Sebastiaan van Stijn
7cda3fb7b5
libnetwork: inline populateSpecial NetworkWalker
It was only used in a single place, and it was defined far away from
where it was used.

Move the code inline, so that it's clear at a glance what it's doing.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2023-09-26 19:41:50 +02:00
Sebastiaan van Stijn
ca1307c56e
libnetwork: Controller: remove mutex for "store"
The store field is only mutated by Controller.initStores(), which is
only called inside the cosntructor (libnetwork.New), so there should be
no need to protect the field with a mutex in non-exported functions.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2023-09-26 19:34:12 +02:00
Sebastiaan van Stijn
a8ea752a93
libnetwork: Controller.cleanupLocalEndpoints: return errors
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2023-09-26 19:28:18 +02:00
Sebastiaan van Stijn
2e60051c92
libnetwork: Controller.sandboxCleanup: return errors
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2023-09-26 19:28:18 +02:00
Sebastiaan van Stijn
642cf261a8
libnetwork: Controller.NetworkByID: remove redundant error-handling
Controller.getNetworkFromStore() already returns a ErrNoSuchNetwork if
no network was found, so we don't need to convert the existing error.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2023-09-26 19:22:52 +02:00
Sebastiaan van Stijn
e3975fba84
Merge pull request #46530 from thaJeztah/libnetwork_walkless_step1
libnetwork: assorted cleanups in Sandbox
2023-09-26 19:19:31 +02:00
Sebastiaan van Stijn
7f9cce2b50
Merge pull request #46541 from akerouanton/delve-integration-tests
hack: Run integration tests through Delve
2023-09-26 19:05:48 +02:00
Albin Kerouanton
430a5f8581
api: Add method and path to trace operation string
Currently, all traces coming from the API have an empty operation
string, which make them indistinguishable from each other without looking
at the logs of the root span, and prevent proper filtering on Jaeger UI.

With this change, traces get the route pattern as the operation string.

Signed-off-by: Albin Kerouanton <albinker@gmail.com>
2023-09-26 18:56:25 +02:00
Albin Kerouanton
41c186c344
hack: Run integration tests through Delve
Signed-off-by: Albin Kerouanton <albinker@gmail.com>
2023-09-26 15:42:11 +02:00
Sebastiaan van Stijn
b94e88c1e2
Merge pull request #46386 from dperny/add-swarm-seccomp-apparmor
Add support for swarm seccomp and apparmor
2023-09-26 09:45:16 +02:00
Drew Erny
42a51cb285 Add support for swarm seccomp and apparmor
And also no-new-privileges

Signed-off-by: Drew Erny <derny@mirantis.com>
2023-09-25 12:38:26 -05:00
Sebastiaan van Stijn
bd7b27b5c8
Merge pull request #46535 from vvoland/integration-cli-saveload-dont-use-repositories
integration-cli/SaveLoad: Don't check `repositories` file
2023-09-25 17:22:28 +02:00
Paweł Gronowski
3d62ab9585
Merge pull request #46536 from vvoland/integration-cli-saveload-repoflags
integration-cli/TestSaveAndLoadRepoFlags: Ignore LastTagTime difference
2023-09-25 11:59:37 +02:00
Paweł Gronowski
7f6bd671fe
Merge pull request #46484 from vchiranjeeviak/vchiranjeeviak/container-list-code-refactor
daemon: containers list code refactor
2023-09-25 11:34:51 +02:00
Chiranjeevi Tirunagari
0c66111c40
daemon: containers list code refactor
Signed-off-by: Chiranjeevi Tirunagari <vchiranjeeviak.tirunagari@gmail.com>
2023-09-25 10:28:31 +05:30
Djordje Lukic
51f0e7b0e4
Merge pull request #46534 from vvoland/c8d-integration-cli-saveload-skip-parent 2023-09-22 16:49:23 +02:00
Paweł Gronowski
13b775a96e
integration-cli/TestSaveAndLoadRepoFlags: Ignore LastTagTime difference
The reason it doesn't change with the graphdrivers is caused by an
implementation detail and the fact that the image is loaded into the
same daemon it was saved from.

Signed-off-by: Paweł Gronowski <pawel.gronowski@docker.com>
2023-09-22 16:35:07 +02:00
Paweł Gronowski
7c202d2fa4
integration-cli/SaveLoad: Don't check repositories file
Rewrite TestSaveMultipleNames and TestSaveSingleTag  so that they don't
use legacy `repositories` file (which isn't present in the OCI
archives).
`docker save` output is now OCI compatible, so we don't need
to use the legacy file.

Signed-off-by: Paweł Gronowski <pawel.gronowski@docker.com>
2023-09-22 15:42:50 +02:00
Paweł Gronowski
724db8650c
integration-cli: Skip TestLoadZeroSizeLayer with c8d
The input archive is in the old Docker format that's not OCI compatible
and is not supported by the containerd archive import:
```
17d1436ef796af2fc2210cc37c4672e5aa1b62cb08ac4b95dd15372321105a66/
17d1436ef796af2fc2210cc37c4672e5aa1b62cb08ac4b95dd15372321105a66/VERSION
17d1436ef796af2fc2210cc37c4672e5aa1b62cb08ac4b95dd15372321105a66/json
17d1436ef796af2fc2210cc37c4672e5aa1b62cb08ac4b95dd15372321105a66/layer.tar
25445a0fc5025c3917a0cd6e307d92322540e0da691614312ddea22511b71513/
25445a0fc5025c3917a0cd6e307d92322540e0da691614312ddea22511b71513/VERSION
25445a0fc5025c3917a0cd6e307d92322540e0da691614312ddea22511b71513/json
25445a0fc5025c3917a0cd6e307d92322540e0da691614312ddea22511b71513/layer.tar
9c7cb910d84346a3fbf3cc2be046f44bf0af7f11eb8db2ef1f45e93c1202faac/
9c7cb910d84346a3fbf3cc2be046f44bf0af7f11eb8db2ef1f45e93c1202faac/VERSION
9c7cb910d84346a3fbf3cc2be046f44bf0af7f11eb8db2ef1f45e93c1202faac/json
9c7cb910d84346a3fbf3cc2be046f44bf0af7f11eb8db2ef1f45e93c1202faac/layer.tar
repositories
```

Signed-off-by: Paweł Gronowski <pawel.gronowski@docker.com>
2023-09-22 15:34:02 +02:00