-
Notifications
You must be signed in to change notification settings - Fork 188
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add skip lb removal flag to DeleteRequestRequest #1526
Conversation
Add a flag that can be set on the request deletion request to avoid removing the basepath associated with the service from the load balancer. The suggested use case is when the application associated with the service is moving out of Singularity, but will still be running and should remain load-balanced.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Checkbox will also need to be added to the UI
@@ -235,10 +235,11 @@ public SingularityRequestParent bounce(String requestId, Optional<SingularityBou | |||
final String deployId = getAndCheckDeployId(requestId); | |||
|
|||
checkConflict(!(requestManager.markAsBouncing(requestId) == SingularityCreateResult.EXISTED), "%s is already bouncing", requestId); | |||
Optional<Boolean> removeFromLoadBalancer = Optional.absent(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
can probably just put Optional.absent()
in the args rather than setting it here
@@ -659,7 +661,7 @@ private void cleanupRequestIfNoRemainingTasks(SingularityTaskCleanup cleanupTask | |||
requestManager.createCleanupRequest( | |||
new SingularityRequestCleanup( | |||
cleanupTask.getUser(), RequestCleanupType.DELETING, System.currentTimeMillis(), | |||
Optional.of(Boolean.TRUE), requestId, Optional.<String> absent(), | |||
Optional.of(Boolean.TRUE), Optional.absent(), requestId, Optional.<String> absent(), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we will end up losing our value in the flow here. For a delete, we end up doing something like
enqueue delete cleanup -> delete cleanup is removed and task cleanups are enqueued -> last task cleanup re-enqueues delete cleanup
The value will be there on the first delete cleanup, but we've lost it when re-enqueued (where the actual load balancer delete would happen
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yeah, it would always be absent (and then default to true it looks like) for every request. You'd prob have to add the request option configuration to the the SingularityTaskCleanup since that's the only living memory of the request so you can do something like cleanupTask.getRemoveFromLb
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍 Missed this in the test because I forgot to actually start a task after the deploy. Will push a fix
When a request has active tasks, first the tasks are removed and the request cleanup request is destroyed. Once all the tasks are removed, then a new request cleanup request is submitted. I had missed this case, so the `removeFromLoadBalancer` flag was set on the first request, but not on the second, when it would actually take affect. This correctly propagates the `removeFromLoadBalancer` flag across both requests.
Add a flag to the remove request modal to delete the request from the load balancer.
👍 Let's give this one a go in staging |
Add a flag that can be set on the request deletion request to avoid
removing the basepath associated with the service from the load
balancer. The suggested use case is when the application associated with
the service is moving out of Singularity, but will still be running and
should remain load-balanced.
/cc @ssalinas