diff options
author | David Lehman <dlehman@redhat.com> | 2008-10-31 10:48:36 -0500 |
---|---|---|
committer | David Lehman <dlehman@redhat.com> | 2008-10-31 10:48:50 -0500 |
commit | 483628d14a0061e780b9956557893ca0143f41bc (patch) | |
tree | 75a6cb0a5090153763bf18490d2a5e4859efda6c | |
parent | 05ec3f06b8e7ca68cb5352e58dcb26d147168d5e (diff) | |
download | anaconda-483628d14a0061e780b9956557893ca0143f41bc.tar.gz anaconda-483628d14a0061e780b9956557893ca0143f41bc.tar.xz anaconda-483628d14a0061e780b9956557893ca0143f41bc.zip |
Make sure we differentiate locked luks devs from deleted ones.
There was a regression in the patch for bug 465240 (commit 9c55aab9)
that caused us to not only filter out locked PVs, but also newly
created unencrypted PVs whose device name matched that of a just-
deleted unlocked encrypted PV. Confused yet?
-rw-r--r-- | partitions.py | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/partitions.py b/partitions.py index cfe770d87..a256e1a20 100644 --- a/partitions.py +++ b/partitions.py @@ -904,9 +904,14 @@ class Partitions: for part in partedUtils.get_lvm_partitions(disk): partname = partedUtils.get_partition_name(part) partrequest = self.getRequestByDeviceName(partname) - if partrequest.encryption is None and cryptodev.isLuks("/dev/%s" % partname): - # we don't want to treat encrypted an PV like a PV if the - # user chose not to provide a passphrase for this device + if partrequest.encryption is None and \ + cryptodev.isLuks("/dev/%s" % partname) and \ + not self.encryptedDevices.get(partname): + log.debug("ignoring PV %s since we cannot access it's contents" % partname) + # We don't want to treat an encrypted PV like a PV if the + # user chose not to provide a passphrase for this device. + # However, if the LUKS device belongs to a just-deleted + # request then we know it is available. continue used = 0 for volgroup in volgroups: |