QosPolicyDbObjectTestCase.test_update_objects failed because it couldn't find a matching object

Bug #1694753 reported by Ihar Hrachyshka
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
neutron
Fix Released
Undecided
Ihar Hrachyshka

Bug Description

2017-05-31 15:22:20.901842 | FAIL: neutron.tests.unit.objects.qos.test_policy.QosPolicyDbObjectTestCase.test_update_objects
2017-05-31 15:22:20.901856 | tags: worker-4
2017-05-31 15:22:20.901894 | ----------------------------------------------------------------------
2017-05-31 15:22:20.901912 | Traceback (most recent call last):
2017-05-31 15:22:20.901946 | File "neutron/tests/base.py", line 115, in func
2017-05-31 15:22:20.901964 | return f(self, *args, **kwargs)
2017-05-31 15:22:20.901992 | File "neutron/tests/unit/objects/test_base.py", line 1747, in test_update_objects
2017-05-31 15:22:20.902013 | self.assertEqual(1, len(new_objs))
2017-05-31 15:22:20.902066 | File "/home/jenkins/workspace/neutron-coverage-ubuntu-xenial/.tox/cover/local/lib/python2.7/site-packages/testtools/testcase.py", line 411, in assertEqual
2017-05-31 15:22:20.902093 | self.assertThat(observed, matcher, message)
2017-05-31 15:22:20.902139 | File "/home/jenkins/workspace/neutron-coverage-ubuntu-xenial/.tox/cover/local/lib/python2.7/site-packages/testtools/testcase.py", line 498, in assertThat
2017-05-31 15:22:20.902155 | raise mismatch_error
2017-05-31 15:22:20.902175 | testtools.matchers._impl.MismatchError: 1 != 0

http://logs.openstack.org/31/469231/2/check/neutron-coverage-ubuntu-xenial/98cd310/console.html

Of all filters used to match the object that could change in flight is revision_number. Others cannot change between updates and fetches.

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

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

Changed in neutron:
assignee: nobody → Ihar Hrachyshka (ihar-hrachyshka)
status: New → In Progress
Changed in neutron:
assignee: Ihar Hrachyshka (ihar-hrachyshka) → Brian Haley (brian-haley)
Changed in neutron:
assignee: Brian Haley (brian-haley) → Ihar Hrachyshka (ihar-hrachyshka)
Changed in neutron:
assignee: Ihar Hrachyshka (ihar-hrachyshka) → Akihiro Motoki (amotoki)
Changed in neutron:
assignee: Akihiro Motoki (amotoki) → Ihar Hrachyshka (ihar-hrachyshka)
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to neutron (master)

Reviewed: https://review.openstack.org/469602
Committed: https://git.openstack.org/cgit/openstack/neutron/commit/?id=9b809fcc60d7e09b4f79fad0b992d0f27d2a100f
Submitter: Jenkins
Branch: master

commit 9b809fcc60d7e09b4f79fad0b992d0f27d2a100f
Author: Ihar Hrachyshka <email address hidden>
Date: Wed May 31 10:15:16 2017 -0700

    objects: exclude revision_number from updatable fields

    Revision service plugin is the entity that updates the database model
    attribute, and we don't allow to modify the attribute on API layer. We
    should not allow to explicitly update it on OVO layer either.

    This can help with spurious unit test failures that sometimes try to
    update revision number and then reuse the same number to fetch the
    object. If revision service plugin decides to bump the number during the
    test case execution once more, using the old number may yield no
    results.

    Change-Id: I4666c672223ac38508738b739207f754847c62bc
    Closes-Bug: #1694753

Changed in neutron:
status: In Progress → Fix Released
tags: added: neutron-proactive-backport-potential
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/neutron 11.0.0.0b3

This issue was fixed in the openstack/neutron 11.0.0.0b3 development milestone.

tags: removed: neutron-proactive-backport-potential
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to neutron (stable/ocata)

Fix proposed to branch: stable/ocata
Review: https://review.openstack.org/490941

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to neutron (stable/newton)

Fix proposed to branch: stable/newton
Review: https://review.openstack.org/490942

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to neutron (stable/ocata)

Reviewed: https://review.openstack.org/490941
Committed: https://git.openstack.org/cgit/openstack/neutron/commit/?id=2272a00f77b73fd419b85cc15727fec283938f56
Submitter: Jenkins
Branch: stable/ocata

commit 2272a00f77b73fd419b85cc15727fec283938f56
Author: Ihar Hrachyshka <email address hidden>
Date: Wed May 31 10:15:16 2017 -0700

    objects: exclude revision_number from updatable fields

    Revision service plugin is the entity that updates the database model
    attribute, and we don't allow to modify the attribute on API layer. We
    should not allow to explicitly update it on OVO layer either.

    This can help with spurious unit test failures that sometimes try to
    update revision number and then reuse the same number to fetch the
    object. If revision service plugin decides to bump the number during the
    test case execution once more, using the old number may yield no
    results.

    Conflicts:
     neutron/objects/extensions/standardattributes.py

    Closes-Bug: #1694753
    Change-Id: I4666c672223ac38508738b739207f754847c62bc
    (cherry picked from commit 9b809fcc60d7e09b4f79fad0b992d0f27d2a100f)

tags: added: in-stable-ocata
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to neutron (stable/newton)

Reviewed: https://review.openstack.org/490942
Committed: https://git.openstack.org/cgit/openstack/neutron/commit/?id=76b4df2622e95c38b477371e27747ac2f6770c63
Submitter: Jenkins
Branch: stable/newton

commit 76b4df2622e95c38b477371e27747ac2f6770c63
Author: Ihar Hrachyshka <email address hidden>
Date: Wed May 31 10:15:16 2017 -0700

    objects: exclude revision_number from updatable fields

    Revision service plugin is the entity that updates the database model
    attribute, and we don't allow to modify the attribute on API layer. We
    should not allow to explicitly update it on OVO layer either.

    This can help with spurious unit test failures that sometimes try to
    update revision number and then reuse the same number to fetch the
    object. If revision service plugin decides to bump the number during the
    test case execution once more, using the old number may yield no
    results.

    Conflicts:
     neutron/objects/extensions/standardattributes.py

    Closes-Bug: #1694753
    Change-Id: I4666c672223ac38508738b739207f754847c62bc
    (cherry picked from commit 9b809fcc60d7e09b4f79fad0b992d0f27d2a100f)
    (cherry picked from commit 2272a00f77b73fd419b85cc15727fec283938f56)

tags: added: in-stable-newton
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/neutron 9.4.1

This issue was fixed in the openstack/neutron 9.4.1 release.

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/neutron 10.0.3

This issue was fixed in the openstack/neutron 10.0.3 release.

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.