Add signal handling to agbot_start.sh and css_start.sh #4039
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
When run in a container anax is run via a shell script that does not handle SIGTERM and hence when the container is stopped this signal does not arrive to the binary for graceful exit. A consequence of this is when run via docker compose up, docker compose down will have to wait until the timeout in order to kill the process.
The same happens for the ccs-api.
This change adds proper SIGTERM handling to agbot_start.sh and css_start.sh.
Type of change
Please delete options that are not relevant.
How Has This Been Tested?
Running the container image with docker compose up and checking the output of docker compose down:
Running
docker compose down -t 20s
without this change :With this change:
Checklist: