-
Notifications
You must be signed in to change notification settings - Fork 18.6k
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
libnetwork: loosen container IPAM validation #47132
libnetwork: loosen container IPAM validation #47132
Conversation
Permit container network attachments to set any static IP address within the network's IPAM master pool, including when a subpool is configured. Users have come to depend on being able to statically assign container IP addresses which are guaranteed not to collide with automatically- assigned container addresses. Signed-off-by: Cory Snider <csnider@mirantis.com>
@@ -289,3 +289,40 @@ func TestMacAddressIsAppliedToMainNetworkWithShortID(t *testing.T) { | |||
c := container.Inspect(ctx, t, apiClient, cid) | |||
assert.Equal(t, c.NetworkSettings.Networks["testnet"].MacAddress, "02:42:08:26:a9:55") | |||
} | |||
|
|||
func TestStaticIPOutsideSubpool(t *testing.T) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Perhaps it's useful to add a description to the test (based on your PR description on GitHub); this seems like one of those cases where context may be useful to know "why" this test is.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM (left a suggestion for the test)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
- What I did
Permit container network attachments to set any static IP address within the network's IPAM master pool, including when a subpool is configured. Users have come to depend on being able to statically assign container IP addresses which are guaranteed not to collide with automatically- assigned container addresses.
- How I did it
By deleting a couple lines of code
- How to verify it
New regression test
- Description for the changelog
--ip-range
of a container network- A picture of a cute animal (not mandatory but encouraged)