]> review.fuel-infra Code Review - openstack-build/neutron-build.git/commit
Improves Arista's ML2 driver's sync performance
authorShashank Hegde <shashank@aristanetworks.com>
Fri, 14 Feb 2014 02:20:45 +0000 (18:20 -0800)
committerShashank Hegde <shashank@aristanetworks.com>
Mon, 3 Mar 2014 02:23:21 +0000 (18:23 -0800)
commit854bc0973b8966a1bb3180e4a2ea5e7cbd8289f1
tree11461d98bcb968346bb0e4ca4e244e110eef97ad
parentb70dce2aab5b1c496786d4258a93f3c7ea3dc267
Improves Arista's ML2 driver's sync performance

In large scale deployments a full sync between Neutron and EOS can take minutes.
In order to cut that time, this patch batches multimle EOS CLI commands and
sends them to EOS instead of sending each command separately. For example, if a
tenant has 10 networks, instead of making 10 RPC calls to EOS to create those 10
networks, this patch builds a commands to create those 10 networks and makes
just one RPC call to EOS which cuts down sync times significantly. All the _bulk()
methods are added to batch such requests.

Another optimization is to timestamp when the Region data was modified (This
includes any tenant creation, their networks, VMs and ports). The sync gets the
timestamp from EOS and only if the timestamps do not match, the driver performs
a full sync.

Closes-Bug: 1279619
Change-Id: I7d17604a7088d7dbb6e3dbb0afdb8e6759c1f67d
neutron/plugins/ml2/drivers/mech_arista/db.py
neutron/plugins/ml2/drivers/mech_arista/mechanism_arista.py
neutron/tests/unit/ml2/drivers/test_arista_mechanism_driver.py