]> review.fuel-infra Code Review - openstack-build/cinder-build.git/commit
Replication status periodic task optimization
authorSteven Kaufer <kaufer@us.ibm.com>
Tue, 10 Feb 2015 21:12:16 +0000 (21:12 +0000)
committerSteven Kaufer <kaufer@us.ibm.com>
Thu, 26 Feb 2015 14:26:47 +0000 (14:26 +0000)
commitfa6ab2483de36c447d199643eb1e5f7de6390165
tree4fb97c79ac7c97ee5b33abe1bff406a2935c2f07
parent35594bbf1745de3b83bec3ad812d1952738db1ce
Replication status periodic task optimization

A periodic task exists to update the replication status for all volumes.
Currently, this task executes for all drivers and always retrieves all
volumes for the current host from the DB.

This patch set:
* Ensures that the periodic task is only activated if the driver actually
  supports replication
* Only retrieves volumes from the DB if 'replication_status'!='disabled' in
  the periodic task

Also, the driver documentation in cinder.volume.driver.VolumeDriver.
get_volume_stats() is updated to reflect that the 'replication' key indicates
that the driver supports replication; this is the key that was actually
implemented in the drivers that support replication.

Change-Id: I61fbc31567ad0b6908a00113adeaccf415343e8e
Closes-Bug: 1383524
cinder/tests/test_volume.py
cinder/volume/driver.py
cinder/volume/manager.py