#940167 Limitation on VG name in setup-storage

#940167#5
Date:
2019-09-13 09:04:20 UTC
From:
To:
From a FAI user:

When we manually create them, we tend to name our VGs for SSDs as: vg-
ssd[0-9]+ .

However, setup-storage doesn't like that and ends up confused with the
colums on the vg line in the disk_config file.

Would it be able possible to have VG names allow hyphens?

#940167#10
Date:
2019-09-13 09:11:32 UTC
From:
To:
Maybe this code in Parser.pm in line 936 is responsible for the limitation:
 name: m{^([^/,\s\-]+)}

You could try to remove \- and see if setup-storage is still working.

#940167#15
Date:
2019-09-13 09:45:13 UTC
From:
To:
Hi Andrew,

you've said that removing \- from the regex works for you. I cannot
reproduce this. When I use a vg name like vg-ssd7 I get the error

ERROR (line 13): Invalid volume: Was expecting /^vg\s+/, or
                       /^raid([0156]|10)\s+/, or /^btrfs
                       (single|raid([0156]|10))\s+/, or
                       /^(luks|luks:"[^"]+"|tmp|swap)\s+/, or /^tmpfs\s+/, or
                       /^nfs\s+([^\s]+)\s+/, or type

ERROR (line 13): Invalid line: Was expecting '\n' but found "vg-ssd7-
                      root / 3G-25G ext4 noatime,rw" instead


Can you please send me your disk_config that is working for you using
a hyphen.

#940167#22
Date:
2019-09-19 09:50:52 UTC
From:
To:
Hi Thomas,

Looking at the disk_config file again, I'm not actually making any LVs
inside the VG (they're made later when KVM instances are spun on up on
these machines). Removing \- works okay for creating a VG with a hyphen
in the name.

Cheers,
Andrew