Fix HNS policylist error "network not found" during network removal #2620
Fix HNS policylist error "network not found" during network removal #2620thaJeztah merged 3 commits intomoby:masterfrom
Conversation
Signed-off-by: Trapier Marshall <tmarshall@mirantis.com>
Removal of PolicyLists from Windows VFP must be performed prior to removing the HNS network. Otherwise PolicyList removal fails with HNS error "network not found". Signed-off-by: Trapier Marshall <tmarshall@mirantis.com>
Make the call to cleanupServiceBindings during network deletion conditional on Windows (where it is required), thereby providing a performance improvement to network cleanup on Linux. Signed-off-by: Trapier Marshall <tmarshall@mirantis.com>
|
Looking forward to this fix. Good work! |
|
Fixes moby/moby#41354
I think that it was KB4551853 + fixes done to that one which also caused moby/moby#40998
FYI. I also opened question to microsoft/hcsshim#988 about how HNS changes are tested as part of Windows build process. Would be nice to get some responses to that one too from your Microsoft contacts. |
| if runtime.GOOS == "windows" { | ||
| c.cleanupServiceBindings(n.ID()) | ||
| } |
There was a problem hiding this comment.
This is not needed on Linux? Is it needed in other situations? e.g., I see it's called in clusterAgentInit(); that's still needed for Linux? (Was thinking if we'd need different implementations for Linux and Windows)
Lines 349 to 358 in b350742
|
Note we have migrated this codebase over to github.com/moby/moby/libnetwork. |
FYI for everyone who is waiting for this fix. It looks that Mirantis did backport this on using their own copy of this repo with Mirantis/libnetwork#3 and Mirantis/libnetwork#4 and if I understand correctly it is already included Docker EE versions 19.03.16 and 20.10.5 |
|
@thaJeztah this one was included to moby by my PR moby/moby#43502 before 22.06 split so perhaps this original can be them merged as "backport to 20.10" to here? |
|
This LGTM to me and should likely be merged as we accepted it on the 20.10 branch. This would additionally let Mirantis stop maintaining a fork of libnetwork and better align what we are doing with upstream. |
thaJeztah
left a comment
There was a problem hiding this comment.
ah, right let's get this one in for 20.10
LGTM
Removal of PolicyLists from Windows VFP must be performed prior to removing the corresponding HNS network. Otherwise PolicyList removal fails with HNS error
"The network was not found."This ordering requirement was introduced to Windows Server 2019 in an update some time in 2020. Have reached out to Microsoft to request additional context with respect to what OS version(s) in the change was shipped with and the rationale for the change.
Accommodate the OS sequencing requirement by delaying network deletion until after cleaning up service bindings.
This PR also:
Opening as draft to take a look at the following kv error I'm seeing during deletion on Windows. Am also seeing this on 55e924b from bump_19.03, so it's likely not related to this PR.
Mirantis Ref: FIELD-3310