Deleting Flavor gives Error [delete() takes exactly 2 arguments (3 given)]

Bug #924110 reported by Paul Pettigrew
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack Dashboard (Horizon)
Fix Released
High
Tihomir Trifonov

Bug Description

Having create a flavor per:
# nova-manage instance_type create m1.xxlarge 32768 16 320 0 0 0

Was displaying correctly in Dashboard, then clicking on red [Delete] button gave rise to error screen output in browser:

TypeError at /syspanel/flavors/
delete() takes exactly 2 arguments (3 given)
Request Method: POST
Request URL: https://stack.server.lan/syspanel/flavors/
Django Version: 1.3.1
Exception Type: TypeError
Exception Value:
delete() takes exactly 2 arguments (3 given)
Exception Location: /usr/src/openstack/horizon/horizon/horizon/api/nova.py in flavor_delete, line 205
Python Executable: /usr/bin/python
Python Version: 2.7.2
Python Path:
['/usr/src/openstack/horizon/openstack-dashboard/dashboard/wsgi/../..',
 '/usr/src/openstack/horizon/.horizon-venv/lib/python2.7/site-packages/distribute-0.6.19-py2.7.egg',
 '/usr/src/openstack/horizon/.horizon-venv/lib/python2.7/site-packages/pip-1.0.2-py2.7.egg',
 '/usr/src/openstack/horizon/.horizon-venv/src/python-quantumclient',
 '/usr/src/openstack/horizon/.horizon-venv/src/python-novaclient',
 '/usr/src/openstack/horizon/.horizon-venv/src/python-keystoneclient',
 '/usr/src/openstack/horizon/.horizon-venv/src/glance',
 '/usr/src/openstack/horizon/horizon',
 '/usr/src/openstack/horizon/.horizon-venv/lib/python2.7/site-packages/MySQL_python-1.2.3-py2.7-linux-x86_64.egg',
 '/usr/src/openstack/horizon/.horizon-venv/lib/python2.7/site-packages',
 '/usr/src/openstack/horizon',
 '/usr/local/lib/python2.7/dist-packages/swiftkeystone2-0.1-py2.7.egg',
 '/usr/lib/python2.7',
 '/usr/lib/python2.7/plat-linux2',
 '/usr/lib/python2.7/lib-tk',
 '/usr/lib/python2.7/lib-old',
 '/usr/lib/python2.7/lib-dynload',
 '/usr/local/lib/python2.7/dist-packages',
 '/usr/lib/python2.7/dist-packages',
 '/usr/lib/python2.7/dist-packages/PIL',
 '/usr/lib/python2.7/dist-packages/gtk-2.0',
 '/usr/lib/pymodules/python2.7',
 '/usr/src/openstack/horizon/openstack-dashboard/dashboard']
Server time: Tue, 31 Jan 2012 15:44:27 +1000

Devin Carlen (devcamcar)
Changed in horizon:
milestone: none → essex-4
importance: Undecided → High
status: New → Confirmed
tags: added: low-hanging-fruit
Changed in horizon:
assignee: nobody → Tihomir Trifonov (ttrifonov)
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to horizon (master)

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

Changed in horizon:
status: Confirmed → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to horizon (master)

Reviewed: https://review.openstack.org/3709
Committed: http://github.com/openstack/horizon/commit/32b8ab625e1c273da8bb36bffadc55d37eabb376
Submitter: Jenkins
Branch: master

commit 32b8ab625e1c273da8bb36bffadc55d37eabb376
Author: Tihomir Trifonov <email address hidden>
Date: Thu Feb 2 23:37:41 2012 +0200

    Fixes delete of a flavor in syspanel. Fixes bug 924110. novaclient API is changed - purge param is removed.
    Patch 2: removed duplicate line
    Patch 3: removed repeated test call of the same method

    Change-Id: I47a0f9c872a7e6236d9c8824c15ef776b352446d

Changed in horizon:
status: In Progress → Fix Committed
Revision history for this message
Paul Pettigrew (paul-pettigrew) wrote :

Well done, the fix works, thank you.

In doing some additional testing, I noticed that the delete is (correctly) not doing a --purge of the flavor. However, if in the Dashboard I attempt to create a flavour with the same name (after having previously created & deleted) then I get an error at the top of the browser saying "Error: The server has either erred or is incapable of performing the requested operation. (HTTP 500)".

Ideally, this would be more informative and say "m1.xxlarge was previously used, please use another name" or similar.

Cheers

Paul

Thierry Carrez (ttx)
Changed in horizon:
status: Fix Committed → Fix Released
Thierry Carrez (ttx)
Changed in horizon:
milestone: essex-4 → 2012.1
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.