OpenStack Compute (Nova)

"nova actions" fails with HTTP 400 / TypeError if a server action has been performed

Reported by Ewan Mellor on 2011-11-28
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack Compute (nova)
Medium
Ewan Mellor
Diablo
Undecided
Unassigned

Bug Description

"nova actions 1" (where credentials are set and 1 is a valid server ID) with an HTTP 400 error and TypeError: 'dict' object is not callable in the nova-api logs, iff there has been a previous call to the /servers/%s/action handler (such as "nova reboot 1").

The problem is that Controller.action sets self.actions to a dictionary, which overwrites the definition of the Controller.actions method.

Ewan Mellor (ewanmellor) on 2011-11-28
Changed in nova:
status: New → In Progress
assignee: nobody → Ewan Mellor (ewanmellor)
Brian Waldon (bcwaldon) on 2011-11-28
Changed in nova:
importance: Undecided → Medium
milestone: none → essex-2

Reviewed: https://review.openstack.org/1915
Committed: http://github.com/openstack/nova/commit/4a76167e354eed4aa98232fbf6c845f86ce4cf22
Submitter: Jenkins
Branch: master

 status fixcommitted
 done

commit 4a76167e354eed4aa98232fbf6c845f86ce4cf22
Author: Ewan Mellor <email address hidden>
Date: Sun Nov 27 23:26:49 2011 -0800

    Bug #897091: "nova actions" fails with HTTP 400 / TypeError if a server action has been performed

    Fix code in Controller.action that was overwriting the definition of the
    actions method with a dictionary. This meant that 'nova actions' would fail
    if 'nova reboot' had previously been called.

    Added two tests, one for the actions call in general, and one for this
    failure mode specifically.

    Change-Id: I695bb5c4dcfba96a5aba54125a8f3163e1a6a193

Changed in nova:
status: In Progress → Fix Committed

Reviewed: https://review.openstack.org/2187
Committed: http://github.com/openstack/nova/commit/c733462b229290210d6249e0f8fc7d2beaab9091
Submitter: Jenkins
Branch: stable/diablo

 tag in-stable-diablo
 done

commit c733462b229290210d6249e0f8fc7d2beaab9091
Author: Ewan Mellor <email address hidden>
Date: Sun Nov 27 23:26:49 2011 -0800

    Bug #897091: "nova actions" fails with HTTP 400 / TypeError if a server action has been performed

    Fix code in Controller.action that was overwriting the definition of the
    actions method with a dictionary. This meant that 'nova actions' would fail
    if 'nova reboot' had previously been called.

    Added two tests, one for the actions call in general, and one for this
    failure mode specifically.

    (cherry picked from commit 4a76167e354eed4aa98232fbf6c845f86ce4cf22)

    Change-Id: I695bb5c4dcfba96a5aba54125a8f3163e1a6a193

Thierry Carrez (ttx) on 2011-12-14
Changed in nova:
status: Fix Committed → Fix Released
Thierry Carrez (ttx) on 2012-04-05
Changed in nova:
milestone: essex-2 → 2012.1
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers