Bug 996524 - ActionDestroyDevice with a LUKS device does not behave as expected
ActionDestroyDevice with a LUKS device does not behave as expected
Status: CLOSED NOTABUG
Product: Fedora
Classification: Fedora
Component: python-blivet (Show other bugs)
20
Unspecified Unspecified
unspecified Severity unspecified
: ---
: ---
Assigned To: David Lehman
Fedora Extras Quality Assurance
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2013-08-13 07:06 EDT by Jan Synacek
Modified: 2014-12-02 13:55 EST (History)
4 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2014-12-02 13:55:17 EST
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


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

  None (edit)
Description Jan Synacek 2013-08-13 07:06:29 EDT
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 12:32:40 EDT
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 13:55:17 EST
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.