some unittests are broken due to difference in container position

Bug #1359982 reported by Valeriy Ponomaryov
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack Shared File Systems Service (Manila)
Fix Released
High
Valeriy Ponomaryov

Bug Description

2014-08-21 18:52:53.203 | FAIL: manila.tests.api.middleware.test_faults.FaultsXMLSerializationTestV11.test_413_fault
2014-08-21 18:52:53.203 | tags: worker-4
2014-08-21 18:52:53.203 | ----------------------------------------------------------------------
2014-08-21 18:52:53.204 | Empty attachments:
2014-08-21 18:52:53.204 | pythonlogging:''
2014-08-21 18:52:53.204 |
2014-08-21 18:52:53.204 | Traceback (most recent call last):
2014-08-21 18:52:53.204 | File "manila/tests/api/middleware/test_faults.py", line 185, in test_413_fault
2014-08-21 18:52:53.204 | self.assertEqual(expected.toxml(), actual.toxml())
2014-08-21 18:52:53.204 | File "/home/jenkins/workspace/gate-manila-python27/.tox/py27/local/lib/python2.7/site-packages/testtools/testcase.py", line 321, in assertEqual
2014-08-21 18:52:53.204 | self.assertThat(observed, matcher, message)
2014-08-21 18:52:53.204 | File "/home/jenkins/workspace/gate-manila-python27/.tox/py27/local/lib/python2.7/site-packages/testtools/testcase.py", line 406, in assertThat
2014-08-21 18:52:53.205 | raise mismatch_error
2014-08-21 18:52:53.205 | MismatchError: !=:
2014-08-21 18:52:53.205 | reference = u'<?xml version="1.0" ?><overLimit code="413" xmlns="http://docs.openstack.org/volume/api/v1"><message>sorry</message><retryAfter>4</retryAfter></overLimit>'
2014-08-21 18:52:53.205 | actual = u'<?xml version="1.0" ?><overLimit code="413" xmlns="http://docs.openstack.org/volume/api/v1"><retryAfter>4</retryAfter><message>sorry</message></overLimit>'
2014-08-21 18:52:53.205 | ======================================================================
2014-08-21 18:52:53.205 | FAIL: manila.tests.api.test_xmlutil.MiscellaneousXMLUtilTests.test_make_flat_dict
2014-08-21 18:52:53.205 | tags: worker-5
2014-08-21 18:52:53.205 | ----------------------------------------------------------------------
2014-08-21 18:52:53.205 | Empty attachments:
2014-08-21 18:52:53.205 | pythonlogging:''
2014-08-21 18:52:53.206 |
2014-08-21 18:52:53.206 | Traceback (most recent call last):
2014-08-21 18:52:53.206 | File "manila/tests/api/test_xmlutil.py", line 697, in test_make_flat_dict
2014-08-21 18:52:53.206 | self.assertEqual(result, expected_xml)
2014-08-21 18:52:53.206 | File "/home/jenkins/workspace/gate-manila-python27/.tox/py27/local/lib/python2.7/site-packages/testtools/testcase.py", line 321, in assertEqual
2014-08-21 18:52:53.206 | self.assertThat(observed, matcher, message)
2014-08-21 18:52:53.521 | File "/home/jenkins/workspace/gate-manila-python27/.tox/py27/local/lib/python2.7/site-packages/testtools/testcase.py", line 406, in ass/home/jenkins/workspace/gate-manila-python27/.tox/py27/local/lib/python2.7/site-packages/oslo/db/sqlalchemy/session.py:380: DeprecationWarning: BaseException.message has been deprecated as of Python 2.6
2014-08-21 18:52:53.521 | match = pattern.match(integrity_error.message)
2014-08-21 18:52:53.522 | /home/jenkins/workspace/gate-manila-python27/.tox/py27/local/lib/python2.7/site-packages/oslo/db/sqlalchemy/session.py:380: DeprecationWarning: BaseException.message has been deprecated as of Python 2.6
2014-08-21 18:52:53.522 | match = pattern.match(integrity_error.message)
2014-08-21 18:52:54.115 | /home/jenkins/workspace/gate-manila-python27/.tox/py27/local/lib/python2.7/site-packages/oslo/db/sqlalchemy/session.py:380: DeprecationWarning: BaseException.message has been deprecated as of Python 2.6
2014-08-21 18:52:54.115 | match = pattern.match(integrity_error.message)
2014-08-21 18:52:54.117 | /home/jenkins/workspace/gate-manila-python27/.tox/py27/local/lib/python2.7/site-packages/oslo/db/sqlalchemy/session.py:380: DeprecationWarning: BaseException.message has been deprecated as of Python 2.6
2014-08-21 18:52:54.117 | match = pattern.match(integrity_error.message)
2014-08-21 18:52:56.600 | ertThat
2014-08-21 18:52:56.600 | raise mismatch_error
2014-08-21 18:52:56.600 | MismatchError: !=:
2014-08-21 18:52:56.600 | reference = '''\
2014-08-21 18:52:56.600 | <?xml version='1.0' encoding='UTF-8'?>
2014-08-21 18:52:56.600 | <wrapper><b>bar</b><a>foo</a></wrapper>'''
2014-08-21 18:52:56.600 | actual = '''\
2014-08-21 18:52:56.600 | <?xml version='1.0' encoding='UTF-8'?>
2014-08-21 18:52:56.600 | <wrapper><a>foo</a><b>bar</b></wrapper>'''
2014-08-21 18:52:56.601 | ======================================================================
2014-08-21 18:52:56.601 | FAIL: manila.tests.test_share_glusterfs.GlusterfsShareDriverTestCase.test_allow_access_with_share_having_noaccess
2014-08-21 18:52:56.601 | tags: worker-6
2014-08-21 18:52:56.601 | ----------------------------------------------------------------------
2014-08-21 18:52:56.601 | Empty attachments:
2014-08-21 18:52:56.601 | pythonlogging:''
2014-08-21 18:52:56.601 |
2014-08-21 18:52:56.601 | Traceback (most recent call last):
2014-08-21 18:52:56.601 | File "manila/tests/test_share_glusterfs.py", line 544, in test_allow_access_with_share_having_noaccess
2014-08-21 18:52:56.601 | '/example.com(10.0.0.1),/fakename(10.0.0.1)')
2014-08-21 18:52:56.602 | File "/home/jenkins/workspace/gate-manila-python27/.tox/py27/local/lib/python2.7/site-packages/testtools/testcase.py", line 321, in assertEqual
2014-08-21 18:52:56.602 | self.assertThat(observed, matcher, message)
2014-08-21 18:52:56.602 | File "/home/jenkins/workspace/gate-manila-python27/.tox/py27/local/lib/python2.7/site-packages/testtools/testcase.py", line 406, in assertThat
2014-08-21 18:52:56.602 | raise mismatch_error
2014-08-21 18:52:56.602 | MismatchError: !=:
2014-08-21 18:52:56.602 | reference = '/fakename(10.0.0.1),/example.com(10.0.0.1)'
2014-08-21 18:52:56.602 | actual = '/example.com(10.0.0.1),/fakename(10.0.0.1)'
2014-08-21 18:52:56.602 | ======================================================================
2014-08-21 18:52:56.602 | FAIL: manila.tests.test_share_glusterfs.GlusterfsShareDriverTestCase.test_manage_access_adding_entry_cmd_fail
2014-08-21 18:52:56.602 | tags: worker-4
2014-08-21 18:52:56.602 | ----------------------------------------------------------------------
2014-08-21 18:52:56.603 | pythonlogging:'': {{{Error in gluster volume set: None}}}
2014-08-21 18:52:56.603 |
2014-08-21 18:52:56.603 | Traceback (most recent call last):
2014-08-21 18:52:56.603 | File "manila/tests/test_share_glusterfs.py", line 511, in test_manage_access_adding_entry_cmd_fail
2014-08-21 18:52:56.603 | '/example.com(10.0.0.1),/fakename(10.0.0.1|10.0.0.2)')
2014-08-21 18:52:56.603 | File "/home/jenkins/workspace/gate-manila-python27/.tox/py27/local/lib/python2.7/site-packages/testtools/testcase.py", line 321, in assertEqual
2014-08-21 18:52:56.603 | self.assertThat(observed, matcher, message)
2014-08-21 18:52:56.603 | File "/home/jenkins/workspace/gate-manila-python27/.tox/py27/local/lib/python2.7/site-packages/testtools/testcase.py", line 406, in assertThat
2014-08-21 18:52:56.604 | raise mismatch_error
2014-08-21 18:52:56.604 | MismatchError: !=:
2014-08-21 18:52:56.604 | reference = '/fakename(10.0.0.1|10.0.0.2),/example.com(10.0.0.1)'
2014-08-21 18:52:56.604 | actual = '/example.com(10.0.0.1),/fakename(10.0.0.1|10.0.0.2)'
2014-08-21 18:52:56.604 | ======================================================================
2014-08-21 18:52:56.604 | FAIL: manila.tests.test_share_glusterfs.GlusterfsShareDriverTestCase.test_manage_access_adding_entry
2014-08-21 18:52:56.604 | tags: worker-2
2014-08-21 18:52:56.604 | ----------------------------------------------------------------------
2014-08-21 18:52:56.604 | Empty attachments:
2014-08-21 18:52:56.604 | pythonlogging:''
2014-08-21 18:52:56.604 |
2014-08-21 18:52:56.604 | Traceback (most recent call last):
2014-08-21 18:52:56.605 | File "manila/tests/test_share_glusterfs.py", line 487, in test_manage_access_adding_entry
2014-08-21 18:52:56.605 | '/example.com(10.0.0.1),/fakename(10.0.0.1|10.0.0.2)')
2014-08-21 18:52:56.605 | File "/home/jenkins/workspace/gate-manila-python27/.tox/py27/local/lib/python2.7/site-packages/testtools/testcase.py", line 321, in assertEqual
2014-08-21 18:52:56.605 | self.assertThat(observed, matcher, message)
2014-08-21 18:52:56.605 | File "/home/jenkins/workspace/gate-manila-python27/.tox/py27/local/lib/python2.7/site-packages/testtools/testcase.py", line 406, in assertThat
2014-08-21 18:52:56.605 | raise mismatch_error
2014-08-21 18:52:56.605 | MismatchError: !=:
2014-08-21 18:52:56.605 | reference = '/fakename(10.0.0.1|10.0.0.2),/example.com(10.0.0.1)'
2014-08-21 18:52:56.605 | actual = '/example.com(10.0.0.1),/fakename(10.0.0.1|10.0.0.2)'

Changed in manila:
importance: Undecided → Critical
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Related fix merged to manila (master)

Reviewed: https://review.openstack.org/116192
Committed: https://git.openstack.org/cgit/stackforge/manila/commit/?id=b08146204647b3742c6ca52e3e0461ed1e244a8a
Submitter: Jenkins
Branch: master

commit b08146204647b3742c6ca52e3e0461ed1e244a8a
Author: Victor Sergeyev <email address hidden>
Date: Fri Aug 22 10:24:27 2014 +0300

    Use opportunistic migrations

    Refactored migration tests to use OpportunisticTestCase, removed
    unused code, BaseMigrationTestCase class and ``test_migrations.conf``
    file.
    Added workaround for bug 1359982 to be able to merge this patch.

    Closes-Bug: #1359888
    Related-Bug: #1359982

    Change-Id: Iade2bd2bf50880e167c5a5be8b1236c437f28702

Revision history for this message
Valeriy Ponomaryov (vponomaryov) wrote :

Temporary workaround fix is in here: https://github.com/stackforge/manila/blob/b08146204647b3742c6ca52e3e0461ed1e244a8a/tox.ini#L9

Should be removed when mentioned in bug description tests are fixed.

Reason:

New tox (>=1.7.0) sets a random python hash seed by default. This is generally good for testing because it will help keep projects working regardless of the hash seed, but Manila unittests don't currently pass with a random hash seed.

Changed in manila:
importance: Critical → High
Changed in manila:
assignee: nobody → Valeriy Ponomaryov (vponomaryov)
status: New → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to manila (master)

Reviewed: https://review.openstack.org/117206
Committed: https://git.openstack.org/cgit/stackforge/manila/commit/?id=e089a1bc6f6913aef521c2c111ca36edf34a9ece
Submitter: Jenkins
Branch: master

commit e089a1bc6f6913aef521c2c111ca36edf34a9ece
Author: Valeriy Ponomaryov <email address hidden>
Date: Wed Aug 27 07:34:45 2014 -0400

    Remove hash seed dependency for unittests

    latest tox has random hash seed enabled, that causes
    unstable unittests errors.

    Change-Id: I0e24304ca045c5347aa9fd97ee28ac3be774fa31
    Closes-Bug: #1359982

Changed in manila:
status: In Progress → Fix Committed
Changed in manila:
status: Fix Committed → Fix Released
Changed in manila:
milestone: none → juno-3
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.