Package: fai-client
Version: 3.2.16
Tags: patch

 Hi,

 Running the setup-storage command on a config file that defines an LVM
disk_config, where the preserve_{always,reinstall} or resize options are
in use, gives the following result:

# setup-storage -d -f dom0
setup-harddisks is running in test-only mode
Starting setup-storage 1.0.3
Using config file: dom0
INTERNAL ERROR in setup-storage:
VG re-parse failed
Please report this error to the Debian Bug Tracking System.

 The root cause is the regexp used to extract the VG / LV names which
forces to have at least one space character in the lvm id:
        m{^([^/,\s\-]+)-([^/,\s\-]+)\s+}
which is not possible regarding the EBNF grammar.

 The RAID and disk variants of those options do not have this problem,
only the LVM options.

 Following is a quick and dirty patch to get rid of those extra '\s+'
(there are 3 of them.)

 Regards,
 Frederic

--- Parser.pm.orig 2009-02-24 00:06:52.000000000 +0100
+++ Parser.pm      2009-02-24 00:08:58.000000000 +0100
@@ -375,7 +375,7 @@
         {
           # set the preserve flag for all ids in all cases
           foreach (split (",", $1)) {
-            (m{^([^/,\s\-]+)-([^/,\s\-]+)\s+}) or 
+            (m{^([^/,\s\-]+)-([^/,\s\-]+)}) or 
               die &FAI::internal_error("VG re-parse failed");
             $FAI::configs{"VG_$1"}{volumes}{$2}{size}{preserve} = 1 
           }
@@ -385,7 +385,7 @@
           # set the preserve flag for all ids if $FAI::reinstall is set
           if ($FAI::reinstall) {
             foreach (split (",", $1)) {
-              (m{^([^/,\s\-]+)-([^/,\s\-]+)\s+}) or 
+              (m{^([^/,\s\-]+)-([^/,\s\-]+)}) or 
                 die &FAI::internal_error("VG re-parse failed");
               $FAI::configs{"VG_$1"}{volumes}{$2}{size}{preserve} = 1 
             }
@@ -395,7 +395,7 @@
         {
           # set the resize flag for all ids
           foreach (split (",", $1)) {
-            (m{^([^/,\s\-]+)-([^/,\s\-]+)\s+}) or 
+            (m{^([^/,\s\-]+)-([^/,\s\-]+)}) or 
               die &FAI::internal_error("VG re-parse failed");
             $FAI::configs{"VG_$1"}{volumes}{$2}{size}{resize} = 1 
           }




-- 
To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org

Reply via email to