Commit graph

48015 commits

Author SHA1 Message Date
Sebastiaan van Stijn
15bcc707e6
update runc binary to v1.1.10
- full diff: https://github.com/opencontainers/runc/compare/v1.1.9...v1.1.10
- release notes: https://github.com/opencontainers/runc/releases/tag/v1.1.10

This is the tenth (and most likely final) patch release in the 1.1.z
release branch of runc. It mainly fixes a few issues in cgroups, and a
umask-related issue in tmpcopyup.

- Add support for `hugetlb.<pagesize>.rsvd` limiting and accounting.
  Fixes the issue of postgres failing when hugepage limits are set.
- Fixed permissions of a newly created directories to not depend on the value
  of umask in tmpcopyup feature implementation.
- libcontainer: cgroup v1 GetStats now ignores missing `kmem.limit_in_bytes`
  (fixes the compatibility with Linux kernel 6.1+).
- Fix a semi-arbitrary cgroup write bug when given a malicious hugetlb
  configuration. This issue is not a security issue because it requires a
  malicious config.json, which is outside of our threat model.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2023-11-13 16:01:02 +01:00
Sebastiaan van Stijn
34e923e3e3
Merge pull request #46801 from thaJeztah/improve_ValidateIPAddress
opts: ValidateIPAddress: improve error, godoc, and tests
2023-11-13 12:22:38 +01:00
Sebastiaan van Stijn
1eadfb0e28
opts: ValidateIPAddress: improve error, godoc, and tests
- document accepted values
- add test-coverage for the function's behavior (including whitespace handling),
  and use sub-tests.
- improve error-message to use uppercase for "IP", and to use a common prefix.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2023-11-11 15:31:19 +01:00
Sebastiaan van Stijn
3b423ea778
Merge pull request #46799 from thaJeztah/bump_go_connections
vendor: github.com/docker/go-connections fa09c952e3ea (v0.5.0-dev)
2023-11-11 00:49:56 +01:00
Sebastiaan van Stijn
981a878cf5
vendor: github.com/docker/go-connections fa09c952e3ea (v0.5.0-dev)
0b8c1f4e07...fa09c952e3

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2023-11-10 23:23:37 +01:00
Tianon Gravi
7c8d02d1bc
Merge pull request #46797 from cpuguy83/fix_missing_scope
Fix missing import for "scope" package
2023-11-09 16:15:16 -08:00
Brian Goff
f0b89e63b9 Fix missing import for "scope" package
I believe this happened due to conflicting PR's that got merged without
CI re-running between them.

Signed-off-by: Brian Goff <cpuguy83@gmail.com>
2023-11-09 22:48:01 +00:00
Brian Goff
63b2a2138d
Merge pull request #41084 from thaJeztah/40495_update_goconnections_negotiate
Bump go-connections for TLS 1.3 support
2023-11-09 14:33:18 -08:00
Brian Goff
99638f5f76
Merge pull request #46713 from p-fruck/docs/api-network-connect-403 2023-11-09 12:48:59 -08:00
Sebastiaan van Stijn
774e677cc8
Merge pull request #46781 from kb2ma/doc-swagger-port
Update API README to include port in URL for locally built Swagger docs
2023-11-09 20:34:22 +01:00
Brian Goff
524eef5d75
Merge pull request #46681 from corhere/libn/datastore-misc-cleanups 2023-11-09 11:31:30 -08:00
Sebastiaan van Stijn
5bff90cea2
Merge pull request #46789 from akerouanton/updateSvcRecord-early-return
libnet: early-return from updateSvcRecord if no addr available
2023-11-09 14:14:55 +01:00
Albin Kerouanton
d47b3ef4c9
libnet: early return from updateSvcRecord if no addr available
Early return if the iface or its address is nil to make the whole
function slightly easier to read.

Signed-off-by: Albin Kerouanton <albinker@gmail.com>
2023-11-08 20:45:15 +01:00
Albin Kerouanton
7e66d9900c
Merge pull request #46788 from akerouanton/container-rename-refactor
daemon: ContainerRename: use named error-return
2023-11-08 20:37:22 +01:00
Albin Kerouanton
f5a611a74c
daemon: ContainerRename: use named error-return
It's used in various defers, but was using `err` as name, which can be
confusing, and increases the risk of accidentally shadowing the error.

Signed-off-by: Albin Kerouanton <albinker@gmail.com>
2023-11-08 18:53:13 +01:00
Sam Whited
8074e7a437
Bump go-connections for TLS 1.3 support
Fixes 40495

Signed-off-by: Sam Whited <sam@samwhited.com>
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2023-11-08 17:58:50 +01:00
Sebastiaan van Stijn
5504ef7a84
Merge pull request #46784 from rumpl/image-builder-cleanup
c8d: cleanup imports in the image builder file
2023-11-08 17:27:52 +01:00
Sebastiaan van Stijn
ea729aea4a
Merge pull request #46577 from RachitSharma2001/46576-dockerimagelsuntil
Add until filter to docker image ls
2023-11-08 16:58:08 +01:00
Sebastiaan van Stijn
587d509ddd
Merge pull request #46777 from thaJeztah/fix_redirects
docs/api: update redirect metadata for hugo
2023-11-08 14:19:59 +01:00
Djordje Lukic
876d4e5484
c8d: cleanup imports in the image builder file
Signed-off-by: Djordje Lukic <djordje.lukic@docker.com>
2023-11-08 12:31:03 +01:00
Rachit Sharma
7995e3288f
Add until filter to docker image ls
Signed-off-by: Rachit Sharma <rachitsharma613@gmail.com>

add handling for multiple filters

Signed-off-by: Rachit Sharma <rachitsharma613@gmail.com>

Update integration/image/list_test.go

Co-authored-by: Cory Snider <corhere@gmail.com>
Signed-off-by: Rachit Sharma <rachitsharma613@gmail.com>

Add documentation of filter

Signed-off-by: Rachit Sharma <rachitsharma613@gmail.com>

Update integration/image/list_test.go

Co-authored-by: Cory Snider <corhere@gmail.com>
Signed-off-by: Rachit Sharma <rachitsharma613@gmail.com>

Fix bug with CommitOptions

Signed-off-by: Rachit Sharma <rachitsharma613@gmail.com>

add wrapping of text to 80 chars

Signed-off-by: Rachit Sharma <rachitsharma613@gmail.com>
2023-11-08 12:12:23 +01:00
Sebastiaan van Stijn
0c0943bcdf
Merge pull request #46783 from thaJeztah/fix_test
integration/networking: fix TestBridgeICC
2023-11-08 12:11:40 +01:00
Sebastiaan van Stijn
58785c2932
integration/networking: fix TestBridgeICC
This test broke in 98323ac114.

This commit renamed WithMacAddress into WithContainerWideMacAddress.
This helper sets the MacAddress field in container.Config. However, API
v1.44 now ignores this field if the NetworkMode has no matching entry in
EndpointsConfig.

This fix uses the helper WithMacAddress and specify for which
EndpointConfig the MacAddress is specified.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Signed-off-by: Albin Kerouanton <albinker@gmail.com>
2023-11-08 10:23:24 +01:00
Sebastiaan van Stijn
c14694a424
Merge pull request #46779 from dmcgowan/c8d-default-auth-domain
Default the auth config domain to the target image domain
2023-11-07 16:44:31 +01:00
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
Ken Bannister
6979503a85 Include port in URL for locally built Swagger docs
Signed-off-by: Ken Bannister <kb2ma@runbox.com>
2023-11-07 08:07:32 -05:00
Derek McGowan
755f008c1e
Default the auth config domain to the target image domain
When server address is not provided with the auth configuration,
use the domain from the image provided with the auth.

Signed-off-by: Derek McGowan <derek@mcg.dev>
2023-11-06 17:02:18 -08:00
Sebastiaan van Stijn
796da163f9
Merge pull request #46778 from corhere/libc8d/revert-serialize-exec-starts-workaround
Revert "libcontainerd: work around exec start bug in c8d"
2023-11-06 21:12:39 +01:00
Cory Snider
7d9d601e6d project: document supported containerd versions
We only support containerd versions which have fixes for
https://github.com/containerd/containerd/issues/8557.

Signed-off-by: Cory Snider <csnider@mirantis.com>
2023-11-06 13:43:18 -05:00
Cory Snider
29ac09ee9d Revert "libcontainerd: work around exec start bug in c8d"
The workaround is no longer required. The bug has been fixed in stable
versions of all supported containerd branches.

This reverts commit fb7ec1555c.

Signed-off-by: Cory Snider <csnider@mirantis.com>
2023-11-06 13:26:44 -05:00
Sebastiaan van Stijn
c1a289e05a
docs/api: update redirect metadata for hugo
docs.docker.com switched from Jekyll to Hugo, which uses "aliases"
instead of "redirect_from".

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2023-11-06 18:16:47 +01:00
Sebastiaan van Stijn
02011af7b0
Merge pull request #46774 from elezar/bump-cdi-dependency
Update container-device-interface to v0.6.2
2023-11-04 13:27:17 +01:00
Evan Lezar
49e04102c1 Update container-device-interface to v0.6.2
This includes migrating from the github.com/container-orchestrated-devices
repo to tags.cncf.io.

Signed-off-by: Evan Lezar <elezar@nvidia.com>
2023-11-04 01:00:19 +01:00
Paweł Gronowski
3cb8e9526e
Merge pull request #46769 from vvoland/c8d-shared-mounter-impl
daemon/snapshotter: Align mounter implementations
2023-11-03 18:45:36 +01:00
Paweł Gronowski
26f63600c1
daemon/snapshotter: Align mounter implementations
Change the non-refcounted implementation to perform the mount using the
same identity and access right. They should be the same regardless if
we're refcounting or not.

This also allows to refactor refCountMounter into a mounter decorator.

Signed-off-by: Paweł Gronowski <pawel.gronowski@docker.com>
2023-11-03 18:13:14 +01:00
Albin Kerouanton
6fd893bd3a
Merge pull request #46768 from akerouanton/dedicated-default-nw-config-struct
daemon/config: Put params for the default network into a dedicated struct
2023-11-03 17:03:05 +01:00
Albin Kerouanton
d5d41c2849
daemon/config: Put params for the default network into a dedicated struct
Signed-off-by: Albin Kerouanton <albinker@gmail.com>
2023-11-03 14:10:41 +01:00
Sebastiaan van Stijn
ed1a61dcb7
Merge pull request #46663 from akerouanton/ci-otel-windows
ci: Setup otel tracing for windows integration tests
2023-11-03 13:51:39 +01:00
Sebastiaan van Stijn
5b19725de2
Merge pull request #46668 from corhere/libn/svc-record-update-without-store
libnetwork: svc record update without store
2023-11-03 13:47:12 +01:00
Sebastiaan van Stijn
0ac748a340
Merge pull request #46628 from sgehrig/46621-container_wait
#46621 ensure that errors reading the response body are returned to the caller
2023-11-03 13:20:59 +01:00
Sebastiaan van Stijn
26c054edbf
Merge pull request #46531 from akerouanton/networking-suite-bridge-tests
integration: Add a new networking integration test suite
2023-11-03 12:33:44 +01:00
Sebastiaan van Stijn
39393f651e
Merge pull request #46766 from thaJeztah/fix_TestInfoAPI
integration/system: update TestInfoAPI to not use string-matching
2023-11-03 11:43:28 +01:00
Sebastiaan van Stijn
587ad8845a
integration/system: update TestInfoAPI to not use string-matching
This test was rewritten from an integration-cli test in commit
68d9beedbe, and originally implemented in
f4942ed864, which rewrote it from a unit-
test to an integration test.

Originally, it would check for the raw JSON response from the daemon, and
check for individual fields to be present in the output, but after commit
0fd5a65428, `client.Info()` was used, and
now the response is unmarshalled into a `system.Info`.

The remainder of the test remained the same in that rewrite, and as a
result were were now effectively testing if a `system.Info` struct,
when marshalled as JSON would show all the fields (surprise: it does).

TL;DR; the test would even pass with an empty `system.Info{}` struct,
which didn't provide much coverage, as it passed without a daemon:

    func TestInfoAPI(t *testing.T) {
        // always shown fields
        stringsToCheck := []string{
            "ID",
            "Containers",
            "ContainersRunning",
            "ContainersPaused",
            "ContainersStopped",
            "Images",
            "LoggingDriver",
            "OperatingSystem",
            "NCPU",
            "OSType",
            "Architecture",
            "MemTotal",
            "KernelVersion",
            "Driver",
            "ServerVersion",
            "SecurityOptions",
        }

        out := fmt.Sprintf("%+v", system.Info{})
        for _, linePrefix := range stringsToCheck {
            assert.Check(t, is.Contains(out, linePrefix))
        }
    }

This patch makes the test _slightly_ better by checking if the fields
are non-empty. More work is needed on this test though; currently it
uses the (already running) daemon, so it's hard to check for specific
fields to be correct (withouth knowing state of the daemon), but it's
not unlikely that other tests (partially) cover some of that. A TODO
comment was added to look into that (we should probably combine some
tests to prevent overlap, and make it easier to spot "gaps" as well).

While working on this, also moving the `SystemTime` into this test,
because that field is (no longer) dependent on "debug" state

(It is was actually this change that led me down this rabbit-hole)

                         ()_()
                         (-.-)
                        '(")(")'

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2023-11-03 10:17:15 +01:00
Albin Kerouanton
c1ab6eda4b
integration/networking: Test bridge ICC and INC
Following tests are implemented in this specific commit:

- Inter-container communications for internal and non-internal
  bridge networks, over IPv4 and IPv6.
- Inter-container communications using IPv6 link-local addresses for
  internal and non-internal bridge networks.
- Inter-network communications for internal and non-internal bridge
  networks, over IPv4 and IPv6, are disallowed.

Signed-off-by: Albin Kerouanton <albinker@gmail.com>
2023-11-03 09:58:50 +01:00
Albin Kerouanton
409ea700c7
integration: Add a new networking integration test suite
This commit introduces a new integration test suite aimed at testing
networking features like inter-container communication, network
isolation, port mapping, etc... and how they interact with daemon-level
and network-level parameters.

So far, there's pretty much no tests making sure our networks are well
configured: 1. there're a few tests for port mapping, but they don't
cover all use cases ; 2. there're a few tests that check if a specific
iptables rule exist, but that doesn't prevent that specific iptables
rule to be wrong in the first place.

As we're planning to refactor how iptables rules are written, and change
some of them to fix known security issues, we need a way to test all
combinations of parameters. So far, this was done by hand, which is
particularly painful and time consuming. As such, this new test suite is
foundational to upcoming work.

Signed-off-by: Albin Kerouanton <albinker@gmail.com>
2023-11-03 09:58:50 +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
Sebastiaan van Stijn
90cc178baa
Merge pull request #46759 from rumpl/c8d-index-pull-test
Skip TestPullManifestList when using containerd
2023-11-03 09:14:42 +01:00
Sebastiaan van Stijn
5baf486545
Merge pull request #46764 from cpuguy83/fix_probe_interval
Fix case where health start interval is 0 uses default
2023-11-03 08:32:55 +01:00
Sebastiaan van Stijn
ec32f0db82
Merge pull request #46762 from akerouanton/seccomp-io_uring
seccomp: block io_uring_* syscalls in default profile
2023-11-02 21:10:29 +01:00