]> review.fuel-infra Code Review - openstack-build/cinder-build.git/commit
Prevent creating encrypted volume with image
authorlisali <xiaoyan.li@intel.com>
Fri, 7 Aug 2015 06:35:27 +0000 (14:35 +0800)
committerlisali <xiaoyan.li@intel.com>
Tue, 11 Aug 2015 01:23:28 +0000 (09:23 +0800)
commit19d5610f93850dd27cf3847135289eb243c64bd8
treee1e15b96b53c40dedbe4113eb826e752c741dc5b
parent690f1b24eb211b66b251d45456c172aed2ee67a9
Prevent creating encrypted volume with image

When creating an encrypted volume with a unencrypted image,
cinder just copies the unencrypted data to the volume,
which keeps unencrypted data in the volume.
But when booting/attaching the volume to Nova, it thinks
encrypted data on the volume. As a result, Nova reads
the data incorrectly.

The fix is to prevent such action. Later, we can
implement to write encrypted data in encrypted volumes
when creating from unencrypted image.

Change-Id: I0af8318222cee023451c38812bf83cdb4086faae
Closes-bug: #1482464
cinder/tests/unit/volume/flows/test_create_volume_flow.py
cinder/volume/flows/api/create_volume.py