Bug 854580 - cannot populate devices with opened LUKS
Summary: cannot populate devices with opened LUKS
Keywords:
Status: CLOSED RAWHIDE
Alias: None
Product: Fedora
Classification: Fedora
Component: python-blivet
Version: 18
Hardware: Unspecified
OS: Unspecified
unspecified
medium
Target Milestone: ---
Assignee: David Lehman
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2012-09-05 11:24 UTC by Jan Safranek
Modified: 2013-10-21 12:37 UTC (History)
6 users (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed: 2013-10-21 12:37:27 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)

Description Jan Safranek 2012-09-05 11:24:05 UTC
Description of problem:
I use pyanaconda.storage module outside Anaconda installer. I have an encrypted partition, mounted somewhere.

storage.devicetree.populate() fails with traceback:

  File "anaconda_init.py", line 25, in <module>
    storage.devicetree.populate()
  File "/usr/lib64/python2.7/site-packages/pyanaconda/storage/devicetree.py", line 1856, in populate
    self._populate()
  File "/usr/lib64/python2.7/site-packages/pyanaconda/storage/devicetree.py", line 1970, in _populate
    self.addUdevDevice(dev)
  File "/usr/lib64/python2.7/site-packages/pyanaconda/storage/devicetree.py", line 1086, in addUdevDevice
    self.handleUdevDeviceFormat(info, device)
  File "/usr/lib64/python2.7/site-packages/pyanaconda/storage/devicetree.py", line 1667, in handleUdevDeviceFormat
    self.handleUdevLUKSFormat(info, device)
  File "/usr/lib64/python2.7/site-packages/pyanaconda/storage/devicetree.py", line 1164, in handleUdevLUKSFormat
    self.__passphrases)
  File "/usr/lib64/python2.7/site-packages/pyanaconda/storage/devicetree.py", line 78, in getLUKSPassphrase
    raise RuntimeError("device is already mapped")

Version-Release number of selected component (if applicable):
anaconda-18.6.5-1.fc18.x86_64

How reproducible:
always

Steps to Reproduce:
1. cryptsetup luksOpen /dev/sda1 myLuks
2. try to populate storage.devicetree
  
Anaconda probably expects that it's running on 'unconfigured' system, where nobody opened LUKS device. If I 'luksClose /dev/mapper/myLuks', it starts working.

If Anaconda is to be used as storage library, this must be fixed.

Comment 1 David Lehman 2013-02-05 23:19:12 UTC
This is fixed in commit 086d80ce0de1660.

Comment 2 Jan Safranek 2013-10-21 12:37:27 UTC
This seems to be fixed in python-blivet-0.24-1.fc21.noarch (and probably also few releases before).


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