Skip to content

Commit 18a2a98

Browse files
committed
Dump Windows version information during cluster bringup.
1 parent 43556be commit 18a2a98

File tree

2 files changed

+14
-0
lines changed

2 files changed

+14
-0
lines changed

cluster/gce/windows/configure.ps1

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -91,6 +91,7 @@ try {
9191
# then put these calls into a loop over a list of XYZ-psm1 keys.
9292
FetchAndImport-ModuleFromMetadata 'k8s-node-setup-psm1' 'k8s-node-setup.psm1'
9393

94+
Dump-DebugInfoToConsole
9495
Set-PrerequisiteOptions
9596
$kube_env = Fetch-KubeEnv
9697
Disable-WindowsDefender

cluster/gce/windows/k8s-node-setup.psm1

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -128,6 +128,19 @@ function Add_GceMetadataServerRoute {
128128
}
129129
}
130130

131+
# Writes debugging information, such as Windows version and patch info, to the
132+
# console.
133+
function Dump-DebugInfoToConsole {
134+
Try {
135+
$version = "$([System.Environment]::OSVersion.Version | Out-String)"
136+
$hotfixes = "$(Get-Hotfix | Out-String)"
137+
$image = "$(Get-InstanceMetadata 'image' | Out-String)"
138+
Log-Output "Windows version:`n$version"
139+
Log-Output "Installed hotfixes:`n$hotfixes"
140+
Log-Output "GCE Windows image:`n$image"
141+
} Catch { }
142+
}
143+
131144
# Fetches the kube-env from the instance metadata.
132145
#
133146
# Returns: a PowerShell Hashtable object containing the key-value pairs from

0 commit comments

Comments
 (0)