From 327df72aec6f9b03f513e74e0a22bb40ce590712 Mon Sep 17 00:00:00 2001 From: Patrick East Date: Tue, 8 Sep 2015 11:06:36 -0700 Subject: [PATCH] Correctly report multiattach in Pure drivers MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit 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 | 3 +++ cinder/volume/drivers/pure.py | 1 + 2 files changed, 4 insertions(+) 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 -- 2.45.2