Commit graph

5698 commits

Author SHA1 Message Date
Sebastiaan van Stijn
49cea49cfa
Merge pull request #45905 from akerouanton/endpoint-specific-mac-address
api: Add a field MacAddress to EndpointSettings
2023-11-07 16:37:27 +01:00
Sebastiaan van Stijn
050e6066af
Merge pull request #46517 from rumpl/c8d-windows-pull-linux
c8d: test a backend dependent error on pull
2023-11-03 09:28:16 +01:00
Sebastiaan van Stijn
8068038a60
Merge pull request #46758 from rumpl/c8d-image-list-digest
Skip the busybox digest check when containerd is enabled
2023-11-03 09:16:48 +01:00
Djordje Lukic
3c2b06099d
Skip TestPullManifestList when using containerd
This test is very weird, the Size in the manifests that it creates is
wrong, graph drivers only print a warning in that case but containerd
fails because it verifies more things. The media types are also wrong in
the containerd case, the manifest list forces the media type to be
"schema2.MediaTypeManifest" but in the containerd case the media type is
an OCI one.

Signed-off-by: Djordje Lukic <djordje.lukic@docker.com>
2023-11-02 16:09:35 +01:00
Djordje Lukic
6ca1b9e4ce
Skip the busybox digest check when containerd is enabled
We always have a digest with containerd.

Signed-off-by: Djordje Lukic <djordje.lukic@docker.com>
2023-11-02 14:07:49 +01:00
Frank Villaro-Dixon
123ade3763 builder/dockerfile: errmsg: quote build target
The build target is not quoted and it makes it difficult for some
persons to see what the problem is.

By quoting it we emphasize that the target name is variable.

Signed-off-by: Frank Villaro-Dixon <frank.villarodixon@merkle.com>
2023-11-02 09:38:14 +01:00
Albin Kerouanton
59c5f6e35b
integration-cli: mark dockerCmdWithFail as an helper function
Signed-off-by: Albin Kerouanton <albinker@gmail.com>
2023-10-25 22:55:59 +02:00
Albin Kerouanton
ee9f0ed895
api: Deprecate ContainerConfig.MacAddress
Having a sandbox/container-wide MacAddress field makes little sense
since a container can be connected to multiple networks at the same
time. This field is an artefact of old times where a container could be
connected to a single network only.

As we now have a way to specify per-endpoint mac address, this field is
now deprecated.

Signed-off-by: Albin Kerouanton <albinker@gmail.com>
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2023-10-25 22:55:59 +02:00
Albin Kerouanton
91eee33f62
api: ContainerCreate: return an error when config is nil
The same error is already returned by `(*Daemon).containerCreate()` but
since this function is also called by the cluster executor, the error
has to be duplicated.

Doing that allows to remove a nil check on container config in
`postContainersCreate`.

Signed-off-by: Albin Kerouanton <albinker@gmail.com>
2023-10-25 21:25:17 +02:00
Sebastiaan van Stijn
5a72ed3406
integration-cli: remove deprecated dockerCmd and waitRun utilities
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2023-10-19 18:02:30 +02:00
Sebastiaan van Stijn
06115bf82c
integration-cli: DockerCLIPruneSuite: replace dockerCmd
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2023-10-19 18:02:16 +02:00
Sebastiaan van Stijn
285ab8c861
integration-cli: DockerCLIPluginsSuite: replace dockerCmd
Also fixed some variables that shadowed package-level vars, and
used consts for fixed values.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2023-10-19 18:02:04 +02:00
Sebastiaan van Stijn
e28da7686e
integration-cli: DockerCLIPluginLogDriverSuite: replace dockerCmd
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2023-10-19 18:01:46 +02:00
Sebastiaan van Stijn
a837cb444c
integration-cli: DockerExternalVolumeSuite: replace dockerCmd
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2023-10-19 18:01:37 +02:00
Sebastiaan van Stijn
5f884478e5
integration-cli: DockerCLIImportSuite: replace dockerCmd
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2023-10-19 18:01:24 +02:00
Sebastiaan van Stijn
885eceba1d
integration-cli: DockerCLITopSuite: replace dockerCmd
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2023-10-19 18:01:09 +02:00
Sebastiaan van Stijn
6ce6b63482
integration-cli: DockerCLIHistorySuite: replace dockerCmd
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2023-10-19 18:00:56 +02:00
Sebastiaan van Stijn
268e72f10f
integration-cli: DockerCLIRestartSuite: replace dockerCmd and waitRun
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2023-10-19 18:00:39 +02:00
Sebastiaan van Stijn
c388416aac
integration-cli: DockerCLICreateSuite: replace dockerCmd and waitRun
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2023-10-19 18:00:27 +02:00
Sebastiaan van Stijn
5c297fcc09
integration-cli: DockerCLIStatsSuite: replace dockerCmd and waitRun
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2023-10-19 18:00:00 +02:00
Sebastiaan van Stijn
7d2a6f2030
integration-cli: DockerCLICommitSuite: replace dockerCmd
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2023-10-19 17:59:48 +02:00
Sebastiaan van Stijn
a4522b6a8f
integration-cli: DockerCLIStartSuite: replace dockerCmd
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2023-10-19 17:59:34 +02:00
Sebastiaan van Stijn
f7ddfdbae6
integration-cli: DockerCLIUpdateSuite: replace dockerCmd and waitRun
Also adding some consts for fixed values.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2023-10-19 17:59:24 +02:00
Sebastiaan van Stijn
d1108b8a06
integration-cli: DockerDaemonSuite: replace dockerCmd
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2023-10-19 17:59:10 +02:00
Sebastiaan van Stijn
9c161cc65a
integration-cli: DockerCLIVolumeSuite: replace dockerCmd
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2023-10-19 17:58:57 +02:00
Sebastiaan van Stijn
f482857959
integration-cli: DockerCLIImagesSuite: replace dockerCmd
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2023-10-19 17:58:12 +02:00
Sebastiaan van Stijn
f1102e98bb
integration-cli: DockerCLIPortSuite: replace dockerCmd and waitRun
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2023-10-19 17:57:41 +02:00
Sebastiaan van Stijn
ba4d491562
integration-cli: DockerCLIRmiSuite: replace dockerCmd
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2023-10-19 17:57:31 +02:00
Sebastiaan van Stijn
16e4bc9827
integration-cli: DockerCLISearchSuite: replace dockerCmd
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2023-10-19 17:54:11 +02:00
Sebastiaan van Stijn
89d7b77022
integration-cli: DockerRegistrySuite: replace dockerCmd
Also renaming vars that collided with package-level vars
and using consts for fixed values.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2023-10-19 17:53:43 +02:00
Sebastiaan van Stijn
c867ac4527
integration-cli: DockerCLICpSuite: replace dockerCmd
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2023-10-19 17:52:44 +02:00
Sebastiaan van Stijn
980a5bc72a
integration-cli: DockerCLIBuildSuite: replace dockerCmd
Also adding some consts for fixed values.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2023-10-19 17:52:39 +02:00
Sebastiaan van Stijn
4292f42308
integration-cli: DockerCLISaveLoadSuite: replace dockerCmd
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2023-10-19 17:42:48 +02:00
Sebastiaan van Stijn
50062b413c
integration-cli: DockerCLIRunSuite: replace dockerCmd and waitRun
Also adding some consts for fixed values

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2023-10-19 17:40:35 +02:00
Sebastiaan van Stijn
d63cab5193
integration-cli: DockerCLILogsSuite: replace dockerCmd and waitRun
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2023-10-19 17:40:15 +02:00
Sebastiaan van Stijn
8e2e1f3d28
integration-cli: DockerRegistryAuthHtpasswdSuite: replace dockerCmd
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2023-10-19 17:39:53 +02:00
Sebastiaan van Stijn
d3f4580519
integration-cli: DockerCLILinksSuite: replace dockerCmd and waitRun
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2023-10-19 17:39:17 +02:00
Sebastiaan van Stijn
58c5986f8b
integration-cli: DockerCLIHealthSuite: replace dockerCmd and waitRun
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2023-10-19 17:39:00 +02:00
Sebastiaan van Stijn
707bb9b9ed
integration-cli: DockerBenchmarkSuite: replace dockerCmd and waitRun
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2023-10-19 17:38:54 +02:00
Sebastiaan van Stijn
eafb618594
integration-cli: findContainerIP: replace dockerCmd
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2023-10-19 17:38:45 +02:00
Sebastiaan van Stijn
ba32bebd05
integration-cli: DockerCLIInfoSuite: replace dockerCmd and waitRun
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2023-10-19 17:38:33 +02:00
Sebastiaan van Stijn
4562f07887
integration-cli: DockerCLIExecSuite: replace dockerCmd and waitRun
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2023-10-19 17:36:46 +02:00
Sebastiaan van Stijn
8c661b5e9a
integration-cli: DockerCLIEventSuite: replace dockerCmd and waitRun
Also removing some waitRun call, as they were not actually checked for
results, and the tests depended on that behavior (to get events about
the container starting etc).

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2023-10-19 17:36:41 +02:00
Sebastiaan van Stijn
cf95278122
integration-cli: DockerCLIAttachSuite: replace dockerCmd and waitRun
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2023-10-19 17:35:46 +02:00
Sebastiaan van Stijn
1baec48367
integration-cli: DockerAPISuite: replace dockerCmd and waitRun
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2023-10-19 17:34:55 +02:00
Sebastiaan van Stijn
908821d48a
integration-cli: dockerCmdWithFail: remove unused return
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2023-10-19 17:20:56 +02:00
Sebastiaan van Stijn
02fd8485fa
integration-cli: DockerCLINetmodeSuite: replace dockerCmd and waitRun
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2023-10-19 17:20:56 +02:00
Sebastiaan van Stijn
dbb2bd727d
integration-cli: DockerNetworkSuite: replace dockerCmd and waitRun
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2023-10-19 17:20:56 +02:00
Sebastiaan van Stijn
5cc978c6a0
integration-cli: DockerCLIInspectSuite: replace dockerCmd and waitRun
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2023-10-19 17:20:56 +02:00
Sebastiaan van Stijn
86fb048e59
integration-cli: DockerCLIPsSuite: replace dockerCmd and waitRun
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2023-10-19 17:20:56 +02:00
Sebastiaan van Stijn
b4ff5234bd
integration-cli: remove transformCmd utility
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2023-10-19 17:20:53 +02:00
Paweł Gronowski
e3d8e979de
integration-cli/TestSaveAndLoadWithProgressBar: Skip with c8d
Not implemented yet, but we have an open ticket.

Signed-off-by: Paweł Gronowski <pawel.gronowski@docker.com>
2023-10-13 11:52:13 +02:00
Bjorn Neergaard
8047b69ba3
Merge pull request #46591 from vvoland/c8d-adjust-TestPsListContainersSize
integration-cli: Make TestPsListContainersSize work with c8d
2023-10-13 00:00:54 -07:00
Djordje Lukic
c279c48a0e
Skip TestPullAllTagsFromCentralRegistry
The image that this test pulls contains an error in the linux/amd64
manifest description, the reported size is 424 but the actual size is
524, making this test fail with containerd.

Signed-off-by: Djordje Lukic <djordje.lukic@docker.com>
2023-10-12 15:47:48 +02:00
Sebastiaan van Stijn
ebef4efb88
api/types: move ContainerLogsOptions to api/types/container
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2023-10-12 11:30:12 +02:00
Sebastiaan van Stijn
9670d9364d
api/types: move ContainerListOptions to api/types/container
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2023-10-12 11:29:24 +02:00
Sebastiaan van Stijn
7bce33eb0f
api/types: move ContainerStartOptions to api/types/container
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2023-10-12 11:29:24 +02:00
Sebastiaan van Stijn
0f77875220
api/types: move ContainerRemoveOptions to api/types/container
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2023-10-12 11:29:23 +02:00
Sebastiaan van Stijn
9498d897ab
api/types: move ContainerCommitOptions to api/types/container
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2023-10-12 11:29:23 +02:00
Sebastiaan van Stijn
30f09b4a1a
api/types: move ContainerAttachOptions to api/types/container
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2023-10-12 11:29:23 +02:00
Sebastiaan van Stijn
95b92b1f97
api/types: move ResizeOptions to api/types/container
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2023-10-12 11:29:23 +02:00
Sebastiaan van Stijn
056be8b7b0
Merge pull request #46473 from thaJeztah/c8d_logs
migrate to github.com/containerd/log v0.1.0
2023-10-12 10:35:02 +02:00
Sebastiaan van Stijn
6f6ef7906a
Merge pull request #46578 from rumpl/skip-max-concurrency-tests
c8d: Skip tests that check max concurrency
2023-10-11 22:41:41 +02:00
Sebastiaan van Stijn
949f8c9f2a
Merge pull request #46602 from vvoland/integration-TestPullNonExistingImage
TestPullNonExistingImage: Simplify and move to integration
2023-10-11 19:18:16 +02:00
Sebastiaan van Stijn
cff4f20c44
migrate to github.com/containerd/log v0.1.0
The github.com/containerd/containerd/log package was moved to a separate
module, which will also be used by upcoming (patch) releases of containerd.

This patch moves our own uses of the package to use the new module.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2023-10-11 17:52:23 +02:00
Paweł Gronowski
5f062032f7
TestPullNonExistingImage: Move to integration
Signed-off-by: Paweł Gronowski <pawel.gronowski@docker.com>
2023-10-10 13:36:29 +02:00
Paweł Gronowski
53345fe357
TestPullNonExistingImage: Use subtests
Rewrite the test to replace manual goroutines handling with paralell
subtests.

Signed-off-by: Paweł Gronowski <pawel.gronowski@docker.com>
2023-10-10 13:35:35 +02:00
Djordje Lukic
23f2e0fea7
Skip tests that check max concurrency
These are not yet implemented with containerd snapshotters. We skip them
now because implementing this is not trivial with containerd.

Signed-off-by: Djordje Lukic <djordje.lukic@docker.com>
2023-10-10 11:36:36 +02:00
Albin Kerouanton
cbc2a71c27
libnet/d/bridge: Don't set container's gateway when network is internal
So far, internal networks were only isolated from the host by iptables
DROP rules. As a consequence, outbound connections from containers would
timeout instead of being "rejected" through an immediate ICMP dest/port
unreachable, a TCP RST or a failing `connect` syscall.

This was visible when internal containers were trying to resolve a
domain that don't match any container on the same network (be it a truly
"external" domain, or a container that don't exist/is dead). In that
case, the embedded resolver would try to forward DNS queries for the
different values of resolv.conf `search` option, making DNS resolution
slow to return an error, and the slowness being exacerbated by some libc
implementations.

This change makes `connect` syscall to return ENETUNREACH, and thus
solves the broader issue of failing fast when external connections are
attempted.

Signed-off-by: Albin Kerouanton <albinker@gmail.com>
2023-10-09 13:57:54 +02:00
Paweł Gronowski
1f6bacc486
TestDaemonNoSpaceLeftOnDeviceError: Adjust to snapshotters
- Pass empty containerd socket which forces the daemon to create a new
  supervised containerd. Otherwise a global containerd daemon will be
  used and the pulled image data will be stored in its data directory,
  instead of the the newly specified `data-root` that has a limited
  storage capacity.

- Don't try to use `vfs` snapshotter, instead use `native` which is
  containerd's equivalent for `vfs`.

Signed-off-by: Paweł Gronowski <pawel.gronowski@docker.com>
2023-10-04 15:59:30 +02:00
Paweł Gronowski
28d057cb0e
c8d/TestPsListContainersSize: Only check if size increased
Signed-off-by: Paweł Gronowski <pawel.gronowski@docker.com>
2023-10-04 14:29:51 +02:00
Paweł Gronowski
34400dd4a2
TestPsListContainersSize: Fix size parsing/formatting
Use go-units to parse/format.

Signed-off-by: Paweł Gronowski <pawel.gronowski@docker.com>
2023-10-04 14:29:47 +02:00
Djordje Lukic
4a276afeb5
Merge pull request #46519 from rumpl/c8d-skip-config-image 2023-09-29 13:57:48 +02: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
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
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
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
Paweł Gronowski
1337a66130
integration-cli: Skip Parent tests with c8d
Parent property is not available in the OCI config.

Signed-off-by: Paweł Gronowski <pawel.gronowski@docker.com>
2023-09-22 15:33:47 +02:00
Djordje Lukic
093481618d
c8d: Skip the test that checks Config.Image
It's not set when containerd is used as an image store and buildkit
never sets it either, so let's skip this test if snapshotters are used

Signed-off-by: Djordje Lukic <djordje.lukic@docker.com>
2023-09-20 17:01:42 +02:00
Djordje Lukic
3936c57294
c8d: test a backend dependent error on pull
moby and containerd have slightly different error messages when someone
tries to pull an image that doesn't contain the current platform,
instead of looking inside the error returned by containerd we match the
errors in the test related to what image backend we are using

Signed-off-by: Djordje Lukic <djordje.lukic@docker.com>
2023-09-20 14:47:51 +02:00
Sebastiaan van Stijn
5d87dc98ea
Merge pull request #46507 from rumpl/c8d-fix-tests
c8d: Skip TestRemoveImageGarbageCollector
2023-09-18 23:06:00 +02:00
Albin Kerouanton
19c07198b6
daemon: Check if endpoint address is in allowed range
This issue wasn't caught on ContainerCreate or NetworkConnect (when
container wasn't started yet).

Signed-off-by: Albin Kerouanton <albinker@gmail.com>
2023-09-18 17:28:07 +02:00
Djordje Lukic
6c563cda82
c8d: fix TestRemoveContainerAfterLiveRestore
There is no need to pass the storage driver to the daemon the test
starts

Signed-off-by: Djordje Lukic <djordje.lukic@docker.com>
2023-09-18 15:34:20 +02:00
Albin Kerouanton
bbcd662532
api: Allow ContainerCreate to take several EndpointsConfig for >= 1.44
The API endpoint `/containers/create` accepts several EndpointsConfig
since v1.22 but the daemon would error out in such case. This check is
moved from the daemon to the api and is now applied only for API < 1.44,
effectively allowing the daemon to create containers connected to
several networks.

Signed-off-by: Albin Kerouanton <albinker@gmail.com>
2023-09-15 10:07:29 +02:00
Albin Kerouanton
78479b1915
libnet: Make sure network names are unique
Fixes #18864, #20648, #33561, #40901.

[This GH comment][1] makes clear network name uniqueness has never been
enforced due to the eventually consistent nature of Classic Swarm
datastores:

> there is no guaranteed way to check for duplicates across a cluster of
> docker hosts.

And this is further confirmed by other comments made by @mrjana in that
same issue, eg. [this one][2]:

> we want to adopt a schema which can pave the way in the future for a
> completely decentralized cluster of docker hosts (if scalability is
> needed).

This decentralized model is what Classic Swarm was trying to be. It's
been superseded since then by Docker Swarm, which has a centralized
control plane.

To circumvent this drawback, the `NetworkCreate` endpoint accepts a
`CheckDuplicate` flag. However it's not perfectly reliable as it won't
catch concurrent requests.

Due to this design decision, API clients like Compose have to implement
workarounds to make sure names are really unique (eg.
docker/compose#9585). And the daemon itself has seen a string of issues
due to that decision, including some that aren't fixed to this day (for
instance moby/moby#40901):

> The problem is, that if you specify a network for a container using
> the ID, it will add that network to the container but it will then
> change it to reference the network by using the name.

To summarize, this "feature" is broken, has no practical use and is a
source of pain for Docker users and API consumers. So let's just remove
it for _all_ API versions.

[1]: https://github.com/moby/moby/issues/18864#issuecomment-167201414
[2]: https://github.com/moby/moby/issues/18864#issuecomment-167202589

Signed-off-by: Albin Kerouanton <albinker@gmail.com>
2023-09-12 10:40:13 +02:00
Djordje Lukic
29dcf646a3
Merge pull request #46454 from rumpl/c8d-disable-schema1 2023-09-11 19:55:43 +02:00
Djordje Lukic
d0d3ddd045
Merge pull request #46375 from rumpl/c8d-userns-remap
c8d: Handle userns properly
2023-09-11 19:04:35 +02:00
Djordje Lukic
0313544f4a
c8d: Handle userns properly
If the daemon is run with --userns-remap we need to chown the prepared
snapshot

Signed-off-by: Djordje Lukic <djordje.lukic@docker.com>
2023-09-11 16:39:29 +02:00
Djordje Lukic
4acbf7d8c3
c8d: disable schema1 registry integration tests
schema1 was deprecated a while ago, containerd fails to push to a
schema1 registry, let's just skip these tests for the containerd
integration

Signed-off-by: Djordje Lukic <djordje.lukic@docker.com>
2023-09-11 15:30:44 +02:00
Sebastiaan van Stijn
ccae064209
Merge pull request #46423 from vvoland/c8d-images-all
c8d/builder: Store parent in c8d image label
2023-09-11 14:51:20 +02:00
Paweł Gronowski
4982c70db4
integration-cli: Skip TestRmiParentImageFail when using c8d snapshotters
With containerd image store the images don't depend on each other even
if they share the same content and it's totally fine to delete the
"parent" image.

The skip is necessary because deleting the "parent" image does not
produce an error with the c8d image store and deleting the `busybox`
image breaks other tests.

Signed-off-by: Paweł Gronowski <pawel.gronowski@docker.com>
2023-09-08 12:08:35 +02:00
Paweł Gronowski
c0ece8d4f3
integration-cli: Use different label in TestBuildMultiStageGlobalArg
To avoid collision with TestBuildMultiStageArg.

Signed-off-by: Paweł Gronowski <pawel.gronowski@docker.com>
2023-09-08 09:47:56 +02:00
Brian Goff
e8dc902781 Wire up tests to support otel tracing
Integration tests will now configure clients to propagate traces as well
as create spans for all tests.

Some extra changes were needed (or desired for trace propagation) in the
test helpers to pass through tracing spans via context.

Signed-off-by: Brian Goff <cpuguy83@gmail.com>
2023-09-07 18:38:22 +00:00
Sebastiaan van Stijn
791549508a
Merge pull request #46084 from rumpl/fix-test-arch
test: Remove DOCKER_ENGINE_GOARCH from the tests
2023-09-05 18:08:57 +02:00
Sebastiaan van Stijn
032797ea4b
Merge pull request #46376 from thaJeztah/migrate_distribution_reference
migrate to new github.com/distribution/reference module
2023-09-05 15:04:51 +02:00