Merge pull request #100417 from ibabou/fix-containerd-check

Fix the containerd service check to register it
This commit is contained in:
Kubernetes Prow Robot 2021-03-23 01:13:35 -07:00 committed by GitHub
commit 07fe165442
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1608,7 +1608,7 @@ function Configure_Containerd {
# Register if needed and start containerd service.
function Start_Containerd {
# Do the registration only if the containerd service does not exist.
if (Get-WMIObject -Class Win32_Service -Filter "Name='containerd'" -eq $null) {
if ((Get-WMIObject -Class Win32_Service -Filter "Name='containerd'") -eq $null) {
Log-Output "Creating containerd service"
& containerd.exe --register-service --log-file "${env:LOGS_DIR}/containerd.log"
}