swift unit tests fail on i386 buildd

Bug #1378810 reported by James Page
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack Object Storage (swift)
Fix Released
Undecided
James Page
swift (Ubuntu)
Fix Released
High
James Page

Bug Description

======================================================================
FAIL: test_COPY_account_source_larger_than_max_file_size (test.unit.proxy.test_mem_server.TestObjectController)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/build/buildd/swift-2.2.0~rc1/test/unit/proxy/test_server.py", line 3577, in test_COPY_account_source_larger_than_max_file_size
    resp = controller.COPY(req)
  File "/usr/lib/python2.7/contextlib.py", line 24, in __exit__
    self.gen.next()
  File "/build/buildd/swift-2.2.0~rc1/test/unit/proxy/test_server.py", line 2989, in controller_context
    unused_status_list)
AssertionError: UN-USED STATUS CODES: [200, 200]
-------------------- >> begin captured stdout << ---------------------
proxy-ut ERROR: ERROR with Account server 10.0.0.2:1002/sdc re: Trying to HEAD /v1/a1:
Traceback (most recent call last):
  File "/build/buildd/swift-2.2.0~rc1/swift/proxy/controllers/base.py", line 767, in _get_source_and_node
    query_string=self.req_query_string)
  File "/build/buildd/swift-2.2.0~rc1/test/unit/__init__.py", line 765, in connect
    body = static_body or ''
OverflowError: long int too large to convert to int
proxy-ut ERROR: ERROR with Account server 10.0.0.0:1000/sda re: Trying to HEAD /v1/a1:
Traceback (most recent call last):
  File "/build/buildd/swift-2.2.0~rc1/swift/proxy/controllers/base.py", line 767, in _get_source_and_node
    query_string=self.req_query_string)
  File "/build/buildd/swift-2.2.0~rc1/test/unit/__init__.py", line 765, in connect
    body = static_body or ''
OverflowError: long int too large to convert to int
proxy-ut ERROR: ERROR with Account server 10.0.0.1:1001/sdb re: Trying to HEAD /v1/a1:
Traceback (most recent call last):
  File "/build/buildd/swift-2.2.0~rc1/swift/proxy/controllers/base.py", line 767, in _get_source_and_node
    query_string=self.req_query_string)
  File "/build/buildd/swift-2.2.0~rc1/test/unit/__init__.py", line 765, in connect
    body = static_body or ''
OverflowError: long int too large to convert to int
proxy-ut ERROR: Account HEAD returning 503 for []

--------------------- >> end captured stdout << ----------------------
    """Fail immediately, with the given message."""
>> raise self.failureException('UN-USED STATUS CODES: [200, 200]')

======================================================================
FAIL: test_COPY_account_source_larger_than_max_file_size (test.unit.proxy.test_server.TestObjectController)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/build/buildd/swift-2.2.0~rc1/test/unit/proxy/test_server.py", line 3577, in test_COPY_account_source_larger_than_max_file_size
    resp = controller.COPY(req)
  File "/usr/lib/python2.7/contextlib.py", line 24, in __exit__
    self.gen.next()
  File "/build/buildd/swift-2.2.0~rc1/test/unit/proxy/test_server.py", line 2989, in controller_context
    unused_status_list)
AssertionError: UN-USED STATUS CODES: [200, 200]
-------------------- >> begin captured stdout << ---------------------
proxy-ut ERROR: ERROR with Account server 10.0.0.2:1002/sdc re: Trying to HEAD /v1/a1:
Traceback (most recent call last):
  File "/build/buildd/swift-2.2.0~rc1/swift/proxy/controllers/base.py", line 767, in _get_source_and_node
    query_string=self.req_query_string)
  File "/build/buildd/swift-2.2.0~rc1/test/unit/__init__.py", line 765, in connect
    body = static_body or ''
OverflowError: long int too large to convert to int
proxy-ut ERROR: ERROR with Account server 10.0.0.0:1000/sda re: Trying to HEAD /v1/a1:
Traceback (most recent call last):
  File "/build/buildd/swift-2.2.0~rc1/swift/proxy/controllers/base.py", line 767, in _get_source_and_node
    query_string=self.req_query_string)
  File "/build/buildd/swift-2.2.0~rc1/test/unit/__init__.py", line 765, in connect
    body = static_body or ''
OverflowError: long int too large to convert to int
proxy-ut ERROR: ERROR with Account server 10.0.0.1:1001/sdb re: Trying to HEAD /v1/a1:
Traceback (most recent call last):
  File "/build/buildd/swift-2.2.0~rc1/swift/proxy/controllers/base.py", line 767, in _get_source_and_node
    query_string=self.req_query_string)
  File "/build/buildd/swift-2.2.0~rc1/test/unit/__init__.py", line 765, in connect
    body = static_body or ''
OverflowError: long int too large to convert to int
proxy-ut ERROR: Account HEAD returning 503 for []

Revision history for this message
James Page (james-page) wrote :

These test failure (and two others hidden in our packaging by patches) are caused by the MAX_FILE_SIZE exceeding the capacity of an int on 32 bit systems; adjusting the value of MAX_FILE_SIZE in this instance down resolves the test failures, so I've proposed a change against swift to set the MAX_FILE_SIZE based on comparison with the sys.maxsize value.

That said, I'm not sure as to whether this is just a test failure, or whether in-fact this is an issue with the maximum file size if running on a 32 bit architecture.

Changed in swift (Ubuntu):
importance: Undecided → High
Revision history for this message
John Dickinson (notmyname) wrote :

here's the output of running the unit tests on a raspberry pi. same result:

https://gist.github.com/notmyname/d1f5071a445bc2bf8f03

Changed in swift:
status: New → Confirmed
Revision history for this message
John Dickinson (notmyname) wrote :

Testing this on my raspberry pi (so, you know, exactly like a production cluster)....

I don't get any errors when uploading a 3GB file (at least until I run out of space). So I wonder if this is only because of the mocking i the unit tests.

Revision history for this message
James Page (james-page) wrote :

It probably makes more sense to work around this by reducing the MAX_FILE_SIZE just during testing if running on 32 bit systems; I'll look at reworking my patch todo that instead.

James Page (james-page)
Changed in swift:
assignee: nobody → James Page (james-page)
Changed in swift (Ubuntu):
assignee: nobody → James Page (james-page)
status: New → In Progress
Revision history for this message
James Page (james-page) wrote :
Changed in swift (Ubuntu):
status: In Progress → Fix Committed
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package swift - 2.2.0~rc1-0ubuntu3

---------------
swift (2.2.0~rc1-0ubuntu3) utopic; urgency=medium

  * Fix autopkg tests due to upstream mandatory configuration changes:
    - d/tests/swift-daemons,proxy-server.conf: Switch to using upstream
      provided sample proxy server configuration, drop test specific
      configuration.
    - d/*.conf: Set default bind_port values inline with upstream.
 -- James Page <email address hidden> Thu, 09 Oct 2014 11:51:59 +0100

Changed in swift (Ubuntu):
status: Fix Committed → Fix Released
Changed in swift:
status: Confirmed → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to swift (master)

Reviewed: https://review.openstack.org/127030
Committed: https://git.openstack.org/cgit/openstack/swift/commit/?id=bd1ec7f89ce48b7359b97e7c926cc74a43267b2a
Submitter: Jenkins
Branch: master

commit bd1ec7f89ce48b7359b97e7c926cc74a43267b2a
Author: James Page <email address hidden>
Date: Wed Oct 8 22:20:03 2014 +0100

    Adjust MAX_FILE_SIZE during test on 32 bit systems

    The default MAX_FILE_SIZE of (5 * 2 ** 30 + 2) exceeds the
    capacity of an int on 32 bit systems; adjust this default
    down to (2 ** 30 + 2) if the default exceeds the maxsize of
    an int on the platform running the tests.

    Closes-Bug: #1378810

    Change-Id: Iafa2ce90ceb2de4e968ad48580270c8c572a9c9c

Changed in swift:
status: In Progress → Fix Committed
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to swift (feature/ec)

Fix proposed to branch: feature/ec
Review: https://review.openstack.org/143310

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to swift (feature/ec)
Download full text (4.2 KiB)

Reviewed: https://review.openstack.org/143310
Committed: https://git.openstack.org/cgit/openstack/swift/commit/?id=621089e7be624db011a837b76039fce2d5998470
Submitter: Jenkins
Branch: feature/ec

commit 24330771af0b77bb1042e280af5db3c51e8b883b
Author: Thiago da Silva <email address hidden>
Date: Mon Dec 8 21:29:30 2014 -0500

    fix dlo manifest file getting versioned

    According to documentation dlo manifest files should not
    be versioned. This patch fixes this issue and adds
    some unit and functional for this scenario.

    Change-Id: Ib5b29a19e1d577026deb50fc9d26064a8da81cd7
    Signed-off-by: Thiago da Silva <email address hidden>

commit 1ffe6b39534655b35b84506ef21da68803bbd11a
Author: Keshava Bharadwaj <email address hidden>
Date: Thu Dec 11 13:45:38 2014 +0530

    Adds console logging to swift-drive-audit

    This patch adds console logging ability to swift-drive-audit.
    There are cases where logging to console is necessary when drive-audit
    is done. This can be consumed for flagging errors in monitoring tools
    such as icinga.

    DocImpact
    Change-Id: Ia1e1effcbd89bd2cf6d5b8c64019f1647c736a3a

commit bfbf0d1e78ff47937adb06bce648a0b915c838d1
Author: Koert van der Veer <email address hidden>
Date: Mon Dec 15 15:56:13 2014 +0100

    Remove unneeded condition

    The CName loopkup middleware checked a hostname against the configured
    domains. This check is likely a remnant from when cname lookup only
    supported a single hostname. Now, however, the configured domain is
    actually a list of domains, so checking a single hostname will never
    match. The check isn't really needed anyway, as it has been broken since
    swift 1.10.

    Closes-Bug: #1402704
    Change-Id: If9ff345b2c7c6d88f527cae643168bc725b26f8d

commit c23a66f66d3a9bf64276607cd01ca9ab466077f1
Author: John Dickinson <email address hidden>
Date: Fri Dec 12 16:19:57 2014 -0800

    AUTHORS and CHANGELOG update for 2.2.1 release

    Change-Id: Ib5c1bb632404573a7d8b9e2bfff9c02f47ab7446

commit f48350865ec1666fd51bf161c339a90aee9ff7cd
Author: Samuel Merritt <email address hidden>
Date: Fri Dec 12 11:56:42 2014 -0800

    Add tests for metadata on 304 and 412 responses

    Commit 1f67eb74 added support for If-[None-]Match on DLOs and SLOs. It
    also made the 304 and 412 responses have the Content-Type and
    X-Object-Meta-* headers from the object instead of just having the
    Etag.

    Someone showed up in IRC today looking for this behavior, and was
    happy to learn it's in newer Swift versions than the one they were
    running. If we've got clients depending on this, we should have some
    unit tests to make sure we don't accidentally take it out again.

    Change-Id: If06149d13140148463004d426cb7ba4c5601404a

commit b0f9575be3a2ee0ecdcc5148606391e7cc042b5a
Author: Nicolas Trangez <email address hidden>
Date: Wed Nov 26 10:02:30 2014 +0100

    Splice: Use `operator.or_` instead of a lambda-expression

    Suggested by Samuel Merritt in https://review.openstack.org/#/c/135319/

    Change-Id: I5b86f25b42ffa6d4f9626dc6eb207ae0425933a8

commit 2a0a8ae00f2d3b7db255b0905b063e930f824f3d
Author: Ni...

Read more...

Thierry Carrez (ttx)
Changed in swift:
milestone: none → 2.2.2
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.