Object version updates are not enforced when changing an object

Bug #1491855 reported by Ryan Rossiter
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Magnum
Fix Released
Undecided
Unassigned

Bug Description

When objects are having fields updated, the versions of the objects are not being updated with them. This will cause issues when attempting to do upgrades because different versions of the code will see the same object version, and attempt to operate on something that may or may not be on the object.

We should be testing against these object changes, to assert developers need to change object versions when something that will cause upgrade problems is added to an object.

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Related fix proposed to magnum (master)

Related fix proposed to branch: master
Review: https://review.openstack.org/220539

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Related fix merged to magnum (master)

Reviewed: https://review.openstack.org/220539
Committed: https://git.openstack.org/cgit/openstack/magnum/commit/?id=645f61ddcf1f2e5eec46130d252c31c0c73e3af3
Submitter: Jenkins
Branch: master

commit 645f61ddcf1f2e5eec46130d252c31c0c73e3af3
Author: Ryan Rossiter <email address hidden>
Date: Fri Sep 4 14:10:15 2015 +0000

    Add documentation for testing objects

    Documentation for the o.vo fixture for checking object versions is being
    added in Ie21746f6c2bab447a187b0b7507acdcea3d88c14.

    This adds more documentation for how Magnum uses o.vo, and also how the
    tests work for checking the object version.

    (Related change: I586f73570dc7b65c83b216d09d11e8dba3c63b2c)

    Change-Id: Ic490671b9e529bc2aed4ae385cd73dcb78fed397
    Related-Bug: #1491855

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

Reviewed: https://review.openstack.org/217342
Committed: https://git.openstack.org/cgit/openstack/magnum/commit/?id=6b97cd8780a2728bb59f665f3e48005dd5dea473
Submitter: Jenkins
Branch: master

commit 6b97cd8780a2728bb59f665f3e48005dd5dea473
Author: Ryan Rossiter <email address hidden>
Date: Wed Aug 26 18:38:23 2015 +0000

    Add version hashes to enforce version updates

    Nova uses a map of hashes for important parts of versioned objects. It
    keeps a static mapping of previous objects, and generates a map of the
    current objects. If these differ, a test fails, enforcing that the hash
    of the object needs to be updated. Along with this, it usually means
    that the version of the object itself needs to be updated because the
    RPC contract of that object is now broken.

    oslo_versionedobjects contains a fixture for helping generate and test
    these hashes, so this fixture is used to test Magnum's object hashes.

    Change-Id: I586f73570dc7b65c83b216d09d11e8dba3c63b2c
    Closes-Bug: #1491855

Changed in magnum:
status: New → Fix Committed
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to magnum (master)

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

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

Reviewed: https://review.openstack.org/222939
Committed: https://git.openstack.org/cgit/openstack/magnum/commit/?id=f2a9ff59b57ebfb6950d2a8fa6d41cce230b92e7
Submitter: Jenkins
Branch: master

commit f2a9ff59b57ebfb6950d2a8fa6d41cce230b92e7
Author: Hongbin Lu <email address hidden>
Date: Sun Sep 13 17:55:48 2015 -0400

    Add a link versioned object document

    If the test 'test_objects' fails, it is handy to display the link
    to the versioned object document, which help contributors to
    understand the version bumping policy.

    Change-Id: I88d25281f5a1d5e28ba4e2dd813a3b4ad5ce881a
    Closes-Bug: #1491855

Adrian Otto (aotto)
Changed in magnum:
milestone: none → mitaka-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.