lvm_mirrors in volume_migration should be converted to int

Bug #1258133 reported by Flavio Percoco on 2013-12-05
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Cinder
Medium
Flavio Percoco
Havana
Undecided
Unassigned

Bug Description

The lvm driver parses the host's location info and extracts the number of mirrors from there. In this process, it doesn't convert the lvm_mirros to int, which makes it fail further in the process due to some boolean checks done on that value.

http://git.openstack.org/cgit/openstack/cinder/tree/cinder/volume/drivers/lvm.py#n693

https://git.openstack.org/cgit/openstack/cinder/tree/cinder/brick/local_dev/lvm.py#n358

description: updated
Changed in cinder:
assignee: nobody → Flavio Percoco (flaper87)

Fix proposed to branch: master
Review: https://review.openstack.org/60265

Changed in cinder:
status: New → In Progress

Reviewed: https://review.openstack.org/60265
Committed: http://github.com/openstack/cinder/commit/1dff30492f0ce1df3ef01ccc21353248a7207709
Submitter: Jenkins
Branch: master

commit 1dff30492f0ce1df3ef01ccc21353248a7207709
Author: Flavio Percoco <email address hidden>
Date: Thu Dec 5 16:14:39 2013 +0100

    Convert lvm_mirrors to int

    When the location_info is parsed and `lvm_mirrors` extracted, it is not
    being converted to int. This causes some boolean checks to return True
    even when there are not mirrors enabled because of the u'0'.

    Closes-bug: #1258133
    Change-Id: I67c463d9f139fe326bbcab4d193c45459129b514

Changed in cinder:
status: In Progress → Fix Committed
Eric Harney (eharney) on 2013-12-09
Changed in cinder:
importance: Undecided → Medium

Reviewed: https://review.openstack.org/60957
Committed: https://git.openstack.org/cgit/openstack/cinder/commit/?id=a61b9678f1abdd14964581cd49e7a25a7635749e
Submitter: Jenkins
Branch: stable/havana

commit a61b9678f1abdd14964581cd49e7a25a7635749e
Author: Flavio Percoco <email address hidden>
Date: Thu Dec 5 16:14:39 2013 +0100

    Convert lvm_mirrors to int

    When the location_info is parsed and `lvm_mirrors` extracted, it is not
    being converted to int. This causes some boolean checks to return True
    even when there are not mirrors enabled because of the u'0'.

    Closes-bug: #1258133
    (cherry picked from commit 1dff30492f0ce1df3ef01ccc21353248a7207709)

    Change-Id: I67c463d9f139fe326bbcab4d193c45459129b514

tags: added: in-stable-havana
Thierry Carrez (ttx) on 2014-01-22
Changed in cinder:
milestone: none → icehouse-2
status: Fix Committed → Fix Released
Thierry Carrez (ttx) on 2014-04-17
Changed in cinder:
milestone: icehouse-2 → 2014.1
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers