Bug 137208 - query_VGs doesn't strip whitespace, breaks duplicate VG checking
query_VGs doesn't strip whitespace, breaks duplicate VG checking
Product: Red Hat Enterprise Linux 4
Classification: Red Hat
Component: system-config-lvm (Show other bugs)
All Linux
medium Severity medium
: ---
: ---
Assigned To: Jim Parsons
Jim Parsons
Depends On:
  Show dependency treegraph
Reported: 2004-10-26 14:09 EDT by Derek Anderson
Modified: 2009-04-16 19:10 EDT (History)
1 user (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2004-11-04 11:08:53 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

  None (edit)
Description Derek Anderson 2004-10-26 14:09:59 EDT
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):

How reproducible:

Steps to Reproduce:
Actual results:

Expected results:

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


could use 'name = words[0].strip()'
Comment 2 Jim Parsons 2004-10-29 17:48:26 EDT
Fixed in 0.9.4-1.0
Comment 3 Derek Anderson 2004-11-04 11:08:53 EST
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.