Skip to content

Remove paused requests from LB - #694

Merged
tpetr merged 10 commits into
masterfrom
remove_paused
Oct 13, 2015
Merged

Remove paused requests from LB#694
tpetr merged 10 commits into
masterfrom
remove_paused

Conversation

@ssalinas

Copy link
Copy Markdown
Contributor

Now that Baragon supports the DELETE request action for a few releases, this introduces lb cleanup for paused requests. Since our current LB cleanup queue is very task based, it would be difficult to accurately determine from a task's point of view that a request could be deleted form the LB. So, I implemented a request-based lb cleanup queue to go alongside our task-based one.

@tpetr

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

unnecessary import

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

what happens if getLoadBalancer() state is called after createLBCleanupRequest(), but no saveLoadBalancerState()?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

From what I interpreted it would return an Optional.absent, which would tell the cleanup method that no request has been sent yet and the cleanup still needs to be started

@tpetr

tpetr commented Sep 21, 2015

Copy link
Copy Markdown
Contributor

LGTM but I'd like to get @wsorenson's 2 cents on it too

@wsorenson

Copy link
Copy Markdown
Contributor

Are there tests?

@ssalinas

Copy link
Copy Markdown
Contributor Author

Not yet, I can write some up today though

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Does the service not take optionals ? Seems awkward to have to transition between Optionals and empty collections here.

@wsorenson

Copy link
Copy Markdown
Contributor

What is the difference between deleting request vs deleting tasks in Baragon?

On unpause, will task additions automatically recreate what's been deleted? (I see no corresponding call)

@ssalinas

Copy link
Copy Markdown
Contributor Author

A DELETE for baragon removes the config completely from the load balancer. An UPDATE just adds or removes upstreams (which is what we do for tasks). If a new task is started after the service was already deleted, it will recreate everything

@wsorenson

Copy link
Copy Markdown
Contributor

So do we issue a DELETE on request removal?

@ssalinas

Copy link
Copy Markdown
Contributor Author

Yes, DELETE for requests removal, UPDATE for anything to do with tasks

@ssalinas

Copy link
Copy Markdown
Contributor Author

Added a test for the request lb cleanup queue and one small tweak for processing the cleanup

@ssalinas ssalinas added the hs_qa label Sep 28, 2015
tpetr pushed a commit that referenced this pull request Oct 13, 2015
Remove paused requests from LB
@tpetr
tpetr merged commit 1b72403 into master Oct 13, 2015
@tpetr tpetr removed hs_qa labels Oct 13, 2015
@tpetr tpetr added this to the 0.4.6 milestone Oct 13, 2015
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.

3 participants