boto 2.25 causing unit tests to fail

Bug #1277790 reported by Joe Gordon
24
This bug affects 4 people
Affects Status Importance Assigned to Milestone
OpenStack Compute (nova)
Fix Released
Critical
Qiu Yu
Grizzly
Fix Released
Critical
Matt Riedemann
Havana
Fix Released
Critical
Gary Kotton

Bug Description

A new version of boto was released (2.25) that causes nova unit tests to fail.

http://logs.openstack.org/03/71503/1/gate/gate-nova-python27/4e66adf/console.html

FAIL: nova.tests.test_objectstore.S3APITestCase.test_unknown_bucket
tags: worker-1
----------------------------------------------------------------------
Empty attachments:
  stderr
  stdout

pythonlogging:'': {{{
INFO [nova.wsgi] S3 Objectstore listening on 127.0.0.1:59755
INFO [nova.S3 Objectstore.wsgi.server] (7108) wsgi starting up on http://127.0.0.1:59755/
INFO [nova.S3 Objectstore.wsgi.server] 127.0.0.1 "HEAD /falalala/ HTTP/1.1" status: 200 len: 115 time: 0.0005140
INFO [nova.wsgi] Stopping WSGI server.
}}}

Traceback (most recent call last):
  File "nova/tests/test_objectstore.py", line 133, in test_unknown_bucket
    bucket_name)
  File "/home/jenkins/workspace/gate-nova-python27/.tox/py27/local/lib/python2.7/site-packages/testtools/testcase.py", line 393, in assertRaises
    self.assertThat(our_callable, matcher)
  File "/home/jenkins/workspace/gate-nova-python27/.tox/py27/local/lib/python2.7/site-packages/testtools/testcase.py", line 406, in assertThat
    raise mismatch_error
MismatchError: <bound method S3Connection.get_bucket of S3Connection:127.0.0.1> returned <Bucket: falalala>

Joe Gordon (jogo)
Changed in nova:
status: New → Confirmed
importance: Undecided → Critical
Qiu Yu (unicell)
Changed in nova:
assignee: nobody → Qiu Yu (unicell)
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to nova (master)

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

Changed in nova:
status: Confirmed → In Progress
Revision history for this message
Sabari Murugesan (smurugesan) wrote :

An alternative fix could be https://review.openstack.org/#/c/72073/. Which does not tweak the existing tests but modifies the test s3 server for the right behavior.

Revision history for this message
Alan Pevec (apevec) wrote :

This also affects havana and I have proposed Sabari's less invasive fix for stable/havana: https://review.openstack.org/72085

Revision history for this message
OpenStack Infra (hudson-openstack) wrote :

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

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

Reviewed: https://review.openstack.org/72091
Committed: https://git.openstack.org/cgit/openstack/nova/commit/?id=033f3776c4bc6d0db14b1b9da7c24e207e9628ab
Submitter: Jenkins
Branch: master

commit 033f3776c4bc6d0db14b1b9da7c24e207e9628ab
Author: Qiu Yu <email address hidden>
Date: Sat Feb 8 23:32:34 2014 +0800

    Add HEAD api response for test s3 server BucketHandler

    Current nova test s3 server lacks HEAD for BucketHandler. And it becomes
    an issue for Boto after version 2.25.0 [1], which changes underlying
    implementation of get_bucket method from GET to HEAD request.

    This change fixes this gap by adding HEAD response to test s3 server.
    And also added cases for testing bucket existence per Boto document
    suggestion[2], which applies for both Boto prior to or after version
    2.25.0

    [1] http://docs.pythonboto.org/en/latest/releasenotes/v2.25.0.html
    [2] http://docs.pythonboto.org/en/latest/s3_tut.html#accessing-a-bucket

    Change-Id: If992efa40f7f36d337d1b9b1f52859aa0ae51874
    Closes-bug: #1277790

Changed in nova:
status: In Progress → Fix Committed
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to nova (stable/havana)

Reviewed: https://review.openstack.org/72133
Committed: https://git.openstack.org/cgit/openstack/nova/commit/?id=2abcc4e04c9838d1130ef18c0efd697cc8cc6918
Submitter: Jenkins
Branch: stable/havana

commit 2abcc4e04c9838d1130ef18c0efd697cc8cc6918
Author: Qiu Yu <email address hidden>
Date: Sat Feb 8 23:32:34 2014 +0800

    Add HEAD api response for test s3 server BucketHandler

    Current nova test s3 server lacks HEAD for BucketHandler. And it becomes
    an issue for Boto after version 2.25.0 [1], which changes underlying
    implementation of get_bucket method from GET to HEAD request.

    This change fixes this gap by adding HEAD response to test s3 server.
    And also added cases for testing bucket existence per Boto document
    suggestion[2], which applies for both Boto prior to or after version
    2.25.0

    [1] http://docs.pythonboto.org/en/latest/releasenotes/v2.25.0.html
    [2] http://docs.pythonboto.org/en/latest/s3_tut.html#accessing-a-bucket

    Change-Id: If992efa40f7f36d337d1b9b1f52859aa0ae51874
    Closes-bug: #1277790
    (cherry picked from commit 033f3776c4bc6d0db14b1b9da7c24e207e9628ab)

Joe Gordon (jogo)
Changed in nova:
milestone: none → icehouse-3
Matt Riedemann (mriedem)
tags: added: grizzly-backport-potential
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to nova (stable/grizzly)

Fix proposed to branch: stable/grizzly
Review: https://review.openstack.org/76020

Matt Riedemann (mriedem)
tags: removed: grizzly-backport-potential
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to nova (stable/grizzly)

Reviewed: https://review.openstack.org/76020
Committed: https://git.openstack.org/cgit/openstack/nova/commit/?id=5a789e1172c1fae6ebd90e71e1597939caca39f3
Submitter: Jenkins
Branch: stable/grizzly

commit 5a789e1172c1fae6ebd90e71e1597939caca39f3
Author: Qiu Yu <email address hidden>
Date: Sat Feb 8 23:32:34 2014 +0800

    Add HEAD api response for test s3 server BucketHandler

    Current nova test s3 server lacks HEAD for BucketHandler. And it becomes
    an issue for Boto after version 2.25.0 [1], which changes underlying
    implementation of get_bucket method from GET to HEAD request.

    This change fixes this gap by adding HEAD response to test s3 server.
    And also added cases for testing bucket existence per Boto document
    suggestion[2], which applies for both Boto prior to or after version
    2.25.0

    [1] http://docs.pythonboto.org/en/latest/releasenotes/v2.25.0.html
    [2] http://docs.pythonboto.org/en/latest/s3_tut.html#accessing-a-bucket

    Closes-bug: #1277790
    (cherry picked from commit 033f3776c4bc6d0db14b1b9da7c24e207e9628ab)
    (cherry picked from commit 2abcc4e04c9838d1130ef18c0efd697cc8cc6918)

    Change-Id: If992efa40f7f36d337d1b9b1f52859aa0ae51874

tags: added: in-stable-grizzly
Alan Pevec (apevec)
tags: removed: in-stable-grizzly
Thierry Carrez (ttx)
Changed in nova:
status: Fix Committed → Fix Released
Thierry Carrez (ttx)
Changed in nova:
milestone: icehouse-3 → 2014.1
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.