Bug 137208 - query_VGs doesn't strip whitespace, breaks duplicate VG checking
Summary: query_VGs doesn't strip whitespace, breaks duplicate VG checking
Keywords:
Status: CLOSED RAWHIDE
Alias: None
Product: Red Hat Enterprise Linux 4
Classification: Red Hat
Component: system-config-lvm
Version: 4.0
Hardware: All
OS: Linux
medium
medium
Target Milestone: ---
: ---
Assignee: Jim Parsons
QA Contact: Jim Parsons
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2004-10-26 18:09 UTC by Derek Anderson
Modified: 2009-04-16 23:10 UTC (History)
1 user (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2004-11-04 16:08:53 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)

Description Derek Anderson 2004-10-26 18:09:59 UTC
Description of problem:
I noticed there is code for checking duplicate VG naming and that it
was not catching duplicate names.  Did a little debugging on this:

ok_new_vg() calls query_VGs() to get the existing Volume Groups. 
query_VGs() gets output in this format:

"  VG1,1,0,0,wz--n,135.66,135.66"

splits on commas and puts words 0, 4, and 5 in a structure.  Back in
ok_new_vg it's then comparing "VG1" to "  VG1" and not matching. 
Stripping whitespace in query_VGs should remedy this.

Version-Release number of selected component (if applicable):
system-config-lvm-0.9.1-2.5

How reproducible:


Steps to Reproduce:
1.
2.
3.
  
Actual results:


Expected results:


Additional info:

Comment 1 Derek Anderson 2004-10-26 19:47:05 UTC
Looks like the same thing exists in the following procedures with
potential for other problems:

query_PEs()
get_free_space_on_VG()

could use 'name = words[0].strip()'

Comment 2 Jim Parsons 2004-10-29 21:48:26 UTC
Fixed in 0.9.4-1.0

Comment 3 Derek Anderson 2004-11-04 16:08:53 UTC
Verified in system-config-lvm-0.9.6-1.0:

"A Logical Volume with the name HOMER already exists in this Volume
Group. Please choose a unique name."


Note You need to log in before you can comment on or make changes to this bug.