Skip to content
This repository was archived by the owner on Oct 13, 2023. It is now read-only.

Commit 70ca64d

Browse files
committed
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 <github@gone.nl> (cherry picked from commit 156ad54) Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
1 parent cb9414b commit 70ca64d

1 file changed

Lines changed: 4 additions & 12 deletions

File tree

hack/ci/windows.ps1

Lines changed: 4 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -203,25 +203,17 @@ Function Nuke-Everything {
203203
$count=(Get-ChildItem $reg | Measure-Object).Count
204204
if ($count -gt 0) {
205205
Write-Warning "There are $count NdisAdapters leaked under Psched\Parameters"
206-
if ($env:COMPUTERNAME -match "jenkins-rs1-") {
207-
Write-Warning "Cleaning Psched..."
208-
Get-ChildItem $reg | Remove-Item -Recurse -Force -ErrorAction SilentlyContinue | Out-Null
209-
} else {
210-
Write-Warning "Not cleaning as not a production RS1 server"
211-
}
206+
Write-Warning "Cleaning Psched..."
207+
Get-ChildItem $reg | Remove-Item -Recurse -Force -ErrorAction SilentlyContinue | Out-Null
212208
}
213209

214210
# TODO: This should be able to be removed in August 2017 update. Only needed for RS1
215211
$reg = "HKLM:\System\CurrentControlSet\Services\WFPLWFS\Parameters\NdisAdapters"
216212
$count=(Get-ChildItem $reg | Measure-Object).Count
217213
if ($count -gt 0) {
218214
Write-Warning "There are $count NdisAdapters leaked under WFPLWFS\Parameters"
219-
if ($env:COMPUTERNAME -match "jenkins-rs1-") {
220-
Write-Warning "Cleaning WFPLWFS..."
221-
Get-ChildItem $reg | Remove-Item -Recurse -Force -ErrorAction SilentlyContinue | Out-Null
222-
} else {
223-
Write-Warning "Not cleaning as not a production RS1 server"
224-
}
215+
Write-Warning "Cleaning WFPLWFS..."
216+
Get-ChildItem $reg | Remove-Item -Recurse -Force -ErrorAction SilentlyContinue | Out-Null
225217
}
226218
} catch {
227219
# Don't throw any errors onwards Throw $_

0 commit comments

Comments
 (0)