Re: [PATCH][rhel6-branch] Make sure to clean up temp vg paths after lvm edit.

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Ack.

On 10/25/2011 02:24 PM, David Lehman wrote:
This is a combination of several commits from master:

   commit 12f5c4a9b234605b920145f4f3f90287b185c98c
   commit d3b36f91b0fa44dd28764f8e9c0502d8b4e6793b
   commit ac6fe26afb5726845e3f02d87192a28561c3c150
   commit cf8c002979e555974b3ab276e28f3dbc631f0f29
   commit 0c5d7418fadfacacb86484046ed0d17e2fc740d3

Resolves: rhbz#747606
---
  iw/lvm_dialog_gui.py |    9 ++++++++-
  1 files changed, 8 insertions(+), 1 deletions(-)

diff --git a/iw/lvm_dialog_gui.py b/iw/lvm_dialog_gui.py
index b220211..143b8a3 100644
--- a/iw/lvm_dialog_gui.py
+++ b/iw/lvm_dialog_gui.py
@@ -412,7 +412,7 @@ class VolumeGroupEditor:
          templv = self.getLVByName(lv['name'], vg=tempvg)
          usedev = templv
          if templv.format.type == "luks":
-            templuks = LUKSDevice("luks-%s" % lv['name'],
+            templuks = LUKSDevice(templv.format.mapName,
                                    parents=[templv],
                                    format=self.luks[lv['name']],
                                    exists=templv.format.exists)
@@ -787,7 +787,9 @@ class VolumeGroupEditor:
                      templv.targetSize = targetSize

              if format.exists and format.mountable and format.mountpoint:
+                orig_dev = format.device
                  tempdev = StorageDevice('tmp', format=format)
+                tempdev.format.device = orig_dev
                  if self.storage.formatByDefault(tempdev) and \
                     not queryNoFormatPreExisting(self.intf):
                      continue
@@ -1131,6 +1133,11 @@ class VolumeGroupEditor:
                  # this lv is preexisting. check for resize and reformat.
                  # first, get the real/original lv
                  origlv = self.getLVByName(lv.lvname)
+                # make sure the format's device attr doesn't reference
+                # an lv in the temp vg
+                origlv.format.device = origlv.path
+                origlv.originalFormat.device = origlv.path
+
                  if lv.resizable and lv.targetSize != origlv.size:
                      actions.append(ActionResizeDevice(origlv, lv.targetSize))




--
David Cantrell <dcantrell@xxxxxxxxxx>
Supervisor, Installer Engineering Team
Red Hat, Inc. | Westford, MA | EST5EDT

_______________________________________________
Anaconda-devel-list mailing list
Anaconda-devel-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/anaconda-devel-list


[Index of Archives]     [Kickstart]     [Fedora Users]     [Fedora Legacy List]     [Fedora Maintainers]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [Yosemite Photos]     [KDE Users]     [Fedora Tools]
  Powered by Linux