Data corrupted in cinder nfs volume with encrypted volume type after detached
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
os-brick |
Confirmed
|
High
|
Unassigned |
Bug Description
Summary:
It fails to re-attach an encrypted volume created from nfs to an instance.
Env:
All in one with devstack and origin/mater repository.
Reproduce steps:
1. Create an cinder volume from nfs with encrypted volume type.
2. Attach this volume to an instance.
3. Detach it.
4. Re-attach this volume to the instance.
Expect result:
re-attach succeeds.
Actual result:
The command fails with following error mesage:
ne 89, in _open_volume^M
^[[01;31m2015-10-29 08:09:08.771 TRACE oslo_messaging.
^[[01;31m2015-10-29 08:09:08.771 TRACE oslo_messaging.
^[[01;31m2015-10-29 08:09:08.771 TRACE oslo_messaging.
^[[01;31m2015-10-29 08:09:08.771 TRACE oslo_messaging.
^[[01;31m2015-10-29 08:09:08.771 TRACE oslo_messaging.
^[[01;31m2015-10-29 08:09:08.771 TRACE oslo_messaging.
^[[01;31m2015-10-29 08:09:08.771 TRACE oslo_messaging.
^[[01;31m2015-10-29 08:09:08.771 TRACE oslo_messaging.
^[[01;31m2015-10-29 08:09:08.771 TRACE oslo_messaging.
^[[01;31m2015-10-29 08:09:08.771 TRACE oslo_messaging.
^[[01;31m2015-10-29 08:09:08.771 TRACE oslo_messaging.
^[[01;31m2015-10-29 08:09:08.771 TRACE oslo_messaging.
Analysis:
When cinder creates a nfs volume, it is created in the share folder. For example,
/opt/stack/
And when it is attached to an instance, the share folder is mounted to the compute node.
/opt/stack/
-rw-rw-rw- 1 stack stack 1073741824 Oct 29 07:52 volume-
As the volume type is encrypted, it needs to encryptors.
With current encryptors mechanism, the file is changed to
lrwxrwxrwx 1 nobody nogroup 55 Oct 29 05:09 volume-
It means the original cinder volume file is deleted, and it is a link pointed to the encrypted device.
When detached, the encrypted device(
As a result, the volume is corrupted and re-attach fails
Changed in nova: | |
assignee: | nobody → Lisa Li (lisali) |
Changed in nova: | |
importance: | Undecided → High |
Changed in nova: | |
status: | Confirmed → In Progress |
no longer affects: | os-brick |
affects: | nova → os-brick |
As Nova and Cinder use nova/volume/ encryptors, I plan to move nova/volume/ encryptors to os-brick. The bug will be fixed after the work.