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
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(
{'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: