-
Notifications
You must be signed in to change notification settings - Fork 2.5k
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
Allow --ip and --mac to be set when joining a CNI net #4542
Allow --ip and --mac to be set when joining a CNI net #4542
Conversation
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: mheon The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
I'll add a test after lunch |
LGTM |
LGTM |
@mheon Reminder on Tests. |
1a75aa0
to
dc4deb3
Compare
Added a test |
Some test failures are (wierd) flakes, but it seems like |
This does not work, network.RuntimeConfig = map[string]ocicni.RuntimeConfig{ is always set to the "podman" netconf, so the static allocations do not get applied. The problem is that defaultNetwork = r.netPlugin.GetDefaultNetworkName() returns "podman" instead of the user provided value. Ugly hack I'm using to set defaultNetwork: if len(networks) == 0 { |
These only conflict when joining more than one network. We can still set a single CNI network and set a static IP and/or static MAC. Fixes containers#4500 Signed-off-by: Matthew Heon <[email protected]>
dc4deb3
to
01ae532
Compare
Good catch - pushed an updated version that should set that properly |
It's green. |
LGTM |
/lgtm |
These only conflict when joining more than one network. We can still set a single CNI network and set a static IP and/or static MAC.
Fixes #4500