]> review.fuel-infra Code Review - openstack-build/cinder-build.git/commitdiff
Correctly report multiattach in Pure drivers
authorPatrick East <patrick.east@purestorage.com>
Tue, 8 Sep 2015 18:06:36 +0000 (11:06 -0700)
committerPatrick East <patrick.east@purestorage.com>
Tue, 8 Sep 2015 20:10:17 +0000 (13:10 -0700)
As-is we end up ‘reporting’ to the scheduler that Pure backends do not
support multiattach. This is confusing because volumes created on a
Pure FlashArray will always be capable of doing multiattach even if not
specified by Cinder.

This change syncs up the reporting to the scheduler and what is actually
happening on the array.

Change-Id: I3a1e519efdd0c27f63b049aa686ff9045c260ab7
Closes-Bug: #1493478

cinder/tests/unit/test_pure.py
cinder/volume/drivers/pure.py

index 39b2c677b08bd7120a96364ac301e48a18db9ddc..980dbf49b7fed261a761f2cca7a3b540949140ae 100644 (file)
@@ -547,6 +547,7 @@ class PureBaseVolumeDriverTestCase(PureDriverTestCase):
                                             USED_SPACE),
             "total_volumes": 100,
             "filter_function": filter_function,
+            "multiattach": True,
         }
         real_result = self.driver.get_volume_stats(refresh=True)
         self.assertDictMatch(result, real_result)
@@ -574,6 +575,7 @@ class PureBaseVolumeDriverTestCase(PureDriverTestCase):
             "max_over_subscription_ratio": DEFAULT_OVER_SUBSCRIPTION,
             "total_volumes": 100,
             "filter_function": filter_function,
+            "multiattach": True,
         }
         real_result = self.driver.get_volume_stats(refresh=True)
         self.assertDictMatch(result, real_result)
@@ -602,6 +604,7 @@ class PureBaseVolumeDriverTestCase(PureDriverTestCase):
             "max_over_subscription_ratio": DEFAULT_OVER_SUBSCRIPTION,
             "total_volumes": 0,
             "filter_function": filter_function,
+            "multiattach": True,
         }
         real_result = self.driver.get_volume_stats(refresh=True)
         self.assertDictMatch(result, real_result)
index 902c3a8e8e1d96fe9e7f3c7179db2df4307ed76d..abfbe88ea25baa30437d7001f236799d89ba23d5 100644 (file)
@@ -315,6 +315,7 @@ class PureBaseVolumeDriver(san.SanDriver):
             "max_over_subscription_ratio": thin_provisioning,
             "total_volumes": total_vols,
             "filter_function": self.get_filter_function(),
+            "multiattach": True,
         }
         self._stats = data