create volume from snapshot will lose encrypted head when source volume is encrypted in RBD.
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Cinder |
Fix Released
|
Medium
|
haixin |
Bug Description
1:create an encrypted rbd volume A, which size is 2G.
2:create A's snapshot snap_A.
3:create new encrypted volume B form snap_A, the size of B is 2G too.
we know that, currently create rbd encrypted volume, we use qume-img create to create an encrypted file, and then use rbd import into rbd cluster, and the encrypted head takes up the first 1 MB capacity, so in the rbd cluster, the real size of volume A is 2G + 1M.
in rbd driver, at function def create_
if int(volume.size)
we can see that if volume.size is also 2G. then we resize B to 2G. this will lead to volume B lose it't encrypted head.
if volume B lose encrypted head, bug volume B has encrypt_key_id in database, this will lead to volume B can not attach to VM.
Changed in cinder: | |
assignee: | nobody → haixin (haixin77) |
tags: | added: ceph rbd |
Changed in cinder: | |
importance: | Undecided → Medium |
Changed in cinder: | |
assignee: | haixin (haixin77) → Sofia Enriquez (lsofia-enriquez) |
https:/ /review. opendev. org/c/openstack /cinder/ +/784623