Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Per endpoint driver opts #11815

Merged
merged 3 commits into from
May 22, 2024
Merged

Per endpoint driver opts #11815

merged 3 commits into from
May 22, 2024

Conversation

robmry
Copy link
Contributor

@robmry robmry commented May 14, 2024

What I did

It's possible to set driver options when creating a network using compose ... compose spec / engine API.

But not when connecting an endpoint to a network ... compose spec / engine API.

The API field isn't new, but upcoming change moby/moby#47686 means it'll be useful for setting per-interface sysctls.

compose-spec/compose-go#627 adds the types.
compose-spec/compose-spec#498 updates the spec to match.
This PR pulls in the go-compose changes, and copies the driver options to EndpointSettings for the API.

I noticed a couple of fields in EndpointSettings that perhaps shouldn't be set ... the struct is an unfortunate mix of config and operational-data (used to report running state). Those fields will be cleared by the daemon, so the only potential problem is a bit of confusion - in particular, the container's IPv6 address is provided in the IPv6 gateway. But, probably best to deal with that separately, so I just left a FIXME comment in the new test.

Related issue

(not mandatory) A picture of a cute animal, if possible in relation to what you did

@robmry
Copy link
Contributor Author

robmry commented May 14, 2024

I don't think the failing test looks related, is it just something that happens? ...

FAIL pkg/e2e.TestCascadeFail (2.19s)
      cascade_test.go:44: WARNING: docker-buildx cli-plugin not found, using default buildx installation.
      cascade_test.go:44: Running command: docker compose version
  Docker Compose version 0eef47d
      cascade_test.go:50: Running command: docker compose -f ./fixtures/cascade/compose.yaml --project-name compose-e2e-cascade-fail up --abort-on-container-failure
  Attaching to exit-1, fail-1, running-1
  
  exit-1 exited with code 0
  
  fail-1 exited with code 111
      cascade_test.go:55: assertion failed: 143 (res.ExitCode int) != 111 (int)
      cascade_test.go:47: Running command: docker compose --project-name compose-e2e-cascade-fail down
      framework.go:130: Contents of config dir:
      framework.go:132:   - /tmp/TestCascadeFail1299123561/001
      framework.go:132:   - /tmp/TestCascadeFail1299123561/001/cli-plugins
      framework.go:132:   - /tmp/TestCascadeFail1299123561/001/cli-plugins/docker-compose
      framework.go:132:   - /tmp/TestCascadeFail1299123561/001/cli-plugins/docker-scan

robmry and others added 3 commits May 22, 2024 12:15
Signed-off-by: Rob Murray <rob.murray@docker.com>
Signed-off-by: Rob Murray <rob.murray@docker.com>
Signed-off-by: Guillaume Lours <705411+glours@users.noreply.github.com>
@glours glours enabled auto-merge (rebase) May 22, 2024 10:19
@glours glours merged commit 2593256 into docker:main May 22, 2024
28 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants