From 1fccdfb7950d0c40ef99f62df47344f3e890dacf Mon Sep 17 00:00:00 2001 From: "Walter A. Boring IV" Date: Tue, 1 Sep 2015 11:59:22 -0700 Subject: [PATCH] 3PAR Disable generic image volume cache This patch disables the 3PAR drivers if an admin tries to enable the generic image volume cache capability. The 3PAR drivers don't work with this currently because of the way volume cloning works in the drivers. When a volume is cloned, it's done so in the background, which makes the clone available immediately for attaching. The problem is, a background cloning also locks the original volume from being modified. The generic image cache does a clone, and then an extend volume, which fails for the 3PAR drivers currently. Change-Id: If2e79a24969ab85bacdffdf750af5fc74be37a5c Partial-Bug: 1491088 --- cinder/tests/unit/test_hp3par.py | 1 + cinder/volume/drivers/san/hp/hp_3par_common.py | 11 +++++++++++ 2 files changed, 12 insertions(+) diff --git a/cinder/tests/unit/test_hp3par.py b/cinder/tests/unit/test_hp3par.py index bc78bd825..1b3bdb09c 100644 --- a/cinder/tests/unit/test_hp3par.py +++ b/cinder/tests/unit/test_hp3par.py @@ -533,6 +533,7 @@ class HP3PARBaseDriver(object): configuration.hp3par_iscsi_chap_enabled = False configuration.goodness_function = GOODNESS_FUNCTION configuration.filter_function = FILTER_FUNCTION + configuration.image_volume_cache_enabled = False return configuration @mock.patch( diff --git a/cinder/volume/drivers/san/hp/hp_3par_common.py b/cinder/volume/drivers/san/hp/hp_3par_common.py index 9be803553..a4abc448f 100644 --- a/cinder/volume/drivers/san/hp/hp_3par_common.py +++ b/cinder/volume/drivers/san/hp/hp_3par_common.py @@ -336,6 +336,17 @@ class HP3PARCommon(object): {'srstatld_version': SRSTATLD_API_VERSION, 'version': self.API_VERSION}) + # TODO(walter-boring) BUG: 1491088. For the time being disable + # making the drivers usable if they enable the image cache + # The image cache feature fails on 3PAR drivers + # because it tries to extend a volume as it's still being cloned. + if self.config.image_volume_cache_enabled: + msg = _("3PAR drivers do not support enabling the image " + "cache capability at this time. You must disable " + "the configuration setting in cinder.conf") + LOG.error(msg) + raise exception.InvalidInput(message=msg) + def check_for_setup_error(self): self.client_login() try: -- 2.45.2