Bug 996524 - ActionDestroyDevice with a LUKS device does not behave as expected
Summary: ActionDestroyDevice with a LUKS device does not behave as expected
Keywords:
Status: CLOSED NOTABUG
Alias: None
Product: Fedora
Classification: Fedora
Component: python-blivet
Version: 20
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: David Lehman
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2013-08-13 11:06 UTC by Jan Synacek
Modified: 2014-12-02 18:55 UTC (History)
4 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2014-12-02 18:55:17 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)
Reproducer (784 bytes, text/plain)
2013-08-13 11:06 UTC, Jan Synacek
no flags Details


Links
System ID Private Priority Status Summary Last Updated
Red Hat Bugzilla 996457 0 unspecified CLOSED LUKSDevice map name always becomes luks-$UUID once the slave is formatted 2021-02-22 00:41:40 UTC

Internal Links: 996457

Description Jan Synacek 2013-08-13 11:06:29 UTC
Created attachment 786110 [details]
Reproducer

Description of problem:
ActionDestroyDevice with a LUKS device does not behave as expected. The device is destroyed (closed in this case), but an exception is thrown. More details below.


Version-Release number of selected component (if applicable):
python-blivet-0.19-1.fc20.noarch


How reproducible:
Always.


Steps to Reproduce:
1. Create and open a LUKS partition
2. Run the reproducer (change uuid in code as necessary)
3. Observe an exception


Actual results:
DeviceTreeError                           Traceback (most recent call last)
/usr/lib/python2.7/site-packages/IPython/utils/py3compat.pyc in execfile(fname, *where)
    176             else:
    177                 filename = fname
--> 178             __builtin__.execfile(filename, *where)

/home/jsynacek/openlmi-storage-nfs/blivet-luks-bug3.py in <module>()
     19 action = blivet.ActionDestroyDevice(luksdevice)
     20 # exception here
---> 21 b.devicetree.registerAction(action)
     22 print "YOU CAN'T SEE ME"
     23 b.devicetree.processActions([actions])

/usr/lib/python2.7/site-packages/blivet/devicetree.pyc in registerAction(self, action)
    341         if not (action.isCreate and action.isDevice) and \
    342            action.device not in self._devices:
--> 343             raise DeviceTreeError("device is not in the tree")
    344         elif (action.isCreate and action.isDevice):
    345             if action.device in self._devices:

DeviceTreeError: device is not in the tree


Expected results:
The LUKS device is closed without any exceptions as expected.


Additional info:
Note that even though the code throws an exception, the LUKS device *gets closed*.

Comment 1 Fedora End Of Life 2013-09-16 16:32:40 UTC
This bug appears to have been reported against 'rawhide' during the Fedora 20 development cycle.
Changing version to '20'.

More information and reason for this action is here:
https://fedoraproject.org/wiki/BugZappers/HouseKeeping/Fedora20

Comment 2 David Lehman 2014-12-02 18:55:17 UTC
You have to add the LUKSDevice to the devicetree before you can use the devicetree to destroy it.


Note You need to log in before you can comment on or make changes to this bug.