Bug 186439
Summary: | Anaconda mishandles LVM LV names with -'s in them. | ||||||||
---|---|---|---|---|---|---|---|---|---|
Product: | [Fedora] Fedora | Reporter: | Eric Hopper <eric-bugs> | ||||||
Component: | anaconda | Assignee: | Peter Jones <pjones> | ||||||
Status: | CLOSED RAWHIDE | QA Contact: | |||||||
Severity: | medium | Docs Contact: | |||||||
Priority: | medium | ||||||||
Version: | 5 | CC: | creitz, jgranado, jpazdziora, mishu, wtogami | ||||||
Target Milestone: | --- | ||||||||
Target Release: | --- | ||||||||
Hardware: | All | ||||||||
OS: | Linux | ||||||||
Whiteboard: | |||||||||
Fixed In Version: | Doc Type: | Bug Fix | |||||||
Doc Text: | Story Points: | --- | |||||||
Clone Of: | Environment: | ||||||||
Last Closed: | 2008-01-30 14:49:16 UTC | Type: | --- | ||||||
Regression: | --- | Mount Type: | --- | ||||||
Documentation: | --- | CRM: | |||||||
Verified Versions: | Category: | --- | |||||||
oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |||||||
Cloudforms Team: | --- | Target Upstream Version: | |||||||
Embargoed: | |||||||||
Bug Depends On: | |||||||||
Bug Blocks: | 150223, 430907 | ||||||||
Attachments: |
|
Description
Eric Hopper
2006-03-23 16:29:19 UTC
anaconda disallows a - in the LV or VG name, so this is only a problem for preexisting ones. That means that Anaconda should be fixed to allow LV names with a '-' in them. :-) For now the idea is to avoid crashes. There are two possibilities: To tell the user that the lv or vg name with the '-' character is not accepted. Or to replace the character. FIRST OPTION: --- ../FC-D/kickstart.py 2007-03-08 19:43:45.000000000 +0100 +++ kickstart.py 2007-03-16 19:00:50.000000000 +0100 @@ -257,6 +257,9 @@ elif (lvd.percent <= 0 or lvd.percent > 100) and not lvd.preexist: raise KickstartValueError, formatErrorMsg(self.lineno, msg="Percentage must be between 0 and 100") + if "-" in lvd.name: + raise KickstartValueError, formatErrorMsg(self.lineno, msg="The '-' character must not be used in logical volume names.") + request = partRequests.LogicalVolumeRequestSpec(filesystem, format = lvd.format, mountpoint = lvd.mountpoint, @@ -605,6 +608,9 @@ if vgd.pesize not in lvm.getPossiblePhysicalExtents(floor=1024): raise KickstartValueError, formatErrorMsg(self.lineno, msg="Volume group specified invalid pesize") + if "-" in vgd.vgname: + raise KickstartValueError, formatErrorMsg(self.lineno, msg="The '-' character must not be used in volume group names.") + # get a sort of hackish id uniqueID = self.handler.ksID self.handler.ksVGMapping[vgd.vgname] = uniqueID SECOND OPTION: --- ../FC-D/kickstart.py 2007-03-08 19:43:45.000000000 +0100 +++ kickstart.py 2007-03-16 19:07:40.000000000 +0100 @@ -257,6 +257,11 @@ elif (lvd.percent <= 0 or lvd.percent > 100) and not lvd.preexist: raise KickstartValueError, formatErrorMsg(self.lineno, msg="Percentage must be between 0 and 100") + if "-" in lvd.name: + #We can also change it and not fail. + lvd.name.replace("-","t") + + request = partRequests.LogicalVolumeRequestSpec(filesystem, format = lvd.format, mountpoint = lvd.mountpoint, @@ -610,6 +615,10 @@ self.handler.ksVGMapping[vgd.vgname] = uniqueID self.handler.ksID += 1 + if "-" in vgd.vgname: + #We can also change it and not fail. + vgd.vgname.replace("-","t") + request = partRequests.VolumeGroupRequestSpec(vgname = vgd.vgname, physvols = pvs, preexist = vgd.preexist, This is great, except I have LV names already that have -'s in them. Right now what I have to do is hand-edit the fstab file after installation to make them show up in the right place. I'd prefer not to have to do that. I had misunderstood the exact situation. The mishandling of the LVM names happens not only with new kickstart names but also can happen with inside the partition gui with preexisting lvm structures. With this in mind I propose another patch that informs the user instead of spitting out an ugly trace back. The problem is not fixed but anaconda does not die if this situation presents itself. FYI Im working on FC7. The diff is attached. Created attachment 151023 [details]
partitions.py diff
It doesn't solve the proble but it avoids an ugly trace back when the
situation presents itself.
Created attachment 151045 [details]
patch trying to solve issue with "-" in lvm names
It worked for all my test cases. I tried to install using kickstart, there
seemed to be no problem. I tried with kickstart and the installation ended
smoothly as well. I tested for logical volumes and volume groups that had ht
"-" character in there names.
*** Bug 250409 has been marked as a duplicate of this bug. *** On a related note: the lv-config GUI in anaconda does not allow - in the name, system-config-lvm and lvcreate do. All of these should match so that this isn't a problem later. We have somebody who creates a standard naming scheme for our servers based on what he sets up with lvcreate... then we can't conform to that naming scheme using anaconda's lvm configurator. *** Bug 407701 has been marked as a duplicate of this bug. *** |