Skip to content

Commit 847ae37

Browse files
committed
Fix windows node startup failures.
1. cd to root dir before removing temp installer path. It was failing because we were trying to remove while being in the same dir. 2. Expand variables in a regular string and use it in the command. Expansion was failing in single quotes.
1 parent fbe806e commit 847ae37

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

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

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1627,16 +1627,17 @@ function DownloadAndInstall-LoggingAgents {
16271627
Log-Output 'Extracting Logging agent'
16281628
Expand-Archive td.zip
16291629
mv .\td\td-agent-bit-${LOGGINGAGENT_VERSION}-win64\ $LOGGINGAGENT_ROOT
1630+
cd C:\
16301631
Remove-Item -Force -Recurse $install_dir
16311632
}
16321633

16331634
# Download Logging exporter if needed
16341635
if (ShouldWrite-File $LOGGINGEXPORTER_ROOT\flb-exporter.exe) {
1636+
$url = ("https://storage.googleapis.com/gke-release/winnode/fluentbit-exporter/${LOGGINGEXPORTER_VERSION}/flb-exporter-${LOGGINGEXPORTER_VERSION}.exe")
16351637
Log-Output 'Downloading logging exporter'
16361638
New-Item $LOGGINGEXPORTER_ROOT -ItemType 'directory' -Force | Out-Null
16371639
MustDownload-File `
1638-
-OutFile $LOGGINGEXPORTER_ROOT\flb-exporter.exe `
1639-
-URLs 'https://storage.googleapis.com/gke-release/winnode/fluentbit-exporter/${LOGGINGEXPORTER_VERSION}/flb-exporter-${LOGGINGEXPORTER_VERSION}.exe'
1640+
-OutFile $LOGGINGEXPORTER_ROOT\flb-exporter.exe -URLs $url
16401641
}
16411642
}
16421643

0 commit comments

Comments
 (0)