Objects: obj_reset_changes signature doesn't match

Bug #1487522 reported by Andrew Laski
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack Compute (nova)
Fix Released
Undecided
Andrew Laski
Kilo
Fix Released
Undecided
Unassigned

Bug Description

If an object contains a Flavor object within it and obj_reset_changes is called with recursive=True it will fail with the following error. This is because Flavor.obj_reset_changes is missing the recursive param in it's signature. The Instance object is also missing this parameter in its method.

Captured traceback:
~~~~~~~~~~~~~~~~~~~
    Traceback (most recent call last):
      File "nova/tests/unit/objects/test_request_spec.py", line 284, in test_save
        req_obj.obj_reset_changes(recursive=True)
      File "nova/objects/base.py", line 224, in obj_reset_changes
        value.obj_reset_changes(recursive=True)
    TypeError: obj_reset_changes() got an unexpected keyword argument 'recursive'

Changed in nova:
assignee: nobody → Andrew Laski (alaski)
status: New → In Progress
Andrew Laski (alaski)
tags: added: kilo-backport-potential
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to nova (stable/kilo)

Fix proposed to branch: stable/kilo
Review: https://review.openstack.org/215738

Revision history for this message
Andrew Laski (alaski) wrote :
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to nova (master)

Reviewed: https://review.openstack.org/215358
Committed: https://git.openstack.org/cgit/openstack/nova/commit/?id=3043a5646fe1e1c90ca1a6e71ee84a6605e98c61
Submitter: Jenkins
Branch: master

commit 3043a5646fe1e1c90ca1a6e71ee84a6605e98c61
Author: Andrew Laski <email address hidden>
Date: Thu Aug 20 18:02:48 2015 -0400

    Update obj_reset_changes signatures to match

    The base object obj_reset_changes method has a recursive parameter that
    dives into objects within an object to reset changes. The Flavor and
    Instance objects override that method but are missing that parameter.
    The recursive parameter was not added to those objects when it was
    changed on the base object.

    Closes-bug: #1487522
    Change-Id: I7be4cfa59187fffd88413a5ba97b13ff3f93eefc

Changed in nova:
status: In Progress → Fix Committed
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to nova (stable/kilo)

Reviewed: https://review.openstack.org/215738
Committed: https://git.openstack.org/cgit/openstack/nova/commit/?id=dcde7e7beda2f270978f9a086bed7461a22903fb
Submitter: Jenkins
Branch: stable/kilo

commit dcde7e7beda2f270978f9a086bed7461a22903fb
Author: Andrew Laski <email address hidden>
Date: Thu Aug 20 18:02:48 2015 -0400

    Update obj_reset_changes signatures to match

    The base object obj_reset_changes method has a recursive parameter that
    dives into objects within an object to reset changes. The Flavor and
    Instance objects override that method but are missing that parameter.
    The recursive parameter was not added to those objects when it was
    changed on the base object.

    NOTE(alaski): The test here differs from the test on master. Object
    registration changed so the method for grabbing a list of objects to
    check is different.

    Closes-bug: #1487522
    Change-Id: I7be4cfa59187fffd88413a5ba97b13ff3f93eefc
    (cherry picked from commit 3043a5646fe1e1c90ca1a6e71ee84a6605e98c61)

tags: added: in-stable-kilo
Thierry Carrez (ttx)
Changed in nova:
milestone: none → liberty-3
status: Fix Committed → Fix Released
Thierry Carrez (ttx)
Changed in nova:
milestone: liberty-3 → 12.0.0
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.