cinder/cinder/tests/unit/volume/drivers/solidfire
Fernando Ferraz f70bfbf711 NetApp SolidFire: Fix duplicate volume when API response is lost
The SolidFire driver retries API requests in case a connection
error occurrs. When network is unstable, there may be the
possibility that the SolidFire backend successfully receive
and process a create volume operation, but fail to deliver the
response back to the driver.

When this scenario occurrs, the SolidFire driver automatically
resends the request, creating a second volume and leaving a
duplicate unused. Although this doesn't affect
driver functionality at first moment (the volume id from the
cluster is always correctly associated to cinder provider id),
further operations may hit the unused volume, leading to
unexpected hehavior.

This patch fixes this issue by:

1. Checking if the volume name already exists in the
backend before trying to create it. Volume creation will
raise a exception and abort in case of a volume is found.

2. Checking for volume creation right after a read timeout is
detected, preventing invalid API calls.

3. Adding option ´sf_volume_create_timeout´ to the SolidFire
driver, to allow users to set the appropriate timeout value for
their environment.

Closes-Bug: #1896112
Change-Id: I4383b691a8cc4aacb046332e418aafb88ba8ba56
(cherry picked from commit 42c92cc407)
(cherry picked from commit deb31a0c4d)
(cherry picked from commit d73da73283)
2021-03-24 22:43:30 +00:00
..
__init__.py SolidFire QoS scaled by volume size 2016-12-05 08:43:35 -07:00
scaled_iops_invalid_data.json SolidFire QoS scaled by volume size 2016-12-05 08:43:35 -07:00
scaled_iops_test_data.json SolidFire QoS scaled by volume size 2016-12-05 08:43:35 -07:00
test_solidfire.py NetApp SolidFire: Fix duplicate volume when API response is lost 2021-03-24 22:43:30 +00:00