Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions network/network_windows.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ package network
import (
"encoding/json"
"strings"
"time"

"github.com/Azure/azure-container-networking/log"
"github.com/Azure/azure-container-networking/network/policy"
Expand Down Expand Up @@ -78,6 +79,14 @@ func (nm *networkManager) newNetworkImpl(nwInfo *NetworkInfo, extIf *externalInt
extIf: extIf,
}

globals, err := hcsshim.GetHNSGlobals()
if err != nil || globals.Version.Major <= hcsshim.HNSVersion1803.Major {
// err would be not nil for windows 1709 & below
// Sleep for 10 seconds as a workaround for windows 1803 & below
// This is done only when the network is created.
time.Sleep(time.Duration(10) * time.Second)
}

return nw, nil
}

Expand Down