Bug 137208

Summary: query_VGs doesn't strip whitespace, breaks duplicate VG checking
Product: Red Hat Enterprise Linux 4 Reporter: Derek Anderson <danderso>
Component: system-config-lvmAssignee: Jim Parsons <jparsons>
Status: CLOSED RAWHIDE QA Contact: Jim Parsons <jparsons>
Severity: medium Docs Contact:
Priority: medium    
Version: 4.0CC: cluster-maint
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: 2004-11-04 16:08:53 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:

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."