Skip to content

Commit

Permalink
Apply registry key to fix WS2022 networking
Browse files Browse the repository at this point in the history
Signed-off-by: James Sturtevant <[email protected]>
  • Loading branch information
jsturtevant committed Aug 30, 2024
1 parent 553e949 commit f462308
Show file tree
Hide file tree
Showing 7 changed files with 51 additions and 0 deletions.
3 changes: 3 additions & 0 deletions capz/run-capz-e2e.sh
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,9 @@ main() {
export HELM_VERSION=v3.15.2
export TOOLS_BIN_DIR="${TOOLS_BIN_DIR:-$SCRIPT_ROOT/tools/bin}"

#temp for testing
export IMAGE_VERSION="latest"

# other config
export ARTIFACTS="${ARTIFACTS:-${PWD}/_artifacts}"
export CLUSTER_NAME="${CLUSTER_NAME:-capz-conf-$(head /dev/urandom | LC_ALL=C tr -dc a-z0-9 | head -c 6 ; echo '')}"
Expand Down
8 changes: 8 additions & 0 deletions capz/templates/gmsa-ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,13 @@ spec:
}
path: C:/NodeLogQueryKubeletConfig.ps1
permissions: "0744"
- content: |
$ErrorActionPreference = "Stop"
# this will fix https://github.com/microsoft/Windows-Containers/issues/516
# since 2019 doesn't read this value, it will be ignored
Set-ItemProperty -Path "HKLM:\SYSTEM\CurrentControlSet\Services\hns\State" -Name "FwPerfImprovementChange" -Type DWord -Value 0
path: C:/apply-ws2022-networking-fixes.ps1
permissions: "0744"
- content: |
mkdir -Force c:/localdumps
reg.exe add "HKLM\Software\Microsoft\Windows\Windows Error Reporting\LocalDumps" /V DumpCount /t REG_DWORD /d 50 /f
Expand Down Expand Up @@ -133,6 +140,7 @@ spec:
- powershell C:/create-temp-folder.ps1
- powershell C:/replace-containerd.ps1
- powershell C:/collect-hns-crashes.ps1
- powershell C:/apply-ws2022-networking-fixes.ps1
- powershell C:/replace-ci-binaries.ps1
users:
- groups: Administrators
Expand Down
8 changes: 8 additions & 0 deletions capz/templates/gmsa-pr.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,13 @@ spec:
}
path: C:/NodeLogQueryKubeletConfig.ps1
permissions: "0744"
- content: |
$ErrorActionPreference = "Stop"
# this will fix https://github.com/microsoft/Windows-Containers/issues/516
# since 2019 doesn't read this value, it will be ignored
Set-ItemProperty -Path "HKLM:\SYSTEM\CurrentControlSet\Services\hns\State" -Name "FwPerfImprovementChange" -Type DWord -Value 0
path: C:/apply-ws2022-networking-fixes.ps1
permissions: "0744"
- content: |
mkdir -Force c:/localdumps
reg.exe add "HKLM\Software\Microsoft\Windows\Windows Error Reporting\LocalDumps" /V DumpCount /t REG_DWORD /d 50 /f
Expand Down Expand Up @@ -128,6 +135,7 @@ spec:
- powershell C:/create-temp-folder.ps1
- powershell C:/replace-containerd.ps1
- powershell C:/collect-hns-crashes.ps1
- powershell C:/apply-ws2022-networking-fixes.ps1
- powershell C:/replace-pr-binaries.ps1
users:
- groups: Administrators
Expand Down
8 changes: 8 additions & 0 deletions capz/templates/shared-image-gallery-ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,13 @@ spec:
}
path: C:/NodeLogQueryKubeletConfig.ps1
permissions: "0744"
- content: |
$ErrorActionPreference = "Stop"
# this will fix https://github.com/microsoft/Windows-Containers/issues/516
# since 2019 doesn't read this value, it will be ignored
Set-ItemProperty -Path "HKLM:\SYSTEM\CurrentControlSet\Services\hns\State" -Name "FwPerfImprovementChange" -Type DWord -Value 0
path: C:/apply-ws2022-networking-fixes.ps1
permissions: "0744"
- content: |
mkdir -Force c:/localdumps
reg.exe add "HKLM\Software\Microsoft\Windows\Windows Error Reporting\LocalDumps" /V DumpCount /t REG_DWORD /d 50 /f
Expand Down Expand Up @@ -138,6 +145,7 @@ spec:
- powershell C:/create-temp-folder.ps1
- powershell C:/replace-containerd.ps1
- powershell C:/collect-hns-crashes.ps1
- powershell C:/apply-ws2022-networking-fixes.ps1
- powershell C:/replace-ci-binaries.ps1
- powershell C:/ssh-setup.ps1
users:
Expand Down
8 changes: 8 additions & 0 deletions capz/templates/windows-base.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,13 @@ spec:
}
path: C:/NodeLogQueryKubeletConfig.ps1
permissions: "0744"
- content: |
$ErrorActionPreference = "Stop"
# this will fix https://github.com/microsoft/Windows-Containers/issues/516
# since 2019 doesn't read this value, it will be ignored
Set-ItemProperty -Path "HKLM:\SYSTEM\CurrentControlSet\Services\hns\State" -Name "FwPerfImprovementChange" -Type DWord -Value 0
path: C:/apply-ws2022-networking-fixes.ps1
permissions: "0744"
- content: |
mkdir -Force c:/localdumps
reg.exe add "HKLM\Software\Microsoft\Windows\Windows Error Reporting\LocalDumps" /V DumpCount /t REG_DWORD /d 50 /f
Expand Down Expand Up @@ -100,6 +107,7 @@ spec:
- powershell C:/create-temp-folder.ps1
- powershell C:/replace-containerd.ps1
- powershell C:/collect-hns-crashes.ps1
- powershell C:/apply-ws2022-networking-fixes.ps1
users:
- groups: Administrators
name: capi
Expand Down
8 changes: 8 additions & 0 deletions capz/templates/windows-ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,13 @@ spec:
}
path: C:/NodeLogQueryKubeletConfig.ps1
permissions: "0744"
- content: |
$ErrorActionPreference = "Stop"
# this will fix https://github.com/microsoft/Windows-Containers/issues/516
# since 2019 doesn't read this value, it will be ignored
Set-ItemProperty -Path "HKLM:\SYSTEM\CurrentControlSet\Services\hns\State" -Name "FwPerfImprovementChange" -Type DWord -Value 0
path: C:/apply-ws2022-networking-fixes.ps1
permissions: "0744"
- content: |
mkdir -Force c:/localdumps
reg.exe add "HKLM\Software\Microsoft\Windows\Windows Error Reporting\LocalDumps" /V DumpCount /t REG_DWORD /d 50 /f
Expand Down Expand Up @@ -133,6 +140,7 @@ spec:
- powershell C:/create-temp-folder.ps1
- powershell C:/replace-containerd.ps1
- powershell C:/collect-hns-crashes.ps1
- powershell C:/apply-ws2022-networking-fixes.ps1
- powershell C:/replace-ci-binaries.ps1
users:
- groups: Administrators
Expand Down
8 changes: 8 additions & 0 deletions capz/templates/windows-pr.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,13 @@ spec:
}
path: C:/NodeLogQueryKubeletConfig.ps1
permissions: "0744"
- content: |
$ErrorActionPreference = "Stop"
# this will fix https://github.com/microsoft/Windows-Containers/issues/516
# since 2019 doesn't read this value, it will be ignored
Set-ItemProperty -Path "HKLM:\SYSTEM\CurrentControlSet\Services\hns\State" -Name "FwPerfImprovementChange" -Type DWord -Value 0
path: C:/apply-ws2022-networking-fixes.ps1
permissions: "0744"
- content: |
mkdir -Force c:/localdumps
reg.exe add "HKLM\Software\Microsoft\Windows\Windows Error Reporting\LocalDumps" /V DumpCount /t REG_DWORD /d 50 /f
Expand Down Expand Up @@ -128,6 +135,7 @@ spec:
- powershell C:/create-temp-folder.ps1
- powershell C:/replace-containerd.ps1
- powershell C:/collect-hns-crashes.ps1
- powershell C:/apply-ws2022-networking-fixes.ps1
- powershell C:/replace-pr-binaries.ps1
users:
- groups: Administrators
Expand Down

0 comments on commit f462308

Please sign in to comment.