Implement Retry for Agents Starting HttpServer #293
Merged
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.
Implement Retry for Agents Starting HttpServer
The most common reason for agents not being able to connect to the controller and requiring a restart (terminating that instance and spinning up a new one) observed so far is its inability to start its HttpServer. The cause has been pinpointed: another service is running on that port, and the agent fails to connect and throws an error, causing it to terminate. This has now been fixed to retry the call to start the httpserver, saving time in which the agent will come up (on average 40-60 seconds delay compare to terminating and restarting (4+ mins). This issue rarely occurs per job run, but the likelihood increases as the number of agents started at once increases (most likely will run into this when running 100+ agents at once). This change will allow the job to run with the same amount of agents it first began with, simply waiting for the failing agent to connect instead of terminating it.
Please make sure these check boxes are checked before submitting
mvn clean test -P default
** PR review process **