]> review.fuel-infra Code Review - openstack-build/cinder-build.git/commitdiff
IBM Storwize: Improve error message
authorTaoBai <baitaosh@cn.ibm.com>
Fri, 26 Sep 2014 11:20:08 +0000 (14:20 +0300)
committerTaoBai <baitaosh@cn.ibm.com>
Fri, 24 Oct 2014 09:04:52 +0000 (09:04 +0000)
Message "Unable to retype: Volume is replicated." can not really reflect
the reason why retype failed. We need to add additional information to
help user to better understand why retype failed.

Change-Id: If68bb1ba1e72df46fef35394c9ad207ffdeb271b

cinder/volume/drivers/ibm/storwize_svc/__init__.py

index 62ad086cff501c1637d73f36bcdb2c8ed91702de..62d2c7d59c8847ff5963f364ea7dfca591e4c629 100644 (file)
@@ -894,8 +894,9 @@ class StorwizeSVCDriver(san.SanDriver):
 
             # If volume is replicated, can't copy
             if new_type_replication:
-                msg = (_('Unable to retype: Volume %s is replicated.'),
-                       volume['id'])
+                msg = (_('Unable to retype: Current action needs volume-copy,'
+                         ' it is not allowed when new type is replication.'
+                         ' Volume = %s'), volume['id'])
                 raise exception.VolumeDriverException(message=msg)
 
             retype_iogrp_property(volume,