Volume.resize is broken

Bug #1293423 reported by Guy Rozendorn
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
python-cinderclient
Fix Released
Undecided
Yevgen R.

Bug Description

======================================================================
ERROR: ProvisioningTestsMixin_Real.test_volume_extend
----------------------------------------------------------------------
Traceback (most recent call last):
  File "<http://jenkins02.infinidat.com/job/openstack/ws/tests/integration/test_provisioning.py",> line 77, in test_volume_extend
    cinder_volume.extend(cinder_volume, 2)
  Local variables:
    '_': []
    'infinibox_volume': <Volume box-ci16:4116>
    'self': <test_provisioning.ProvisioningTestsMixin_Real.test_volume_extend>
    'cinder_volume': <Volume: e08add3c-df7f-40da-8494-93e1524422ea>
    'get_diff': <function <lambda> at 0x34fecf8>
    'pool': <Pool box-ci16:4115>
  File "<http://jenkins02.infinidat.com/job/openstack/ws/eggs/python_cinderclient-1.0.8-py2.7.egg/cinderclient/v1/volumes.py",> line 115, in extend
    self.manager.extend(self, volume, new_size)
  Local variables:
    'volume': <Volume: e08add3c-df7f-40da-8494-93e1524422ea>
    'self': <Volume: e08add3c-df7f-40da-8494-93e1524422ea>
    'new_size': 2
TypeError: extend() takes exactly 3 arguments (4 given)

Yevgen R. (yevgen-runts)
Changed in python-cinderclient:
assignee: nobody → Yevgen R. (yevgen-runts)
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to python-cinderclient (master)

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

Changed in python-cinderclient:
status: New → In Progress
Yevgen R. (yevgen-runts)
Changed in python-cinderclient:
status: In Progress → Fix Committed
Revision history for this message
Yevgen R. (yevgen-runts) wrote :

Looking throw v1 and v2 volumes.Volume resource I noticed that almost all methods have volume in signature but they ignore it and just pass self to manager. I don't understand why it is done in such way and maybe we should remove volume parameter from Volumes resource methods?

Also update_readonly_flag method has the same problem as I fixed with extend. Should it be fixed in scope of this fix too?
Unit tests do not cover Volume resource methods, they just instantiate VolumeManager and work with it.

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

Reviewed: https://review.openstack.org/80944
Committed: https://git.openstack.org/cgit/openstack/python-cinderclient/commit/?id=d3236f568ecac1c038770ec04abd6f27e8148713
Submitter: Jenkins
Branch: master

commit d3236f568ecac1c038770ec04abd6f27e8148713
Author: yrunts <email address hidden>
Date: Mon Mar 17 12:46:11 2014 +0200

    Fix Volume.extend and Volume.update_readonly_flag methods

    Correct VolumeManager method signature called from Volume.extend and
    Volume.update_readonly_flag methods for v1 and v2 api's.

    Change-Id: I2ffb49112d39ad96b91a4173526502a5201666c6
    Closes-Bug: #1293423
    Closes-Bug: #1294178

Changed in python-cinderclient:
milestone: none → 1.3.1
status: Fix Committed → Fix Released
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.