swift-recon object auditor type error

Bug #1329785 reported by Christopher Bartz
14
This bug affects 3 people
Affects Status Importance Assigned to Milestone
OpenStack Object Storage (swift)
Fix Released
Undecided
Christian Schwede

Bug Description

We upgraded swift to the current icehouse release (1.13.1-1). We use python 2.6.
When calling swift-recon --auditor, the program crashes with the error message

"TypeError: unsupported operand type(s) for +: int and generator" .

The reason lies in the fact that generator functions are stored in recon.py (lines 574-583). When I rewrite the line

stats[atime] = [(self.nested_get_value(atime, all_scan[i]))
                            for i in all_scan]

to

stats[atime] = [x for s in [(self.nested_get_value(atime, all_scan[i]))
                            for i in all_scan] for x in s]

the program runs without errors.

Revision history for this message
Christopher Bartz (bartz) wrote :
Changed in swift:
status: New → Confirmed
assignee: nobody → Christian Schwede (cschwede)
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to swift (master)

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

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

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

commit e21703ff7be95f25cb3463b3a5a96d0a5dfbe1a4
Author: Christian Schwede <email address hidden>
Date: Wed Jun 25 14:05:05 2014 +0000

    Add test for swift-recon --auditor

    Related-Bug: 1329785
    Change-Id: I47cecd8a4cd55ca75c2a51153be7bb61c27d0ea0

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Related fix proposed to swift (feature/ec)

Related fix proposed to branch: feature/ec
Review: https://review.openstack.org/105536

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

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

commit 2f45600c7db48417626ff4152ec46f8d4054a8a6
Author: YummyBian <email address hidden>
Date: Sun Jun 29 22:03:33 2014 +0800

    Document the unnecessary method invoking in FakeRing

    Add comment to explain why we invoke the get_part method even if the
    _part_shift is equal to 32.

    Closes-Bug: #1335581

    Change-Id: I160e9383b5e65f75ed5e89511cc7e63c51958a25

commit f6ff06b6782ba0682e16f2015d77ea6fb53c2d5b
Author: Christian Berendt <email address hidden>
Date: Fri May 30 00:06:44 2014 +0200

    Use except x as y instead of except x, y

    According to https://docs.python.org/3/howto/pyporting.html the
    syntax changed in Python 3.x. The new syntax is usable with
    Python >= 2.6 and should be preferred to be compatible with Python3.

    Enabled hacking check H231.

    Change-Id: I2c41dc3ec83e79181e8fd50e76771a74c393269c

commit 08006685577c0e3c85f0709945175f0c8689ae49
Author: Paul Luse <email address hidden>
Date: Wed Jul 2 14:39:42 2014 -0700

    Fix potential missing key error in container_info

    If upgrading from a non-storage policy enabled version of
    swift to a storage policy enabled version its possible that
    memcached will have an info structure that does not contain
    the 'storage_policy" key resulting in an unhandled exception
    during the lookup. The fix is to simply make sure we never
    return the dict without a storage_policy key defined; if it
    doesn't exist its safe to make it '0' as this means you're
    in the update scenario and there's xno other possibility.

    Change-Id: If8e8f66d32819c5bfb2d1308e14643f3600ea6e9

commit b823e1602e4c5cb6bcf5360b3e1f6e8410e46401
Author: Samuel Merritt <email address hidden>
Date: Wed Jul 2 11:37:26 2014 -0700

    Fix exception raising in FakeConn

    Timeout isn't an Exception, so Timeouts in tests weren't getting
    raised. Instead, you'd sometimes have an HTTPResponse's .status be a
    Timeout object, not an integer, which greatly confuses code that
    expects an integer.

    Also reorder the test that exposed the failure in the gate so it blows
    up most times instead of sometimes do demonstrate the failure with out
    this fix to FakeConn.

    Change-Id: I76367a0575f84cad6b2f03e814f3f16bf96bc7d1

commit 620ff9b6738797f20b992a027301c32cf0dee17c
Author: Clay Gerrard <email address hidden>
Date: Wed Jul 2 12:20:05 2014 -0700

    Fix order dependent test in proxy.test_server

    TestObjectController.test_POST_backend_headers was being too picky about the
    order of backend requests which when pushed through eventlet will not have a
    stable order. This change preserves the expectations and assertions while
    removing the dependency on the order of the requests.

    Change-Id: I7176ccb9223cd3dfc3c922b8b3d81eb514891d05

commit 8a3b65107d788a8590349fc4aa02e5c8c2ad9202
Author: Clay Gerrard <email address hidden>
Date: Mon Jun 30 21:49:49 2014 -0700

    Fix pop_queue for ...

Sam Morrison (sorrison)
tags: added: icehouse-backport-potential
Changed in swift:
status: In Progress → Fix Committed
Thierry Carrez (ttx)
Changed in swift:
milestone: none → 2.3.0-rc1
status: Fix Committed → Fix Released
Thierry Carrez (ttx)
Changed in swift:
milestone: 2.3.0-rc1 → 2.3.0
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Bug attachments

Remote bug watches

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