In a script I develop to provision a new Integration Server (Windows batch), one step I do is start the IS using CC lifecycle api and then cc Monitoring api to detect when it’s up:
cc exec lifecycle start nodeAlias=%appName% runtimeComponentId=OSGI-IS* cc get monitoring runtimestatus %appName% integrationServer-default --expected-values ONLINE --check-every 20 --wait 240 pause
This works fine. But if it takes more than 4 minutes to start the IS, the call will timeout and the script will continue. I don’t want it to continue, I need to manually make sure that the IS is up before proceeding with the other steps, so I inserted a pause command in the script. Then I can troubleshoot the problem and proceed with the execution of the script.
The problem is that the script will always pause, even if the IS was started correctly before the timeout. I would like it to pause only if there is a problem. Is there a way to know if the call to “cc get monitoring” exited because the expected value was found or if it exited because of the timeout?