group-based-policy/gbpservice
Kent Wu 357fbd4d83 Optimize the nova vm name query inside get_gbp_details()
1. Each controller will have a polling thread which will query
Nova API every 1 min to get the list of nova VMs and use that
to build up/update the DB cache.

2. There are 2 types of udpates, one is the full udpate which
will query all the nova VMs while the other is the incremental
update which will only query the new/updated VMs in the past
10 mins. We will do incremental udpate every 1 min then a full
update every 10 mins.

3. Inside get_gbp_details(), it will then query this DB cache
instead for the VM name. If its not there, it will just use the
device_id instead for the time being to speed up the performance.

4. Then when there are added/updated VMs, the polling thread will
call notify_port_update() to trigger an update to the
corresponding EP file.

5. This patch can also take care of the VM name change case.

6. The VMNameUpdate DB table is used to corodinate which
controller's polling thread should be in charge of the periodical
updates. So at any given time, there will be only one active
polling thread doing the updates.

Change-Id: I820d8078825dbc1e801b7e87752138e9509369d8
2019-01-31 16:15:47 -08:00
..
common Pike sync 2018-01-06 19:36:36 -08:00
contrib For queens sync 2018-09-07 16:24:08 -07:00
network Use a better name for the imports 2018-09-11 14:11:07 -07:00
neutron Optimize the nova vm name query inside get_gbp_details() 2019-01-31 16:15:47 -08:00
nfp For queens sync 2018-09-07 16:24:08 -07:00
tests For queens sync 2018-09-07 16:24:08 -07:00
tools [AIM] Distinguish repairable vs. unrepairable validation failures 2018-11-02 12:38:19 -04:00
__init__.py Renaming gbp package to gbpservice 2014-12-31 19:13:19 -08:00
_i18n.py Preparing for Pike support 2017-10-24 15:09:55 -07:00