get_all_physical_volumes() returns incorrect results when pvs output contains extra ':' characters

Bug #1414076 reported by Joe D'Andrea
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Cinder
Fix Released
High
Joe D'Andrea
Juno
Won't Fix
Undecided
Unassigned

Bug Description

get_all_physical_volumes() runs:

pvs --noheadings --unit=g -o vg_name,name,size,free --separator : --nosuffix

This can produce a variable number of fields if the 'name' incorporates ':', as in the following:

cinder-volumes-array-lun-0:/dev/disk/by-path/ip-10.8.77.11:3260-iscsi-iqn.1984-05.com.dell:powervault.md3600i.6f01faf000eb1b540000000053c487b0-lun-0:931.01:931.01

This use of ":" is not through any customization, but appears to be default behavior elsewhere in linux.

Note: This is already being addressed by https://review.openstack.org/#/c/148002/ - filing a bug to support backporting upon approval.

Revision history for this message
Joe D'Andrea (jdandrea) wrote :

Already have a patch in review.

Changed in cinder:
assignee: nobody → Joe D'Andrea (joedandrea)
status: New → In Progress
Revision history for this message
Mike Perez (thingee) wrote :
Changed in cinder:
milestone: none → kilo-2
importance: Undecided → High
Revision history for this message
Joe D'Andrea (jdandrea) wrote :

Thanks, Mike. This is my first patch as well. (No pressure *grin*.) I'm making adjustments to tests right now and ensuring everything passes. I'll cross-link the patch to this bug on my next commit/amend.

Revision history for this message
Joe D'Andrea (jdandrea) wrote :

Mike: The patch looks good. One more comment I'm awaiting a response to. Other than that I think it just needs more verification besides Jenkins.

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to cinder (master)

Reviewed: https://review.openstack.org/148002
Committed: https://git.openstack.org/cgit/openstack/cinder/commit/?id=456a6f81d8da03ef852575e1e6053dae6958dd43
Submitter: Jenkins
Branch: master

commit 456a6f81d8da03ef852575e1e6053dae6958dd43
Author: Joe D'Andrea <email address hidden>
Date: Fri Jan 16 21:26:09 2015 +0000

    Changed pvs separator from ':' to '|' to support names with ':'.

    get_all_physical_volumes() runs:

    pvs --noheadings --unit=g -o vg_name,name,size,free
        --separator : --nosuffix

    Which can produce a variable number of fields if the 'name'
    incorporates ':', as in the following:

    cinder-volumes-array-lun-0:/dev/disk/by-path/ip-10.8.77.11:3260-
        iscsi-iqn.1984-05.com.dell:powervault.md3600i.6f01faf000eb1b
        540000000053c487b0-lun-0:931.01:931.01

    Change-Id: Ia5442af2a06a004ff1af58ce08b816506b369f22
    Closes-Bug: 1414076

Changed in cinder:
status: In Progress → Fix Committed
Thierry Carrez (ttx)
Changed in cinder:
status: Fix Committed → Fix Released
Thierry Carrez (ttx)
Changed in cinder:
milestone: kilo-2 → 2015.1.0
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.