Uh oh!
There was an error while loading. Please reload this page.
Updating IPAM config with results from HNS create network call. - #2429
Conversation
This is a fix for moby/moby#38358. However, this is a fix for only the original issue. I.e. The default docker NAT network is missing. This root cause is that when the user does not specify a subnet, windows (HNS) will chose one for them. However, we do not show the subnet/gateway in the output of docker inspect. However, the subnet and gateway are present and will work. Unfortunately any scripts that parse the output of "docker inspect nat" will fail. Another simpler way to repro this issue is: The output of |
pradipd
commented
Aug 7, 2019
Regarding the solution, I investigated @arkodg's suggesting of using docker's ipam and getting rid of the window's ipam plugin (https://github.com/docker/libnetwork/blob/master/ipams/windowsipam/windowsipam.go). |
pradipd
commented
Aug 7, 2019
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
arkodg
commented
Aug 13, 2019
@pradipd, would it be possible to add an API to HNS to |
pradipd
commented
Aug 22, 2019
Sorry for the delayed response. I was OOF. |
pradipd
commented
Aug 22, 2019
@arkodg: Adding an API would require us to backport the change to 2016. I don't think this issue is important enough to backport to 2016. There are workarounds that can unblock users. |
pradipd
commented
Aug 22, 2019
Oops. Sorry. Did not mean to resolve conversation. Will try and reopen |
@pradipd is it possible to use this CMD or the underlying API - https://docs.microsoft.com/en-us/powershell/module/ipamserver/find-ipamfreeaddress?view=win10-ps |
pradipd
commented
Aug 22, 2019
No. That API is for a different windows server role/feature that is not involved with HNS. I.e. that API is for when you setup your Windows Server as a DHCP server. |
selansen
commented
Aug 23, 2019
Could you pls rebase and submit again? |
In windows HNS manages IPAM. If the user does not specify a subnet, HNS will choose one for them. However, in order for the IPAM to show up in the output of "docker inspect", we need to update the network IPAMv4Config field. Signed-off-by: Pradip Dhara <pradipd@microsoft.com>
daschott
commented
Sep 12, 2019
selansen
commented
Sep 12, 2019
@arkodg PTAL . |
| return nil | ||
| } | ||
| func (n *network) UpdateIpamConfig(ipV4Data []driverapi.IPAMData) { |
There was a problem hiding this comment.
Can we make this generic to ipv4 and ipv6
There was a problem hiding this comment.
I just undid that change based off feedback from @selansen . Windows wasn't using it, so, we decided we can add it later when we (or some other driver) needs it.
There was a problem hiding this comment.
I mean windows wasn't passing any IPv6 data in using UpdateIpamConfig()
There was a problem hiding this comment.
I still stick by my comment. if we are not using it, we dont need it. It will confuse everyone who is looking into the code after few months wondering why is this code exists if we are not using it.
selansen
commented
Sep 13, 2019
full diff: moby/libnetwork@92d1fbe...96bcc0d changes included: - moby/libnetwork#2429 Updating IPAM config with results from HNS create network call - addresses moby#38358 - moby/libnetwork#2450 Always configure iptables forward policy - related to moby#14041 and moby/libnetwork#1526 Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
full diff: moby/libnetwork@92d1fbe...96bcc0d changes included: - moby/libnetwork#2429 Updating IPAM config with results from HNS create network call - addresses moby/moby#38358 - moby/libnetwork#2450 Always configure iptables forward policy - related to moby/moby#14041 and moby/libnetwork#1526 Signed-off-by: Sebastiaan van Stijn <github@gone.nl> Upstream-commit: 75477f0b3c77f2108a6b5586dbc246c52b479941 Component: engine
full diff: moby/libnetwork@92d1fbe...96bcc0d changes included: - moby/libnetwork#2429 Updating IPAM config with results from HNS create network call - addresses moby#38358 - moby/libnetwork#2450 Always configure iptables forward policy - related to moby#14041 and moby/libnetwork#1526 Signed-off-by: Sebastiaan van Stijn <github@gone.nl> (cherry picked from commit 75477f0) Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
full diff: moby/libnetwork@92d1fbe...96bcc0d changes included: - moby/libnetwork#2429 Updating IPAM config with results from HNS create network call - addresses moby/moby#38358 - moby/libnetwork#2450 Always configure iptables forward policy - related to moby/moby#14041 and moby/libnetwork#1526 Signed-off-by: Sebastiaan van Stijn <github@gone.nl> (cherry picked from commit 75477f0b3c77f2108a6b5586dbc246c52b479941) Signed-off-by: Sebastiaan van Stijn <github@gone.nl> Upstream-commit: 559be42fc26048f4069de64f84202803a113413a Component: engine
full diff: moby/libnetwork@92d1fbe...96bcc0d changes included: - moby/libnetwork#2429 Updating IPAM config with results from HNS create network call - addresses moby#38358 - moby/libnetwork#2450 Always configure iptables forward policy - related to moby#14041 and moby/libnetwork#1526 Signed-off-by: Sebastiaan van Stijn <github@gone.nl> Signed-off-by: zach <Zachary.Joyner@linux.com>
subbunori
commented
Oct 31, 2019
Hi, How to know if this change is release in latest docker enterprise version? |
arkodg
commented
Oct 31, 2019
@subbunori can you please update to latest 19.03 version and this fix should be present |
In windows HNS manages IPAM. If the user does not specify a subnet, HNS will choose one
for them. However, in order for the IPAM to show up in the output of "docker inspect",
we need to update the network IPAMv4Config field.
Signed-off-by: Pradip Dhara pradipd@microsoft.com