when using iSCSI protocol to conenct IBM v7000, starting cinder-volume service maybe occur KeyError.
log:
2014-03-06 01:48:26.409 25160 ERROR cinder.volume.manager [req-ac4f3744-1826-4456-a726-1d07ba5cb37e None] CN-18C9F33 Error encountered during initialization of driver: StorwizeSVCDriver
2014-03-06 01:48:26.409 25160 ERROR cinder.volume.manager [req-ac4f3744-1826-4456-a726-1d07ba5cb37e None] 'license_compression_enclosures'
2014-03-06 01:48:26.409 25160 TRACE cinder.volume.manager Traceback (most recent call last):
2014-03-06 01:48:26.409 25160 TRACE cinder.volume.manager File "/usr/lib/python2.6/site-packages/cinder/volume/manager.py", line 207, in init_host
2014-03-06 01:48:26.409 25160 TRACE cinder.volume.manager self.driver.do_setup(ctxt)
2014-03-06 01:48:26.409 25160 TRACE cinder.volume.manager File "/usr/lib/python2.6/site-packages/cinder/volume/drivers/ibm/storwize_svc/__init__.py", line 153, in do_setup
2014-03-06 01:48:26.409 25160 TRACE cinder.volume.manager self._helpers.compression_enabled()
2014-03-06 01:48:26.409 25160 TRACE cinder.volume.manager File "/usr/lib/python2.6/site-packages/cinder/volume/drivers/ibm/storwize_svc/helpers.py", line 54, in compression_enabled
2014-03-06 01:48:26.409 25160 TRACE cinder.volume.manager if resp[key] != '0':
2014-03-06 01:48:26.409 25160 TRACE cinder.volume.manager KeyError: 'license_compression_enclosures'
it should lack of license_compression_enclosures when compression is not enabled for the system. so need add checking in the code.
Fix proposed to branch: master /review. openstack. org/78568
Review: https:/