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

Document CLI support for per interface sysctls #4994

Open
wants to merge 6 commits into
base: master
Choose a base branch
from

Conversation

robmry
Copy link
Contributor

@robmry robmry commented Apr 8, 2024

- What I did

moby/moby#47686 adds driver-opt label com.docker.network.endpoint.sysctls, to support per-interface sysctls.

The extended --network syntax is needed, but wasn't documented.

The quoting needed to set more than one sysctl using docker [create|run] --network driver-opt or docker network connect --driver-opt isn't obvious - so, added tests and examples to the docs.

- How I did it

  • Fix TestNetworkConnectWithFlags - because it didn't do anything, and is needed to test the new option.
  • Document the v25.0 changes to allow more than one network connection in create/run, with the extended --network syntax.
  • Added tests and examples to docs for per-interface sysctl setting.

- How to verify it

New tests added.

- Description for the changelog

Document the use of `driver-opt` in the CLI for setting per-interface sysctls.

@codecov-commenter
Copy link

codecov-commenter commented Apr 8, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 61.10%. Comparing base (6c70360) to head (f4cef3e).

❗ Current head f4cef3e differs from pull request most recent head 9f7d811. Consider uploading reports for the commit 9f7d811 to get more accurate results

Additional details and impacted files
@@           Coverage Diff           @@
##           master    #4994   +/-   ##
=======================================
  Coverage   61.09%   61.10%           
=======================================
  Files         298      295    -3     
  Lines       20675    20675           
=======================================
+ Hits        12631    12633    +2     
+ Misses       7147     7143    -4     
- Partials      897      899    +2     

@robmry robmry requested a review from dvdksn April 8, 2024 09:57
@robmry robmry force-pushed the 47639_per-interface-sysctls branch from e91f6e2 to 5474acf Compare April 8, 2024 09:59
@robmry robmry marked this pull request as ready for review April 8, 2024 10:12
@robmry robmry requested a review from thaJeztah as a code owner April 8, 2024 10:12
docs/reference/commandline/container_run.md Outdated Show resolved Hide resolved
docs/reference/commandline/container_run.md Outdated Show resolved Hide resolved
docs/reference/commandline/container_run.md Outdated Show resolved Hide resolved
docs/reference/commandline/container_run.md Show resolved Hide resolved
@robmry robmry force-pushed the 47639_per-interface-sysctls branch from 5474acf to 774ed6a Compare April 8, 2024 15:04
@robmry robmry requested a review from akerouanton April 8, 2024 16:03
@robmry robmry added this to the 27.0.0 milestone May 2, 2024
robmry added 2 commits May 8, 2024 14:13
The test didn't do anything useful...
- Despite its name it used newCreateCommand() instead of
  newConnectCommand() with create flags/options instead of connect.
- There was no fake networkCreateFunc(), so the result of the 'connect'
  wasn't checked.
- The fake networkConnectFunc() was never called, so didn't spot the
  problem.

Signed-off-by: Rob Murray <rob.murray@docker.com>
Support for connecting more than one network using the container run
command was added in v25.0 for API > 1.44 - describe that in the docs.

Signed-off-by: Rob Murray <rob.murray@docker.com>
@robmry robmry force-pushed the 47639_per-interface-sysctls branch from 774ed6a to f4cef3e Compare May 8, 2024 15:09
robmry added 4 commits May 9, 2024 09:31
Signed-off-by: Rob Murray <rob.murray@docker.com>
Signed-off-by: Rob Murray <rob.murray@docker.com>
Signed-off-by: Rob Murray <rob.murray@docker.com>
Signed-off-by: Rob Murray <rob.murray@docker.com>
@robmry robmry force-pushed the 47639_per-interface-sysctls branch from f4cef3e to 9f7d811 Compare May 9, 2024 08:43
@robmry robmry changed the title CLI support for per interface sysctls Document CLI support for per interface sysctls May 9, 2024
Copy link
Contributor

@dvdksn dvdksn left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants