Detach encrypted volume not cleanup volume path

Bug #1528092 reported by Wilson Liu
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
os-brick
Invalid
Undecided
Unassigned

Bug Description

When we detach a encrypted volume, the volume patch like
'/dev/disk/by-path/pci-0000:0c:00.1-fc-0x20811051720c8bca-lun-1 -> /dev/mapper/pci-0000:0c:00.1-fc-0x20811051720c8bca-lun-1' is not cleanup. This will effect next volume attach.

When detaching a encrypted volume, Nova close the volume via "cryptsetup remove", this operation will remove the patch '/dev/mapper/pci-0000:0c:00.1-fc-0x20811051720c8bca-lun-1' but the symbolic '/dev/disk/by-path/pci-0000:0c:00.1-fc-0x20811051720c8bca-lun-1' still exists there. Then when os-brick try to cleanup the volume patch '/dev/disk/by-path/pci-0000:0c:00.1-fc-0x20811051720c8bca-lun-1', the os.path.exists(path) function return False because the real volume path '/dev/mapper/pci-0000:0c:00.1-fc-0x20811051720c8bca-lun-1' is removed.

Wilson Liu (295988511-t)
Changed in os-brick:
assignee: nobody → Wilson Liu (295988511-t)
Wilson Liu (295988511-t)
summary: - Detach encrypted volume not cleanup volume patch
+ Detach encrypted volume not cleanup volume path
Wilson Liu (295988511-t)
description: updated
Changed in os-brick:
assignee: Wilson Liu (295988511-t) → nobody
Revision history for this message
Lee Yarwood (lyarwood) wrote :

Can you provide compute logs or the trace showing the attempted removal of the by-path device?

Revision history for this message
Lisa Li (lisali) wrote :

For ISCSIConnector, the path can be recovered by rescan before disconnect_volume:
https://github.com/openstack/os-brick/blob/master/os_brick/initiator/connector.py#L835

And for NFS volumes, it leads to following bug: https://bugs.launchpad.net/nova/+bug/1511255

Changed in os-brick:
status: New → Incomplete
Revision history for this message
Sean McGinnis (sean-mcginnis) wrote : Bug Cleanup

Closing stale bug. This has be Incomplete status for over 90 days. If this is still an issue please reopen.

Changed in os-brick:
status: Incomplete → Invalid
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.