Skip to content

Commit

Permalink
[Fix] Window liveness probe with goto within blocks (#681)
Browse files Browse the repository at this point in the history
* 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
  • Loading branch information
gracewehner authored Nov 17, 2023
1 parent 6bd7a54 commit 19f0891
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions otelcollector/build/windows/scripts/livenessprobe.cmd
Original file line number Diff line number Diff line change
Expand Up @@ -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" (
Expand All @@ -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
)
)
)
Expand Down Expand Up @@ -81,3 +81,6 @@ if %ERRORLEVEL% NEQ 0 (
endlocal

exit /B 0

:eof
exit /B 1

0 comments on commit 19f0891

Please sign in to comment.