[PATCH] Validate things for LVM

David Shea dshea at redhat.com
Tue May 13 14:55:40 UTC 2014


On 05/13/2014 08:47 AM, David Lehman wrote:
> On 05/12/2014 04:35 PM, David Shea wrote:
>> One for blivet and one for anaconda. In blivet, add validation 
>> methods to
>> devicelibs.lvm, and use those in the storage sanity check. In anaconda,
>> use the methods to validate input the container configuration dialog 
>> so we
>> can stop problems one step sooner.
>>
>
> I would prefer if you could make use of Blivet.safeDeviceName instead 
> of adding the new functions/methods only for LVM. Otherwise we're 
> going to have some clever tester file a bug about MD name validation 
> within the week.

I think I'd be ok with this if it's still used in anaconda to display a 
warning rather than to simply change the device name, as in having the 
test be based on 'name == Blivet.safeDeviceName(name)" and warning based 
on that. The problem I have with just mangling names is that is that LVM 
adds a lot of really specific, really dumb rules, and it might be a bit 
much of a surprise to just strip all of their strings out of the device 
name instead of stopping and explaining it. Like this harmless looking 
string:

# lvcreate -n snapshot0 /dev/whatever
   Names starting "snapshot" are reserved. Please choose a different LV 
name.
   Run `lvcreate --help' for more information.

Haha no one will ever try to create a device named that! I don't think 
changing it to just 0 would be cool. I am ok with making everyone else 
suffer for LVM's sins, though, and forbidding md arrays named 
17_tmeta_raid or whatever.


More information about the anaconda-patches mailing list