trio2o/trio2o/api
Dongfeng Huang 84396eb456 The framework of dynamic pod binding
1. What is the problem?
Originally this patch was committed to the Tricircle and provided
dynamic pod binding support. After splitting this feature should be
put in Trio2o. So we plan to synchronize this patch from Gerrit
to Trio2o. You can find the old patch on Gerrit here[1].

In the Trio2o, each tenant is bound to multiple pods, where it creates
various types of resources. However such a binding relationship should
be dynamic instead of static. For instance, when some resources in a pod
are exhausted, tenant needs to be bound to a new pod in the same AZ.

2. What is the solution to the problem?
To deal with the above problem, the Trio2o dynamically binds tenants
to pod which has available resources. We call this feature dynamic pod
binding, which is explained in the spec[2] in detail. In this patch, we
only try to bind a tenant to a pod dynamically, when she tries to create
a VM.

3. What the features need to be implemented to the Trio2o to realize
the solution?
When a tenant creates a VM, the Trio2o first selects all available
pods for her. Then by filtering and weighing the pods, the Trio2o
selects the most suitable pod for the tenant. Next, the Trio2o queries
database for current binding relationship of the tenant. If the tenant
is not bound to any pod, we create a new binding relationship, which
binds the tenant to the selected pod. If the tenant is already bound to
a pod, and the pod is not the one selected by the Trio2o, we update
current binding relationship, which binds the tenant to a new pod. If
the tenant is already bound to a pod, and the pod is exactly the one
selected by the Trio2o, the Trio2o does nothing.

[1] https://review.openstack.org/#/c/356187
[2] https://review.openstack.org/#/c/306224

Change-Id: I1c884ce47ace919f732d98ee154bdd59ed22cd74
2017-04-12 15:01:52 +08:00
..
controllers The framework of dynamic pod binding 2017-04-12 15:01:52 +08:00
__init__.py Remove networking related code from the Trio2o 2016-11-14 02:12:48 -05:00
app.py Enable tempest test 2017-02-06 00:15:28 -05:00
opts.py Remove networking related code from the Trio2o 2016-11-14 02:12:48 -05:00