[OCTRL-1010] Fix automatic Mesos retry #714
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.
I did 3 major changes:
tasks/manager.goso we can control state of affairs after one retry round.if len(descriptorsUndeployable) == 0because it is possible to continue even if you have some "undeployable" tasks. More than that, it is desirable to do so, as right now it was possible that some tasks are run multiple times resulting in "zombie" state forgotten on machine described by warningattempted status update of task not in roster. These tasks would be deployed multiple times and only the most recent deployment would be deleted leaving others behind. So I switched the logic around, we can try to deploy even if some of the tasks were declared as "undeployable".NOTE: removing two ifs caused some weird looking changes in the diff, but it is just removing one tab depth of code, so the diff is a bit muddy.