Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Fix] Window liveness probe with goto within blocks #681

Merged
merged 16 commits into from
Nov 17, 2023
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
Loading