File tree Expand file tree Collapse file tree 2 files changed +4
-4
lines changed
Expand file tree Collapse file tree 2 files changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -687,15 +687,15 @@ function Get-AKS-NetworkAdaptor {
687687
688688 # we need the default gateway interface to create the external network
689689 try {
690- $netIP = Invoke-WithRetry - Command { Get-NetIPAddress - AddressFamily IPv4 - ErrorAction Stop - IpAddress $ipv4Address } - TaskName " AKS.WindowsCSE.NewExternalHnsNetwork" - MaxRetries 5 - DelaySeconds 60
690+ $netIP = Invoke-WithRetry - Command { Get-NetIPAddress - AddressFamily IPv4 - ErrorAction Stop - IpAddress $ipv4Address } - TaskName " AKS.WindowsCSE.NewExternalHnsNetwork" - MaxRetries 300 - DelaySeconds 1
691691 }
692692 catch {
693693 Logs- To- Event - TaskName " AKS.WindowsCSE.NewExternalHnsNetwork" - TaskMessage " Failed to find IP address info for ip address ${ipv4Address} : $ ( $_.Exception.Message ) . Reverting to old way to configure network"
694694 return Get-NetworkAdaptor - Fallback
695695 }
696696
697697 try {
698- $na = Invoke-WithRetry - Command { Get-NetAdapter - IncludeHidden - ifindex $netIP.ifIndex - ErrorAction stop } - TaskName " AKS.WindowsCSE.NewExternalHnsNetwork" - MaxRetries 5 - DelaySeconds 60
698+ $na = Invoke-WithRetry - Command { Get-NetAdapter - IncludeHidden - ifindex $netIP.ifIndex - ErrorAction stop } - TaskName " AKS.WindowsCSE.NewExternalHnsNetwork" - MaxRetries 300 - DelaySeconds 1
699699 if (! $na ) {
700700 Logs- To- Event - TaskName " AKS.WindowsCSE.NewExternalHnsNetwork" - TaskMessage " Failed to find network adapter info for ip address index $ ( $netIP.ifIndex ) and ip address $ipv4Address . Reverting to old way to configure network"
701701 return Get-NetworkAdaptor - Fallback
Original file line number Diff line number Diff line change @@ -1760,7 +1760,7 @@ Describe 'Get-AKS-NetworkAdaptor' {
17601760 Get-AKS - NetworkAdaptor | Should - Be $mockFallbackAdapter
17611761
17621762 Assert-MockCalled - CommandName " Get-Node-Ipv4-Address" - Exactly - Times 1
1763- Assert-MockCalled - CommandName " Get-NetIPAddress" - Exactly - Times 5
1763+ Assert-MockCalled - CommandName " Get-NetIPAddress" - Exactly - Times 300
17641764 # Should not reach these calls due to exception
17651765 Assert-MockCalled - CommandName " Get-NetAdapter" - Exactly - Times 0
17661766 Assert-MockCalled - CommandName " Get-NetworkAdaptor-Fallback" - Exactly - Times 1
@@ -1790,7 +1790,7 @@ Describe 'Get-AKS-NetworkAdaptor' {
17901790 $nas | Should - Be $mockFallback
17911791 Assert-MockCalled - CommandName " Get-Node-Ipv4-Address" - Exactly - Times 1
17921792 Assert-MockCalled - CommandName " Get-NetIPAddress" - Exactly - Times 1
1793- Assert-MockCalled - CommandName " Get-NetAdapter" - Exactly - Times 5
1793+ Assert-MockCalled - CommandName " Get-NetAdapter" - Exactly - Times 300
17941794 Assert-MockCalled - CommandName " Get-NetworkAdaptor-Fallback" - Exactly - Times 1
17951795 }
17961796
You can’t perform that action at this time.
0 commit comments