From 156ad54fb707ed8b03a1084a841ef5602198799a Mon Sep 17 00:00:00 2001 From: Sebastiaan van Stijn Date: Thu, 29 Aug 2019 23:41:45 +0200 Subject: [PATCH] windows.ps1: fix leaked NdisAdapters not being cleaned up on RS1 Windows RS1 has problems with leaking NdisAdapters during the integration tests; the windows.ps1 script has a cleanup stesp to remove those leaked adapters. For internal testing at Microsoft on internal builds, this cleanup step was skipped, and only ran on the CI machines in our Jenkins. Due to the move to our new Jenkins, the names of Windows machines changed, and because of that, the cleanup step was never executed, resulting in the leaked adapters not being cleaned up: ``` 20:32:23 WARNING: There are 608 NdisAdapters leaked under Psched\Parameters 20:32:23 WARNING: Not cleaning as not a production RS1 server 20:32:24 WARNING: There are 608 NdisAdapters leaked under WFPLWFS\Parameters 20:32:24 WARNING: Not cleaning as not a production RS1 server ``` ``` 22:01:31 WARNING: There are 1209 NdisAdapters leaked under Psched\Parameters 22:01:31 WARNING: Not cleaning as not a production RS1 server 22:01:31 WARNING: There are 1209 NdisAdapters leaked under WFPLWFS\Parameters 22:01:31 WARNING: Not cleaning as not a production RS1 server ``` This patch removes the check for non-production builds, and unconditionally cleans up leaked adapters if they are found. Signed-off-by: Sebastiaan van Stijn --- hack/ci/windows.ps1 | 16 ++++------------ 1 file changed, 4 insertions(+), 12 deletions(-) diff --git a/hack/ci/windows.ps1 b/hack/ci/windows.ps1 index dc2cd5246e..705a23b1d3 100644 --- a/hack/ci/windows.ps1 +++ b/hack/ci/windows.ps1 @@ -203,12 +203,8 @@ Function Nuke-Everything { $count=(Get-ChildItem $reg | Measure-Object).Count if ($count -gt 0) { Write-Warning "There are $count NdisAdapters leaked under Psched\Parameters" - if ($env:COMPUTERNAME -match "jenkins-rs1-") { - Write-Warning "Cleaning Psched..." - Get-ChildItem $reg | Remove-Item -Recurse -Force -ErrorAction SilentlyContinue | Out-Null - } else { - Write-Warning "Not cleaning as not a production RS1 server" - } + Write-Warning "Cleaning Psched..." + Get-ChildItem $reg | Remove-Item -Recurse -Force -ErrorAction SilentlyContinue | Out-Null } # TODO: This should be able to be removed in August 2017 update. Only needed for RS1 @@ -216,12 +212,8 @@ Function Nuke-Everything { $count=(Get-ChildItem $reg | Measure-Object).Count if ($count -gt 0) { Write-Warning "There are $count NdisAdapters leaked under WFPLWFS\Parameters" - if ($env:COMPUTERNAME -match "jenkins-rs1-") { - Write-Warning "Cleaning WFPLWFS..." - Get-ChildItem $reg | Remove-Item -Recurse -Force -ErrorAction SilentlyContinue | Out-Null - } else { - Write-Warning "Not cleaning as not a production RS1 server" - } + Write-Warning "Cleaning WFPLWFS..." + Get-ChildItem $reg | Remove-Item -Recurse -Force -ErrorAction SilentlyContinue | Out-Null } } catch { # Don't throw any errors onwards Throw $_