Bug 854580 - cannot populate devices with opened LUKS
cannot populate devices with opened LUKS
Product: Fedora
Classification: Fedora
Component: python-blivet (Show other bugs)
Unspecified Unspecified
unspecified Severity medium
: ---
: ---
Assigned To: David Lehman
Fedora Extras Quality Assurance
Depends On:
  Show dependency treegraph
Reported: 2012-09-05 07:24 EDT by Jan Safranek
Modified: 2013-10-21 08:37 EDT (History)
6 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2013-10-21 08:37:27 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

  None (edit)
Description Jan Safranek 2012-09-05 07:24:05 EDT
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>
  File "/usr/lib64/python2.7/site-packages/pyanaconda/storage/devicetree.py", line 1856, in populate
  File "/usr/lib64/python2.7/site-packages/pyanaconda/storage/devicetree.py", line 1970, in _populate
  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
  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):

How reproducible:

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 18:19:12 EST
This is fixed in commit 086d80ce0de1660.
Comment 2 Jan Safranek 2013-10-21 08:37:27 EDT
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.