From 98f54022a1519fab6e3c3bb4ddd5f65c9c6b3b6b Mon Sep 17 00:00:00 2001 From: Junjie Zhang Date: Fri, 5 Jan 2024 16:57:33 +0000 Subject: [PATCH] fix --- parts/windows/kuberneteswindowssetup.ps1 | 2 +- parts/windows/windowscsehelper.ps1 | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/parts/windows/kuberneteswindowssetup.ps1 b/parts/windows/kuberneteswindowssetup.ps1 index b34597b3591..905a8f65c8e 100644 --- a/parts/windows/kuberneteswindowssetup.ps1 +++ b/parts/windows/kuberneteswindowssetup.ps1 @@ -245,7 +245,7 @@ try # Download CSE function scripts Write-Log "Getting CSE scripts" $tempfile = 'c:\csescripts.zip' - Logs-To-Events "AKS.WindowsCSE.DownloadCSEScriptPackageUrl" DownloadFileOverHttp -Url "$global:CSEScriptsPackageUrl" -DestinationPath $tempfile -ExitCode $global:WINDOWS_CSE_ERROR_DOWNLOAD_CSE_PACKAGE + Logs-To-Events "AKS.WindowsCSE.DownloadCSEScriptPackageUrl" DownloadFileOverHttp -Url $global:CSEScriptsPackageUrl -DestinationPath $tempfile -ExitCode $global:WINDOWS_CSE_ERROR_DOWNLOAD_CSE_PACKAGE Expand-Archive $tempfile -DestinationPath "C:\\AzureData\\windows" Remove-Item -Path $tempfile -Force diff --git a/parts/windows/windowscsehelper.ps1 b/parts/windows/windowscsehelper.ps1 index 6adb76c0609..8a089ac2432 100644 --- a/parts/windows/windowscsehelper.ps1 +++ b/parts/windows/windowscsehelper.ps1 @@ -124,7 +124,7 @@ function DownloadFileOverHttp { $downloadTimer = [System.Diagnostics.Stopwatch]::StartNew() try { - $args = @{Uri=$Url; Method="Get"; OutFile=$DestinationPath} + $args = @{Uri="$Url"; Method="Get"; OutFile=$DestinationPath} Retry-Command -Command "Invoke-RestMethod" -Args $args -Retries 5 -RetryDelaySeconds 10 } catch { Set-ExitCode -ExitCode $ExitCode -ErrorMessage "Failed in downloading $Url. Error: $_"