Skip to content

Commit b422c0a

Browse files
Copilotbehzad-mir
andauthored
Return nil when HNS endpoint ID is empty during deletion (#4105)
* Initial plan * Fix: Return nil instead of error when HNS id is not found during endpoint deletion Co-authored-by: behzad-mir <13154712+behzad-mir@users.noreply.github.com> * Complete fix for HNS endpoint deletion issue Co-authored-by: behzad-mir <13154712+behzad-mir@users.noreply.github.com> * Fix: fix hns return in case of emty HNS ID --------- Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: behzad-mir <13154712+behzad-mir@users.noreply.github.com> Co-authored-by: Behzad Mirkhanzadeh <behzadm@microsoft.com>
1 parent 3f873f9 commit b422c0a

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

network/endpoint_windows.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -530,8 +530,8 @@ func (nw *network) deleteEndpointImpl(_ netlink.NetlinkInterface, _ platform.Exe
530530
}
531531

532532
if ep.HnsId == "" {
533-
logger.Error("No HNS id found. Skip endpoint deletion", zap.Any("nicType", ep.NICType), zap.String("containerId", ep.ContainerID))
534-
return fmt.Errorf("No HNS id found. Skip endpoint deletion for nicType %v, containerID %s", ep.NICType, ep.ContainerID) //nolint
533+
logger.Info("No HNS id found. Skip endpoint deletion", zap.Any("nicType", ep.NICType), zap.String("containerId", ep.ContainerID))
534+
return nil
535535
}
536536

537537
if useHnsV2, err := UseHnsV2(ep.NetNs); useHnsV2 {

0 commit comments

Comments
 (0)