Request #4851

Service VM "drain" before terminate

Added by Taavi K almost 5 years ago. Updated over 4 years ago.

Status:PendingStart date:10/06/2016
Priority:NormalDue date:
Assignee:-% Done:

0%

Category:-
Target version:-
Pull request:

Description

Currently there's no option in Sunstone for service VM-ms to gracefully finish serving clients before terminating VMs during auto-scaling down.
I propose optional custom shutdown action in service template with attributes and step duration time (before VM termination).

For example I'd like to trigger external http get/post request to tell loadbalancer not to route new clients (and terminate their tcp connections) to VM-ms which are about to be terminated.

Sure, it all can be done through OneFlow API , but not within Sunstone.

History

#1 Updated by Ruben S. Montero over 4 years ago

  • Tracker changed from Feature to Request

Hi,

Before moving this to the backlog, Couldn't this be done by hooking in the shutdown process of the VM? You can add a custom script to be executed when the VM enters the desired runlevel. Note also the timeout part is handled by the KVM driver or it could be added to the shutdown script.

#2 Updated by Taavi K over 4 years ago

Those custom hooks would fall into same category as using OneFlow API.

#3 Updated by Ruben S. Montero over 4 years ago

I was thinking about the init runlevel, related to context. Now we have an start script, so we could have a shutdown script.

#4 Updated by Taavi K over 4 years ago

Yes, this would do the trick :)

Also would be nice to have extra ability to scale down node role by vm's individual values.
For example: "expression" : "ATT < 5" would power down ONLY nodes matching that expression.

#5 Updated by Taavi K over 4 years ago

And also scale up if ANY node's value in role matches expression.
For example: in 3 node role "expression" : "ATT > 25" would trigger scale up if any node evaluates true.

#6 Updated by Taavi K over 4 years ago

Forgot "ALL" criteria :)

So role scaling based on AVG, ANY and ALL expressions.

Also available in: Atom PDF