Error syncing handoff partition : no attribute 'intersection

Bug #1503152 reported by Hugo Kou
16
This bug affects 3 people
Affects Status Importance Assigned to Milestone
OpenStack Object Storage (swift)
Fix Released
Undecided
Charles Hsu

Bug Description

While primary replicas were deleted and has tombstone in primary location. The replicator suppose to delete the handoff one.
Replicator keep tries to sync the .data to primary location and log says `Successful rsync of`.

Then and exception happens as below :

```
object-replicator: Error syncing handoff partition: #012Traceback (most recent call last):#012 File "/usr/lib/pymodules/python2.7/swift/obj/replicator.py", line 279, in update_deleted#012 delete_objs = delete_objs.intersection(cand_objs)#012AttributeError: 'list' object has no attribute 'intersection'
```

```
root@r1n1:/var/log/swift# swift-object-replicator /etc/swift/object-server/2.conf -o -p 59006 --verbose
object-replicator: Running object replicator in script mode.
object-replicator: <f+++++++++ abf/e67e56e09af4c45726e2fbf369723abf/1444105495.11209.data
object-replicator: Successful rsync of /srv/node/d4/objects/59006/abf at 192.168.3.8::object/d13/objects/59006 (0.173)
object-replicator: <f+++++++++ abf/e67e56e09af4c45726e2fbf369723abf/1444105495.11209.data
object-replicator: Successful rsync of /srv/node/d2/objects/59006/abf at 192.168.3.8::object/d13/objects/59006 (0.179)
object-replicator: <f+++++++++ abf/e67e56e09af4c45726e2fbf369723abf/1444105495.11209.data
object-replicator: Successful rsync of /srv/node/d4/objects/59006/abf at 192.168.3.7::object/d7/objects/59006 (0.179)
object-replicator: <f+++++++++ abf/e67e56e09af4c45726e2fbf369723abf/1444105495.11209.data
object-replicator: Successful rsync of /srv/node/d2/objects/59006/abf at 192.168.3.7::object/d7/objects/59006 (0.181)
object-replicator: <f+++++++++ abf/e67e56e09af4c45726e2fbf369723abf/1444105495.11209.data
object-replicator: Successful rsync of /srv/node/d4/objects/59006/abf at 192.168.3.11::object/d1/objects/59006 (0.176)
object-replicator: Error syncing handoff partition: #012Traceback (most recent call last):#012 File "/usr/lib/pymodules/python2.7/swift/obj/replicator.py", line 279, in update_deleted#012 delete_objs = delete_objs.intersection(cand_objs)#012AttributeError: 'list' object has no attribute 'intersection'
object-replicator: <f+++++++++ abf/e67e56e09af4c45726e2fbf369723abf/1444105495.11209.data
object-replicator: Successful rsync of /srv/node/d2/objects/59006/abf at 192.168.3.11::object/d1/objects/59006 (0.184)
object-replicator: Error syncing handoff partition: #012Traceback (most recent call last):#012 File "/usr/lib/pymodules/python2.7/swift/obj/replicator.py", line 279, in update_deleted#012 delete_objs = delete_objs.intersection(cand_objs)#012AttributeError: 'list' object has no attribute 'intersection'
object-replicator: 3/3 (100.00%) partitions replicated in 0.59s (5.12/sec, 0s remaining)
object-replicator: 1 suffixes checked - 0.00% hashed, 0.00% synced
object-replicator: Partition times: max 0.5739s, min 0.0291s, med 0.5559s
object-replicator: Object replication complete (once). (0.01 minutes)
object-replicator: Exited
```

Environment :

* OS : Ubuntu Trusty
* Swift version : 2.3.0.4
* 3 regions and read/write affinity enabled.
* 3 nodes run all swift workers in each region.

Revision history for this message
Charles Hsu (charles0126) wrote :
Revision history for this message
Alistair Coles (alistair-coles) wrote :

Confirmed on reported version 2.3.0 and on 2.5.0

The bug manifests when the replication job has nodes in more than one remote region.

Changed in swift:
status: New → Confirmed
Changed in swift:
assignee: nobody → Charles Hsu (charles0126)
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/231360
Committed: https://git.openstack.org/cgit/openstack/swift/commit/?id=d01cd425094c2e56e4e89dbf3eaf887815dd5b62
Submitter: Jenkins
Branch: master

commit d01cd425094c2e56e4e89dbf3eaf887815dd5b62
Author: Charles Hsu <email address hidden>
Date: Tue Oct 6 16:28:34 2015 +0800

    Fix replicator intersection exception when sync data to remote regions.

    This patch fixed the exception (AttributeError: 'list' object has no
    attribute 'intersection') when replicator try to sync data from
    handoff to primary partition in more than one remote region.

    Change-Id: I565c45dda8c99d36e24dbf1145f2d2527d593ac0
    Closes-Bug: 1503152

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

Fix proposed to branch: stable/kilo
Review: https://review.openstack.org/232696

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to swift (feature/crypto)

Fix proposed to branch: feature/crypto
Review: https://review.openstack.org/234065

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

Reviewed: https://review.openstack.org/234065
Committed: https://git.openstack.org/cgit/openstack/swift/commit/?id=c80229fd86853f5f8541aeef4b5044170572640d
Submitter: Jenkins
Branch: feature/crypto

commit 9cafa472a336f66d149a20c12f4251703d96f04d
Author: Ondřej Nový <email address hidden>
Date: Sat Oct 10 20:57:07 2015 +0200

    Autodetect systemctl in SAIO and use it on systemd distros

    Change-Id: I84a9b27baac89327749d8774032860f8ad5166f2

commit 92767f28d668643bc2affee7b2fd46fd9349656a
Author: Emile Snyder <email address hidden>
Date: Sun Oct 11 21:24:54 2015 -0700

    Fix 'swift-ring-builder write_builder' after you remove a device

    clayg already posted the code fix in the bug, but noted it needs a test.

    Closes-Bug: #1487280
    Change-Id: I07317754afac7165baac4e696f07daeba2e72adc

commit a48649002970b2150d24d0622a100f54045443c5
Author: Lisak, Peter <email address hidden>
Date: Mon Oct 12 14:42:01 2015 +0200

    swift-recon fails with socket.timeout exception

    If some server is overloaded or timeout set too low, swift-recon fails with
    raised socket.timeout exception.

    This error should be processed the same way as HTTPError/URLError.

    Change-Id: Ide8843977ab224fa866097d0f0b765d6899c66b8

commit 767fac8186ea4541f4466ac9a55c03abea6a878b
Author: Christian Schwede <email address hidden>
Date: Mon Oct 12 07:09:00 2015 +0000

    Enable H234 check (assertEquals is deprecated, use assertEqual)

    All usages of assertEquals and assertNotEquals are fixed now, so let's enable
    the H234 check to avoid regressions in the future.

    Change-Id: I2c2ccb3b268cf9eb11f2db045378ab125a02bc31

commit 1882801be1d8983cd718786bd409cf09f65a00b0
Author: janonymous <email address hidden>
Date: Mon Aug 31 21:49:49 2015 +0530

    pep8 fix: assertNotEquals -> assertNotEqual

    assertNotEquals is deprecated in py3

    Change-Id: Ib611351987bed1199fb8f73a750955a61d022d0a

commit f5f9d791b0b8b32350bd9a47fbc00ff86a65f09d
Author: janonymous <email address hidden>
Date: Wed Aug 5 23:58:14 2015 +0530

    pep8 fix: assertEquals -> assertEqual

    assertEquals is deprecated in py3, replacing it.

    Change-Id: Ida206abbb13c320095bb9e3b25a2b66cc31bfba8
    Co-Authored-By: Ondřej Nový <email address hidden>

commit 1ba7641c794104de57e5010f76cecbf146a2a63b
Author: Zack M. Davis <email address hidden>
Date: Thu Oct 8 16:16:18 2015 -0700

    minutæ: port ClientException tweaks from swiftclient; dict .pop

    openstack/python-swiftclient@5ae4b423 changed python-swiftclient's
    ClientException to have its http_status attribute default to
    None (rather than 0) and to use super in its __init__ method. For
    consistency's sake, it's nice for Swift's inlined copy of
    ClientException to receive the same patch. Also, the retry function in
    direct_client (a major user of ClientException) was using a somewhat
    awkward conditional-assignment-and-delete construction where the .pop
    method of dictionaries would be more idiomatic.

    Change-Id: I70a12f934f84f57549617af28b86f7f5637bd8fa

commit 01f9d15045129d09...

tags: added: in-feature-crypto
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to swift (stable/kilo)

Reviewed: https://review.openstack.org/232696
Committed: https://git.openstack.org/cgit/openstack/swift/commit/?id=4ab06a73be64c655cf535e2a41b0826417338ef3
Submitter: Jenkins
Branch: stable/kilo

commit 4ab06a73be64c655cf535e2a41b0826417338ef3
Author: Charles Hsu <email address hidden>
Date: Tue Oct 6 16:28:34 2015 +0800

    Fix replicator intersection exception when sync data to remote regions.

    This patch fixed the exception (AttributeError: 'list' object has no
    attribute 'intersection') when replicator try to sync data from
    handoff to primary partition in more than one remote region.

    This patch is slightly different than the original since Kilo doesn't
    use six and still must support py26.

    Also updated .coveragerc to handle the config option change

    Change-Id: I565c45dda8c99d36e24dbf1145f2d2527d593ac0
    Closes-Bug: 1503152

tags: added: in-stable-kilo
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to swift (feature/hummingbird)

Fix proposed to branch: feature/hummingbird
Review: https://review.openstack.org/236162

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

Reviewed: https://review.openstack.org/236162
Committed: https://git.openstack.org/cgit/openstack/swift/commit/?id=18ddcaf0d6b67fcbb6b0a4cf4a9a99c72f6f3a08
Submitter: Jenkins
Branch: feature/hummingbird

commit a9ddc2d9ea402eaac7ccd8992387f77855968ab5
Author: Mahati Chamarthy <email address hidden>
Date: Fri Oct 16 18:18:33 2015 +0530

    Hyperlink fix to first contribution doc

    Change-Id: I19fc1abc89f888233b80a57c68a152c1c1758640

commit 83a1151d13e096b480aefe6ec18259f2d7d021db
Author: Pete Zaitcev <email address hidden>
Date: Fri Oct 9 16:45:20 2015 -0600

    Interpolate the explanation string not whole HTML body

    The only reason this exists is that I promised to do it.
    But in our case, there's no big advantage, and here's why.

    The general thinking goes that strings must be interpolated
    first because the body may contain a syntax that confuses the
    interpolation. So this patch makes the code "more correct".
    However, our HTML template is tightly controlled. It's not
    like it contains additional percents.

    So I'll just leave this here for now while I'm asking if
    the content type is set correctly.

    Change-Id: Ia18aeb0f94ef389f8b95450986a566e5fa06aa10

commit 384b91eb824376659989b904f9396cbf2e02d2bd
Author: asettle <email address hidden>
Date: Thu Sep 3 15:11:46 2015 +1000

    Moving DLO functionality doc to the middleware code

    This change moves the RST DLO documentation from
    statically inside overview_large_objects.rst and moves it
    to middleware/dlo.py.
    This is where all middleware RST documentation is defined.

    The overview_large_objects.rst is still the main page
    for information on large objects, so now dynamically
    points to both the DLO and SLO middleware RST
    documentation and the relevant middleware.rst page
    simply points to it.

    Change-Id: I40d918c8b7bc608ab945805d69fe359521df038a
    Closes-bug: #1276852

commit 2996974e5d48b4efaa1b271b8fbd0387bced7242
Author: Ondřej Nový <email address hidden>
Date: Sat Oct 10 14:56:30 2015 +0200

    Script for running unit, func and probe tests at once

    When developing Swift it's often needed to run all tests.
    This script makes it much simpler.

    Change-Id: I67e6f7cc05ebd0475001c1b56e8f6fd09c8c644f

commit c2182fd4163050a5f76eb3dedb7703dc821fa83d
Author: janonymous <email address hidden>
Date: Fri Jul 17 20:20:15 2015 +0530

    Python3: do not use im_self/im_func/func_closure

    Use __self__, __func__ and __closure__ instead, as they work
    with both Python 2 and 3.

    Modifying usage of __func__ in codebase.

    Change-Id: I57e907c28c1d4646605e70194ea3650806730b83

commit c0866ceaac2f69ae01345a795520141f59ec64f5
Author: Samuel Merritt <email address hidden>
Date: Fri Sep 25 17:26:37 2015 -0700

    Improve SLO PUT error checking

    This commit tries to give the user a reason that their SLO manifest
    was invalid instead of just saying "Invalid SLO Manifest File". It
    doesn't get every error condition, but it's better than before.

    Examples of things that now have real error...

tags: added: in-feature-hummingbird
Revision history for this message
Doug Hellmann (doug-hellmann) wrote : Fix included in openstack/swift 2.6.0

This issue was fixed in the openstack/swift 2.6.0 release.

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to swift (stable/liberty)

Fix proposed to branch: stable/liberty
Review: https://review.openstack.org/324551

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

Reviewed: https://review.openstack.org/324551
Committed: https://git.openstack.org/cgit/openstack/swift/commit/?id=b76bf34736db38f2c2112b9fa4f55b8014332a0f
Submitter: Jenkins
Branch: stable/liberty

commit b76bf34736db38f2c2112b9fa4f55b8014332a0f
Author: Charles Hsu <email address hidden>
Date: Tue Oct 6 16:28:34 2015 +0800

    Fix replicator intersection exception when sync data to remote regions.

    This patch fixed the exception (AttributeError: 'list' object has no
    attribute 'intersection') when replicator try to sync data from
    handoff to primary partition in more than one remote region.

    Change-Id: I565c45dda8c99d36e24dbf1145f2d2527d593ac0
    Closes-Bug: 1503152

tags: added: in-stable-liberty
Changed in swift:
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.