8000 Document CLI support for per interface sysctls by robmry · Pull Request #4994 · docker/cli · GitHub
[go: up one dir, main page]

Skip to content

Conversation

robmry
Copy link
Contributor
@robmry robmry commented Apr 8, 2024

- What I did

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.33%. Comparing base (6c70360) to head (d5d94e4).
Report is 35 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #4994      +/-   ##
==========================================
+ Coverage   61.09%   61.33%   +0.24%     
==========================================
  Files         298      295       -3     
  Lines       20675    20701      +26     
==========================================
+ Hits        12631    12697      +66     
+ Misses       7147     7101      -46     
- Partials      897      903       +6     

@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
@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 2 times, most recently 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

Copy link
Collaborator
@laurazard laurazard left a comment

Choose a reason for hiding this comment

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

LGTM

@laurazard
Copy link
Collaborator

@thaJeztah does this LGTY?

robmry added 4 commits May 26, 2024 13:14
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 9f7d811 to d5d94e4 Compare May 26, 2024 12:20
@robmry
Copy link
Contributor Author
robmry commented May 26, 2024

Updated to reflect a last-minute change of heart on the sysctl naming (net.ipv6.conf.eth0.disable_ipv6 was shortened to ipv6.conf.disable_ipv6, now it's net.ipv6.conf.IFNAME.disable_ipv6).

@akerouanton akerouanton enabled auto-merge May 29, 2024 08:57
Copy link
Member
@thaJeztah thaJeztah left a comment

Choose a reason for hiding this comment

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

LGTM

@akerouanton akerouanton merged commit 8ed44f9 into docker:master May 29, 2024
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.

7 participants
0