Case test_get_index_sort_updated_at_desc failed sometimes

Bug #1272136 reported by Feilong Wang
10
This bug affects 2 people
Affects Status Importance Assigned to Milestone
Glance
Fix Released
High
Zhi Yan Liu
Havana
Fix Released
Undecided
Unassigned

Bug Description

I have seen this failure several times. And it doesn't happen always, so it seems like a race condition issue. And until, I just saw it on py27, so not sure if it's existed in py26.

2014-01-23 15:12:33.910 | FAIL: glance.tests.unit.v2.test_registry_client.TestRegistryV2Client.test_get_index_sort_updated_at_desc
2014-01-23 15:12:33.910 | ----------------------------------------------------------------------
2014-01-23 15:12:33.911 | _StringException: Traceback (most recent call last):
2014-01-23 15:12:33.911 | File "/home/jenkins/workspace/gate-glance-python27/glance/tests/unit/v2/test_registry_client.py", line 268, in test_get_index_sort_updated_at_desc
2014-01-23 15:12:33.911 | unjsonify=False)
2014-01-23 15:12:33.911 | File "/home/jenkins/workspace/gate-glance-python27/glance/tests/utils.py", line 472, in assertEqualImages
2014-01-23 15:12:33.911 | self.assertEqual(images[i]['id'], value)
2014-01-23 15:12:33.911 | File "/home/jenkins/workspace/gate-glance-python27/.tox/py27/local/lib/python2.7/site-packages/testtools/testcase.py", line 324, in assertEqual
2014-01-23 15:12:33.911 | self.assertThat(observed, matcher, message)
2014-01-23 15:12:33.911 | File "/home/jenkins/workspace/gate-glance-python27/.tox/py27/local/lib/python2.7/site-packages/testtools/testcase.py", line 414, in assertThat
2014-01-23 15:12:33.911 | raise MismatchError(matchee, matcher, mismatch, verbose)
2014-01-23 15:12:33.911 | MismatchError: !=:
2014-01-23 15:12:33.911 | reference = u'db4ddeb5-edd6-4557-b635-6ecb4e5265a0'
2014-01-23 15:12:33.912 | actual = '406c995a-70e0-4010-a6eb-9dff61a2d2a7'

http://logs.openstack.org/19/67019/2/check/gate-glance-python27/783d216/console.html

Feilong Wang (flwang)
Changed in glance:
status: New → Triaged
importance: Undecided → Low
Revision history for this message
Feilong Wang (flwang) wrote :

a similar failure

2014-01-25 02:08:14.411 | ======================================================================
2014-01-25 02:08:14.411 | FAIL: glance.tests.unit.v2.test_tasks_resource.TestTasksController.test_index_with_sort_dir
2014-01-25 02:08:14.412 | ----------------------------------------------------------------------
2014-01-25 02:08:14.412 | _StringException: Traceback (most recent call last):
2014-01-25 02:08:14.412 | File "/home/jenkins/workspace/gate-glance-python27/glance/tests/unit/v2/test_tasks_resource.py", line 225, in test_index_with_sort_dir
2014-01-25 02:08:14.412 | sorted(set([UUID1, UUID2, UUID3])))
2014-01-25 02:08:14.412 | File "/home/jenkins/workspace/gate-glance-python27/.tox/py27/local/lib/python2.7/site-packages/testtools/testcase.py", line 324, in assertEqual
2014-01-25 02:08:14.412 | self.assertThat(observed, matcher, message)
2014-01-25 02:08:14.413 | File "/home/jenkins/workspace/gate-glance-python27/.tox/py27/local/lib/python2.7/site-packages/testtools/testcase.py", line 414, in assertThat
2014-01-25 02:08:14.413 | raise MismatchError(matchee, matcher, mismatch, verbose)
2014-01-25 02:08:14.413 | MismatchError: !=:
2014-01-25 02:08:14.413 | reference = ['6bbe7cc2-eae7-4c0f-b50d-a7160b0c6a86',
2014-01-25 02:08:14.413 | '971ec09a-8067-4bc8-a91f-ae3557f1c4c7',
2014-01-25 02:08:14.413 | 'a85abd86-55b3-4d5b-b0b4-5d0a6e6042fc']
2014-01-25 02:08:14.413 | actual = ['971ec09a-8067-4bc8-a91f-ae3557f1c4c7',
2014-01-25 02:08:14.413 | 'a85abd86-55b3-4d5b-b0b4-5d0a6e6042fc',
2014-01-25 02:08:14.414 | 'c80a1a6c-bd1f-41c5-90ee-81afedb1d58d']

see http://logs.openstack.org/97/58997/12/gate/gate-glance-python27/6ae1e18/console.html.gz

Changed in glance:
importance: Low → Medium
Revision history for this message
Zhi Yan Liu (lzy-dev) wrote :

Another similar case:

2014-01-27 19:12:25.310 | ======================================================================
2014-01-27 19:12:25.311 | FAIL: glance.tests.unit.v2.test_registry_client.TestRegistryV2Client.test_get_index_sort_status_desc
2014-01-27 19:12:25.311 | ----------------------------------------------------------------------
2014-01-27 19:12:25.311 | _StringException: Traceback (most recent call last):
2014-01-27 19:12:25.311 | File "/home/jenkins/workspace/gate-glance-python27/glance/tests/unit/v2/test_registry_client.py", line 141, in test_get_index_sort_status_desc
2014-01-27 19:12:25.311 | unjsonify=False)
2014-01-27 19:12:25.312 | File "/home/jenkins/workspace/gate-glance-python27/glance/tests/utils.py", line 472, in assertEqualImages
2014-01-27 19:12:25.312 | self.assertEqual(images[i]['id'], value)
2014-01-27 19:12:25.312 | File "/home/jenkins/workspace/gate-glance-python27/.tox/py27/local/lib/python2.7/site-packages/testtools/testcase.py", line 324, in assertEqual
2014-01-27 19:12:25.312 | self.assertThat(observed, matcher, message)
2014-01-27 19:12:25.312 | File "/home/jenkins/workspace/gate-glance-python27/.tox/py27/local/lib/python2.7/site-packages/testtools/testcase.py", line 414, in assertThat
2014-01-27 19:12:25.314 | raise MismatchError(matchee, matcher, mismatch, verbose)
2014-01-27 19:12:25.314 | MismatchError: !=:
2014-01-27 19:12:25.314 | reference = u'b1510eb8-d487-4fdd-aefb-70898dbfd340'
2014-01-27 19:12:25.314 | actual = '65e995a6-4d68-4282-827c-f743c809e443'

http://logs.openstack.org/97/58997/12/gate/gate-glance-python27/616b69d/console.html#_2014-01-27_19_12_25_310

Revision history for this message
Zhi Yan Liu (lzy-dev) wrote :
Changed in glance:
importance: Medium → Critical
Zhi Yan Liu (lzy-dev)
Changed in glance:
assignee: nobody → Zhi Yan Liu (lzy-dev)
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to glance (master)

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

Changed in glance:
status: Triaged → In Progress
Thierry Carrez (ttx)
Changed in glance:
importance: Critical → High
Zhi Yan Liu (lzy-dev)
Changed in glance:
status: In Progress → Fix Committed
Revision history for this message
Zhi Yan Liu (lzy-dev) wrote :
Thierry Carrez (ttx)
Changed in glance:
milestone: none → icehouse-3
status: Fix Committed → Fix Released
Thierry Carrez (ttx)
Changed in glance:
milestone: icehouse-3 → 2014.1
Revision history for this message
Openstack Gerrit (openstack-gerrit) wrote : Fix proposed to glance (stable/havana)

Fix proposed to branch: stable/havana
Review: https://review.openstack.org/89616

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Change abandoned on glance (stable/havana)

Change abandoned by Ihar Hrachyshka (<email address hidden>) on branch: stable/havana
Review: https://review.openstack.org/89616
Reason: No one is really interested in fixing sporadic failures in havana branches.

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

Reviewed: https://review.openstack.org/89616
Committed: https://git.openstack.org/cgit/openstack/glance/commit/?id=649a6b2e4c68df9e4acf34c85133a9984437a05f
Submitter: Jenkins
Branch: stable/havana

commit 649a6b2e4c68df9e4acf34c85133a9984437a05f
Author: Zhi Yan Liu <email address hidden>
Date: Tue Jan 28 15:30:57 2014 +0800

    Provide explicit image create value in Registry v2 Client test

    Assign an explicit created_at datetime value to image db fixtures,
    it be used to fixes race condition in Registry v2 Client test cases.

    Closes-Bug: #1272136
    Change-Id: Ib9f1c7072c6ac828479c6a2e5bddd0f3ad057653
    Signed-off-by: Zhi Yan Liu <email address hidden>
    (cherry picked from commit 8143d814f2b355b1a2a7a1bd92920641e4d0fb43)

tags: added: in-stable-havana
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.