Skip to content

Commit

Permalink
Merge pull request kubernetes#74381 from yujuhong/add-key
Browse files Browse the repository at this point in the history
GCE: add EventLog registry key for docker
  • Loading branch information
k8s-ci-robot authored Feb 23, 2019
2 parents ee95a1a + 40d0ae3 commit 46d7e9c
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 0 deletions.
1 change: 1 addition & 0 deletions cluster/gce/windows/configure.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -116,6 +116,7 @@ try {
Create-Directories
Download-HelperScripts

Create-DockerRegistryKey
Create-PauseImage
DownloadAndInstall-KubernetesBinaries
Create-NodePki
Expand Down
20 changes: 20 additions & 0 deletions cluster/gce/windows/k8s-node-setup.psm1
Original file line number Diff line number Diff line change
Expand Up @@ -1030,5 +1030,25 @@ function Verify-WorkerServices {
Log_Todo "run more verification commands."
}

# Add a registry key for docker in EventLog so that log messages are mapped
# correctly. This is a workaround since the key is missing in the base image.
# https://github.com/MicrosoftDocs/Virtualization-Documentation/pull/503
# TODO: Fix this in the base image.
function Create-DockerRegistryKey {
$tmp_dir = 'C:\tmp_docker_reg'
New-Item -Force -ItemType 'directory' ${tmp_dir} | Out-Null
$reg_file = 'docker.reg'
Set-Content ${tmp_dir}\${reg_file} `
'Windows Registry Editor Version 5.00
[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\EventLog\Application\docker]
"CustomSource"=dword:00000001
"EventMessageFile"="C:\\Program Files\\docker\\dockerd.exe"
"TypesSupported"=dword:00000007'

Log-Output "Importing registry key for Docker"
reg import ${tmp_dir}\${reg_file}
Remove-Item -Force -Recurse ${tmp_dir}
}

# Export all public functions:
Export-ModuleMember -Function *-*

0 comments on commit 46d7e9c

Please sign in to comment.