From 19f08915026377f3a058614e94f32ce0f09fc787 Mon Sep 17 00:00:00 2001 From: Grace Wehner Date: Fri, 17 Nov 2023 10:54:53 -0800 Subject: [PATCH] [Fix] Window liveness probe with goto within blocks (#681) * liveness probe fix * remove branch * update /B everywhere * version and release notes * cves * get build with eof * remove null * fix syntax * use ! * remove branch * remove changes * add in goto * add another goto --- otelcollector/build/windows/scripts/livenessprobe.cmd | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/otelcollector/build/windows/scripts/livenessprobe.cmd b/otelcollector/build/windows/scripts/livenessprobe.cmd index ab9e0018f..a585f57da 100644 --- a/otelcollector/build/windows/scripts/livenessprobe.cmd +++ b/otelcollector/build/windows/scripts/livenessprobe.cmd @@ -14,7 +14,7 @@ if "%MAC%" == "" ( tasklist /fi "imagename eq MetricsExtension.Native.exe" /fo "table" | findstr MetricsExtension > nul if !ERRORLEVEL! NEQ 0 ( echo "Metrics Extension is not running (Non-MAC mode)" - exit /B 1 + goto eof ) ) else ( if "%MAC%" == "true" ( @@ -33,19 +33,19 @@ if "%MAC%" == "" ( ) if !durationInMinutes! GTR 15 ( echo "Greater than 15 mins, No configuration present for the AKS resource" - exit /B 1 + goto eof ) ) ) else ( tasklist /fi "imagename eq MetricsExtension.Native.exe" /fo "table" | findstr MetricsExtension > nul if !ERRORLEVEL! NEQ 0 ( echo "Metrics Extension is not running (configuration exists)" - exit /B 1 + goto eof ) tasklist /fi "imagename eq MonAgentLauncher.exe" /fo "table" | findstr MonAgentLauncher > nul if !ERRORLEVEL! NEQ 0 ( echo "MonAgentLauncher is not running (configuration exists)" - exit /B 1 + goto eof ) ) ) @@ -81,3 +81,6 @@ if %ERRORLEVEL% NEQ 0 ( endlocal exit /B 0 + +:eof +exit /B 1