Smart Bay Scale Down

Registered by Adrian Otto

We currently allow Magnum to scale down bays by removing nodes from the Bay's ResourceGroup by updating the heat stack that created the bay. Example, to scale down a two-node bay to one node:

magnum bay-update k8sbay replace node_count=1

The problem with this approach is that Heat decides which node to delete, and all containers on that node will also be deleted. Let's make the selection process smarter, so that we ask Heat to delete (a) Bay node(s) that have NO CONTAINERS on them. This is possible by using the removal_policies property on the Heat stack with a resource_list identifying UUIDs of the Nova instance(s) to remove from the ResourceGroup when the count property is reduced.

Blueprint information

Status:
Complete
Approver:
Adrian Otto
Priority:
Low
Drafter:
Adrian Otto
Direction:
Approved
Assignee:
hongbin
Definition:
Approved
Series goal:
Accepted for liberty
Implementation:
Implemented
Milestone target:
milestone icon liberty-2
Started by
hongbin
Completed by
hongbin

Related branches

Sprints

Whiteboard

Here is the documentation for the Heat ResourceGroup:
http://docs.openstack.org/hot-reference/content/OS__Heat__ResourceGroup.html

Gerrit topic: https://review.openstack.org/#q,topic:bug/1467526,n,z

Addressed by: https://review.openstack.org/194378
    Add 'host' field to Pod object.

Gerrit topic: https://review.openstack.org/#q,topic:bp/magnum-smart-bay-scale-down,n,z

Addressed by: https://review.openstack.org/196402
    Move conductor common implementations into module

Addressed by: https://review.openstack.org/196505
    Modify k8s template to support removal policy

Addressed by: https://review.openstack.org/196526
    [WIP] Implement bay smart scale down

Addressed by: https://review.openstack.org/198799
    Add documentation for smart scale down feature

Currently, smart scale down for k8s bay was implemented. I think we need to investigate how to introduce this feature to other bay types (separated BPs created for that).

(?)

Work Items

Dependency tree

* Blueprints in grey have been implemented.

This blueprint contains Public information 
Everyone can see this information.