From: Patrick East Date: Tue, 8 Sep 2015 18:06:36 +0000 (-0700) Subject: Correctly report multiattach in Pure drivers X-Git-Url: https://review.fuel-infra.org/gitweb?a=commitdiff_plain;h=327df72aec6f9b03f513e74e0a22bb40ce590712;p=openstack-build%2Fcinder-build.git Correctly report multiattach in Pure drivers 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 --- diff --git a/cinder/tests/unit/test_pure.py b/cinder/tests/unit/test_pure.py index 39b2c677b..980dbf49b 100644 --- a/cinder/tests/unit/test_pure.py +++ b/cinder/tests/unit/test_pure.py @@ -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) diff --git a/cinder/volume/drivers/pure.py b/cinder/volume/drivers/pure.py index 902c3a8e8..abfbe88ea 100644 --- a/cinder/volume/drivers/pure.py +++ b/cinder/volume/drivers/pure.py @@ -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