[PATCH] Store the partitioning layout to the logs for easier debugging

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

 



---
 anaconda     |    5 +++++
 exception.py |    8 +++++++-
 2 files changed, 12 insertions(+), 1 deletions(-)

diff --git a/anaconda b/anaconda
index 6b01ed0..a3081e2 100755
--- a/anaconda
+++ b/anaconda
@@ -721,6 +721,11 @@ if __name__ == "__main__":
     #
     if earlyKS and not opts.rescue:
         opts.rescue = earlyKS.rescue.rescue
+    
+    # Store the partitioning layout to log in case anything goes wrong
+    PartLayout = iutil.execWithCapture("parted", ["parted", "-l"])
+    log.debug("Partition layout at the beginning of instalation as seen by parted -l:\n" + PartLayout)
+    del PartLayout
 
     if opts.rescue:
         anaconda.rescue = True
diff --git a/exception.py b/exception.py
index 3493786..eacbf54 100644
--- a/exception.py
+++ b/exception.py
@@ -35,6 +35,12 @@ import logging
 log = logging.getLogger("anaconda")
 
 class AnacondaExceptionHandler(ExceptionHandler):
+    def preWriteHook(self, (ty, value, tb), anaconda):
+        # Store the last known partitioning layout
+        PartLayout = iutil.execWithCapture("parted", ["parted", "-l"])
+        log.debug("Partition layout at the moment of exception as seen by parted -l:\n" + PartLayout)
+        del PartLayout
+
     def postWriteHook(self, (ty, value, tb), anaconda):
         # See if /mnt/sysimage is present and put exception there as well
         if os.access("/mnt/sysimage/root", os.X_OK):
@@ -119,7 +125,7 @@ def initExceptionHandling(anaconda):
                                ],
                   localSkipList=[ "passphrase", "password" ],
                   fileList=[ "/tmp/syslog", "/tmp/anaconda.log", "/tmp/lvmout",
-                             "/tmp/resize.out", "/tmp/program.log",
+                             "/tmp/resize.out", "/tmp/program.log", "/proc/partitions",
                              "/tmp/storage.log", "/tmp/yum.log",
                              anaconda.rootPath + "/root/install.log",
                              anaconda.rootPath + "/root/upgrade.log",
-- 
1.6.4.4

_______________________________________________
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