At some point the check to see if persistence layer was up started failing i.e. curl --output /dev/null --silent --head --fail http://${client_service_persistence_host}:${client_service_persistence_port} returned a fail (status code over 404). I believe this was when roo was removed
This led to intermittent failures of ACAS login on a fresh system as PrepareModuleConfJSON.js wouldn't run
The fix was to:
Have the curl call the protocol types endpoint in the persistence layer to check it is up (returns 200 code)
Don't have a wait timeout and just keep running the loop while roo is not up
Print to the logs the current status of the script to make it more obvious when it is failing
Related Issue
ACAS-638
How Has This Been Tested?
Started up a fresh instance and verified the logs looked correct:
[acas] PrepareModuleConfJSON.js: Persistence service url http://localhost:8080/acas/api/v1//protocoltypes, waiting 1 seconds before retrying"
[acas] PrepareModuleConfJSON.js: Persistence service url http://localhost:8080/acas/api/v1//protocoltypes, waiting 1 seconds before retrying"
[acas] PrepareModuleConfJSON.js: Running PrepareModuleConfJSON.js
[acas] PrepareModuleConfJSON.js: Success
Started up a fresh instance and purposefully broke roo:
And verified that script continue to run:
[acas] PrepareModuleConfJSON.js: Persistence service url http://localhost:8080/acas/api/v1//protocoltypes, waiting 1 seconds before retrying"
Description
curl --output /dev/null --silent --head --fail http://${client_service_persistence_host}:${client_service_persistence_port}
returned a fail (status code over 404). I believe this was when roo was removedPrepareModuleConfJSON.js
wouldn't runRelated Issue
ACAS-638
How Has This Been Tested?
And verified that script continue to run: