Do not remove from LB if not yet added #1171

Merged
merged 1 commit into from Aug 5, 2016

Conversation

Projects
None yet
1 participant
@ssalinas
Member

ssalinas commented Jul 25, 2016

In this order of events, we were submitting a LB ADD request after the REMOVE request, with the result that the presence of the REMOVE caused us to never properly remove the task from the LB:

  • deploy 1 running
  • deploy 2 starts
  • replacement task for deploy 1 enters TASK_RUNNING
  • deploy 2 tasks are healthy and LB ADD/REMOVE is triggered (but contains the replacement task above)
  • replacement task from deploy 1 becomes healthy and LB ADD is sent

This fixes the deploy logic to only issue the REMOVE as part of the deploy if the ADD is already present and successful. If the ADD completes after/during the deploy lb actions, the task will still be properly removed from the LB during cleanup since the LB REMOVE will not be present.

@ssalinas

This comment has been minimized.

Show comment
Hide comment
@ssalinas

ssalinas Aug 5, 2016

Member

This tested well in each of our environments, merging the fix

Member

ssalinas commented Aug 5, 2016

This tested well in each of our environments, merging the fix

@ssalinas ssalinas merged commit 2a35f51 into master Aug 5, 2016

2 checks passed

continuous-integration/travis-ci/pr The Travis CI build passed
Details
continuous-integration/travis-ci/push The Travis CI build passed
Details

@ssalinas ssalinas deleted the lb_removal branch Aug 5, 2016

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment