[Fai-commit] r5189 - in trunk: debian lib/setup-storage

lange at alioth.debian.org lange at alioth.debian.org
Tue Oct 14 13:32:41 UTC 2008


Author: lange
Date: 2008-10-14 13:32:41 +0000 (Tue, 14 Oct 2008)
New Revision: 5189

Modified:
   trunk/debian/changelog
   trunk/lib/setup-storage/Exec.pm
   trunk/lib/setup-storage/Volumes.pm
Log:
* lib/setup-storage/Exec.pm: recent versions of parted log errors to
  stdout instead of stderr + adaption of error messages to current ones
  (closes: #500823)
* lib/setup-storage/Volumes.pm: Handle new error message in case of
  missing disk label (closes: #500823)

Modified: trunk/debian/changelog
===================================================================
--- trunk/debian/changelog	2008-10-14 13:29:57 UTC (rev 5188)
+++ trunk/debian/changelog	2008-10-14 13:32:41 UTC (rev 5189)
@@ -4,9 +4,14 @@
     preserved partition does not match the size specified in the
     disk_config; fail, if an extended partition is to be created in place
     of a to-be-preserved partition (closes: #501772)
+  * lib/setup-storage/Exec.pm: recent versions of parted log errors to
+    stdout instead of stderr + adaption of error messages to current ones
+    (closes: #500823)
+  * lib/setup-storage/Volumes.pm: Handle new error message in case of
+    missing disk label (closes: #500823)
   * make-fai-nfsroot: print version of debootstrap (closes: #500046)
 
- -- Thomas Lange <lange at debian.org>  Tue, 14 Oct 2008 15:29:21 +0200
+ -- Thomas Lange <lange at debian.org>  Tue, 14 Oct 2008 15:31:55 +0200
 
 fai (3.2.11) unstable; urgency=low
 

Modified: trunk/lib/setup-storage/Exec.pm
===================================================================
--- trunk/lib/setup-storage/Exec.pm	2008-10-14 13:29:57 UTC (rev 5188)
+++ trunk/lib/setup-storage/Exec.pm	2008-10-14 13:32:41 UTC (rev 5189)
@@ -52,13 +52,21 @@
 $FAI::error_codes = [
   {
     error   => "parted_1",
-    message => "Parted failed to remove the partition\n",
-    stderr_regex => "Error: Could not stat device rm - No such file or directory",
+    message => "Parted failed to open the device\n",
+    stderr_regex => "Error: Could not stat device .* - No such file or directory",
     stdout_regex => "",
     program      => "parted",
     response     => "die",
   },
   {
+    error   => "parted_1_new",
+    message => "Parted failed to open the device\n",
+    stderr_regex => "",
+    stdout_regex => "Error: Could not stat device .* - No such file or directory",
+    program      => "parted",
+    response     => "die",
+  },
+  {
     error        => "parted_2",
     message      => "Parted could not read a disk label\n",
     stderr_regex => "Error: Unable to open .* - unrecognised disk label",
@@ -67,67 +75,83 @@
     response     => "warn",
   },
   {
-    error   => "parted_3",
-    message => "Parted failed to open the device\n",
-    stderr_regex => "Error: Could not stat device .* - No such file or directory",
-    stdout_regex => "",
+    error        => "parted_2_new",
+    message      => "Parted could not read a disk label\n",
+    stderr_regex => "",
+    stdout_regex => "Error: .* unrecognised disk label",
     program      => "parted",
-    response     => "die"
+    response     => "warn",
   },
+  ## {
+  ##   error        => "parted_3",
+  ##   message      => "Parted was unable to create the partition\n",
+  ##   stderr_regex => "Warning: You requested a partition from .* to .*\\.\$",
+  ##   stdout_regex => "",
+  ##   program      => "parted",
+  ##   response     => \&FAI::restore_partition_table,
+  ## },
   {
-    error   => "parted_4",
-    message => "parted not found\n",
-    stderr_regex => "(parted: command not found|/sbin/parted: No such file or directory)",
+    error        => "parted_4",
+    message      => "Parted was unable to read the partition table\n",
+    stderr_regex => "No Implementation: Partition \\d+ isn't aligned to cylinder boundaries",
     stdout_regex => "",
     program      => "parted",
-    response     => "die"
+    response     => "die",
   },
   {
+    error        => "parted_4_new",
+    message      => "Parted was unable to read the partition table\n",
+    stderr_regex => "",
+    stdout_regex => "No Implementation: Partition \\d+ isn't aligned to cylinder boundaries",
+    program      => "parted",
+    response     => "die",
+  },
+  {
     error        => "parted_5",
-    message      => "Parted was unable to create the partition\n",
-    stderr_regex => "Warning: You requested a partition from .* to .*\\.\$",
+    message      => "Parted failed to resize due to a setup-storage internal error\n",
+    stderr_regex => "Error: Can't have overlapping partitions",
     stdout_regex => "",
     program      => "parted",
-    response     => \&FAI::restore_partition_table,
+    response     => "die",
   },
   {
-    error => "mkfs.xfs_1",
-    message => "mkfs.xfs refused to create a filesystem. Probably you should add -f to the mkfs options in your disk_config file.\n",
-    stderr_regex => "mkfs.xfs: /dev/.* appears to contain an existing filesystem",
-    stdout_regex => "",
-    program      => "mkfs.xfs",
+    error        => "parted_5_new",
+    message      => "Parted failed to resize due to a setup-storage internal error\n",
+    stderr_regex => "",
+    stdout_regex => "Error: Can't have overlapping partitions",
+    program      => "parted",
     response     => "die",
   },
   {
     error        => "parted_6",
-    message      => "Parted was unable to read the partition table\n",
-    stderr_regex => "No Implementation: Partition \\d+ isn't aligned to cylinder boundaries",
+    message      => "Parted failed to resize the partition (is it too small?)\n",
+    stderr_regex => "Error: Unable to satisfy all constraints on the partition",
     stdout_regex => "",
     program      => "parted",
     response     => "die",
   },
   {
-    error        => "parted_7",
-    message      => "Parted doesn't support ntfs resizing\n",
-    stderr_regex => "No Implementation: Support for opening ntfs file systems is not implemented yet",
-    stdout_regex => "",
+    error        => "parted_6_new",
+    message      => "Parted failed to resize the partition (is it too small?)\n",
+    stderr_regex => "",
+    stdout_regex => "Error: Unable to satisfy all constraints on the partition",
     program      => "parted",
     response     => "die",
   },
   {
-    error        => "parted_8",
-    message      => "Parted failed to resize due to a setup-storage internal error\n",
-    stderr_regex => "Error: Can't have overlapping partitions",
+    error   => "cmd_parted_1",
+    message => "parted not found\n",
+    stderr_regex => "(parted: command not found|/sbin/parted: No such file or directory)",
     stdout_regex => "",
     program      => "parted",
-    response     => "die",
+    response     => "die"
   },
   {
-    error        => "parted_9",
-    message      => "Parted failed to resize the partition (is it too small?)\n",
-    stderr_regex => "Error: Unable to satisfy all constraints on the partition",
+    error => "mkfs.xfs_1",
+    message => "mkfs.xfs refused to create a filesystem. Probably you should add -f to the mkfs options in your disk_config file.\n",
+    stderr_regex => "mkfs.xfs: /dev/.* appears to contain an existing filesystem",
     stdout_regex => "",
-    program      => "parted",
+    program      => "mkfs.xfs",
     response     => "die",
   },
   {

Modified: trunk/lib/setup-storage/Volumes.pm
===================================================================
--- trunk/lib/setup-storage/Volumes.pm	2008-10-14 13:29:57 UTC (rev 5188)
+++ trunk/lib/setup-storage/Volumes.pm	2008-10-14 13:32:41 UTC (rev 5189)
@@ -66,7 +66,7 @@
 
     # parted_2 happens when the disk has no disk label, because parted then
     # provides no information about the disk
-    if ($error eq "parted_2") {
+    if ($error eq "parted_2" || $error eq "parted_2_new") {
       $FAI::no_dry_run or die 
         "Can't run on test-only mode on this system because there is no disklabel on $disk\n";
 




More information about the Fai-commit mailing list