Bug 1264375 - Re-installing on existing luks device in unattended mode failed
Re-installing on existing luks device in unattended mode failed
Status: NEW
Product: Fedora
Classification: Fedora
Component: python-blivet (Show other bugs)
x86_64 Linux
unspecified Severity unspecified
: ---
: ---
Assigned To: blivet-maint-list@redhat.com
Fedora Extras Quality Assurance
: Reopened
Depends On:
  Show dependency treegraph
Reported: 2015-09-18 06:18 EDT by Fabrice Robin
Modified: 2017-11-07 11:29 EST (History)
6 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2017-08-08 08:15:18 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)
Anaconda logs (273.65 KB, text/plain)
2015-09-18 09:24 EDT, Fabrice Robin
no flags Details

  None (edit)
Description Fabrice Robin 2015-09-18 06:18:20 EDT
Description of problem:

We would like to be able to install Fedora on an existing LUKS device keeping home lvm data.
It always fails with the exception "luks device not configured" although all information has been
given in the kickstart.

Here are the kickstart important lines:

# text mode installation
# Allow anaconda to partition the system as needed
%include /tmp/part

# Get the existing luks device uuid
UUID=`cryptsetup luksUUID /dev/sda2`
# Open the luks device
echo -ne "XXX" | cryptsetup -v -q luksOpen /dev/sda2 luks-$UUID -
# Get the existing volume group name
vgname=`vgdisplay | grep "VG Name" | awk '{print $3}'`

cat <<EOF >> /tmp/part
# Partition clearing information
clearpart --none --initlabel
# Disk partitioning information
part /boot --fstype ext4 --onpart=sda1
part luks-$UUID --fstype luks --noformat --encrypted --passphrase=XXX --onpart=sda2
volgroup $vgname --noformat --useexisting
logvol /home  --fstype xfs --useexisting --noformat --name=home --vgname=$vgname
logvol /  --fstype xfs --useexisting --name=root --vgname=$vgname
logvol swap  --fstype swap --useexisting --name=swap --vgname=$vgname

Additional info:
In graphical mode, we are able to manually reuse existing partitioning and keeping home data but 
we need the fedora installation to be totally unattended.

We also tried to add the "--encrypted --passphrase=XXX" to the logvol without success.

The exception is the same in graphical mode.

Here are the exception stack trace:

anaconda 22.20.13-1 exception report
Traceback (most recent call first):
  File "/usr/lib/python2.7/site-packages/blivet/formats/luks.py", line 179, in setup
    raise LUKSError("luks device not configured")
  File "/usr/lib/python2.7/site-packages/blivet/devices/storage.py", line 559, in setupParents
  File "/usr/lib/python2.7/site-packages/blivet/devices/storage.py", line 416, in _preSetup
  File "/usr/lib/python2.7/site-packages/blivet/devices/storage.py", line 427, in setup
    if not self._preSetup(orig=orig):
  File "/usr/lib/python2.7/site-packages/blivet/devices/storage.py", line 551, in setupParents
  File "/usr/lib/python2.7/site-packages/blivet/devices/storage.py", line 416, in _preSetup
  File "/usr/lib/python2.7/site-packages/blivet/devices/lvm.py", line 196, in _preSetup
    return StorageDevice._preSetup(self, orig=orig)
  File "/usr/lib/python2.7/site-packages/blivet/devices/storage.py", line 427, in setup
    if not self._preSetup(orig=orig):
  File "/usr/lib/python2.7/site-packages/blivet/devices/device.py", line 202, in setupParents
  File "/usr/lib/python2.7/site-packages/blivet/devices/lvm.py", line 622, in setupParents
    Device.setupParents(self, orig=orig)
  File "/usr/lib/python2.7/site-packages/blivet/devices/storage.py", line 416, in _preSetup
  File "/usr/lib/python2.7/site-packages/blivet/devices/storage.py", line 427, in setup
    if not self._preSetup(orig=orig):
  File "/usr/lib/python2.7/site-packages/blivet/deviceaction.py", line 661, in execute
  File "/usr/lib/python2.7/site-packages/blivet/devicetree.py", line 362, in processActions
  File "/usr/lib/python2.7/site-packages/blivet/blivet.py", line 162, in doIt
  File "/usr/lib/python2.7/site-packages/blivet/osinstall.py", line 1057, in turnOnFilesystems
  File "/usr/lib64/python2.7/site-packages/pyanaconda/install.py", line 196, in doInstall
    turnOnFilesystems(storage, mountOnly=flags.flags.dirInstall, callbacks=callbacks_reg)
  File "/usr/lib64/python2.7/threading.py", line 766, in run
    self.__target(*self.__args, **self.__kwargs)
  File "/usr/lib64/python2.7/site-packages/pyanaconda/threads.py", line 244, in run
    threading.Thread.run(self, *args, **kwargs)
LUKSError: luks device not configured

Local variables in innermost frame:
self: existing luks
kwargs: {}
Comment 1 David Shea 2015-09-18 09:03:08 EDT
Please attach the log files from /tmp to this bug as individual, text/plain attachments.
Comment 2 Fabrice Robin 2015-09-18 09:24:31 EDT
Created attachment 1074907 [details]
Anaconda logs
Comment 3 Fabrice Robin 2016-07-01 08:39:04 EDT
same problem on Fedora 24 even with the update image from https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=1348688
Comment 4 Fedora End Of Life 2017-07-25 15:17:35 EDT
This message is a reminder that Fedora 24 is nearing its end of life.
Approximately 2 (two) weeks from now Fedora will stop maintaining
and issuing updates for Fedora 24. It is Fedora's policy to close all
bug reports from releases that are no longer maintained. At that time
this bug will be closed as EOL if it remains open with a Fedora  'version'
of '24'.

Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, simply change the 'version'
to a later Fedora version.

Thank you for reporting this issue and we are sorry that we were not
able to fix it before Fedora 24 is end of life. If you would still like
to see this bug fixed and are able to reproduce it against a later version
of Fedora, you are encouraged  change the 'version' to a later Fedora
version prior this bug is closed as described in the policy above.

Although we aim to fix as many bugs as possible during every release's
lifetime, sometimes those efforts are overtaken by events. Often a
more recent Fedora release includes newer upstream software that fixes
bugs or makes them obsolete.
Comment 5 Fedora End Of Life 2017-08-08 08:15:18 EDT
Fedora 24 changed to end-of-life (EOL) status on 2017-08-08. Fedora 24 is
no longer maintained, which means that it will not receive any further
security or bug fix updates. As a result we are closing this bug.

If you can reproduce this bug against a currently maintained version of
Fedora please feel free to reopen this bug against that version. If you
are unable to reopen this bug, please file a new report against the
current release. If you experience problems, please add a comment to this

Thank you for reporting this bug and we are sorry it could not be fixed.
Comment 6 Fabrice Robin 2017-11-07 11:29:49 EST
Same problem on Fedora 26 :

blivet.errors.LUKSError: luks device not configured

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