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.
The test case file had conflicts due to tests moving from
cinder/tests to cinder/tests/unit. I have resolved the
issues for this cherry pick.
Reviewed: https:/ /review. openstack. org/217365 /git.openstack. org/cgit/ openstack/ cinder/ commit/ ?id=d836a8f6b0d a95b09dc58d4d34 e5ab0d5a357ceb
Committed: https:/
Submitter: Jenkins
Branch: stable/kilo
commit d836a8f6b0da95b 09dc58d4d34e5ab 0d5a357ceb
Author: lisali <email address hidden>
Date: Fri Aug 7 14:35:27 2015 +0800
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.
The test case file had conflicts due to tests moving from
cinder/tests to cinder/tests/unit. I have resolved the
issues for this cherry pick.
Conflicts: cinder/ tests/test_ create_ volume_ flow.py
(cherry picked from commit: 19d5610f93850dd27c) 23451c38812bf83 cdb4086faae
Change-Id: I0af8318222cee0
Closes-bug: #1482464