Volume extend does not properly cast to int

Bug #1277233 reported by Andrew Kerr on 2014-02-06
This bug affects 2 people
Affects Status Importance Assigned to Milestone
Glenn M. Gobeli

Bug Description

In cinder/volume/manager.py:

self.driver.extend_volume(volume, new_size)

does not cast new_size to int, this can cause failures, especially when using XML API, when the new_size is being interpreted as unicode by python.

Changed in cinder:
assignee: nobody → Glenn M. Gobeli (ggobeli)

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

Changed in cinder:
status: New → In Progress

Reviewed: https://review.openstack.org/72721
Committed: https://git.openstack.org/cgit/openstack/cinder/commit/?id=26f9b33085b20a3967299a4d3b2ec871bd6a40d0
Submitter: Jenkins
Branch: master

commit 26f9b33085b20a3967299a4d3b2ec871bd6a40d0
Author: Glenn M. Gobeli <email address hidden>
Date: Tue Feb 11 13:03:13 2014 -0500

    Changes to cast variable as integer as XML API fails.

    Code change to ensure that the type of the size variable is correct
    when cinder is invoked through XML API. The extend volume code path
    differs from volume create where the flow portion verifies that the
    size variable is an integer; for extend the earliest place to cast
    the size variable is in volume_actions.py.

    Change-Id: Iaaed463f988769b8093604cd3b677b270dd2c5cd
    Closes-bug: 1277233

Changed in cinder:
status: In Progress → Fix Committed
Thierry Carrez (ttx) on 2014-03-05
Changed in cinder:
milestone: none → icehouse-3
status: Fix Committed → Fix Released
Thierry Carrez (ttx) on 2014-04-17
Changed in cinder:
milestone: icehouse-3 → 2014.1
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Duplicates of this bug

Other bug subscribers