Skip to content

Do not remove from LB if not yet added#1171

Merged
ssalinas merged 1 commit into
masterfrom
lb_removal
Aug 5, 2016
Merged

Do not remove from LB if not yet added#1171
ssalinas merged 1 commit into
masterfrom
lb_removal

Conversation

@ssalinas

Copy link
Copy Markdown
Contributor

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 ssalinas modified the milestone: 0.10.0 Jul 29, 2016
@ssalinas

ssalinas commented Aug 5, 2016

Copy link
Copy Markdown
Contributor Author

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

@ssalinas
ssalinas merged commit 2a35f51 into master Aug 5, 2016
@ssalinas
ssalinas deleted the lb_removal branch August 5, 2016 13:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant