ssync fails to replicate deletes

Bug #1421425 reported by Alistair Coles
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack Object Storage (swift)
Fix Released
Medium
Alistair Coles

Bug Description

ssync_sender will raise an exception during its update phase when replicating a delete operation.

e.g.:

Feb 12 21:34:04 localhost object-replicator: 127.0.0.1:6030/sdb3/735 EXCEPTION in replication.Sender: #012Traceback (most recent call last):#012 File "/home/swift/swift/swift/obj/ssync_sender.py", line 60, in __call__#012 self.updates()#012 File "/home/swift/swift/swift/obj/ssync_sender.py", line 238, in updates#012 self.send_delete(url_path, err.timestamp)#012 File "/home/swift/swift/swift/obj/ssync_sender.py", line 277, in send_delete#012 msg = ['DELETE ' + url_path, 'X-Timestamp: ' + timestamp]#012TypeError: cannot concatenate 'str' and 'Timestamp' objects

This is due to the method not treating its timestamp arg as a Timestamp object, but as a string, when in fact it is always passed a Timestamp

Current tests pass because they do pass a string argument.

Changed in swift:
assignee: nobody → Alistair Coles (alistair-coles)
importance: Undecided → Medium
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/155497

Changed in swift:
status: New → In Progress
description: updated
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to swift (master)

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

commit 82e5090848ecf2e5225acf1741e40c670ad3f121
Author: Alistair Coles <email address hidden>
Date: Thu Feb 12 21:30:37 2015 +0000

    Fix ssync send_delete

    The ssync_sender send_delete method treats its
    timestamp argument as a string when in fact it is
    passed a Timestamp object. As a result the method
    always raises an exception and deletes are never
    replicated.

    This patch fixes bug and adds unit and probe tests
    to verify expected behavior.

    Closes-Bug: 1421425

    Change-Id: I664fb8d5dfea7362313037a67927ea90021c3f62

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/158087

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

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

commit db29ffc98384a9f61c2d4cc48bb2faf9f5dd0478
Author: Samuel Merritt <email address hidden>
Date: Fri Feb 20 11:04:24 2015 -0800

    Make proxy_logging close the WSGI iterator

    PEP 333 says that the WSGI framework will call .close() on the
    iterator returned by a WSGI application once it's done, provided such
    a method exists. So, if our code wraps an iterator, then we have to
    call .close() on it once we're done with it. proxy_logging wasn't.

    Since WSGIContext gets it right, I looked at making proxy_logging use
    WSGIContext. However, WSGIContext is all about forcing the first chunk
    out of the iterator so that it can capture the final HTTP status and
    headers; it doesn't help if you want to look at every chunk.
    proxy_logging wants every chunk so it can count the bytes sent.

    This didn't hurt anything in Swift, but pconstantine was complaining
    in IRC that our failure to call .close() was goofing up some other
    middleware he had.

    Change-Id: Ic6ea0795ccef6cda2b5c6737697ef7d58eac9ab4

commit 4ca08cc395e686265574366497a6869e94eebcb2
Author: Alistair Coles <email address hidden>
Date: Tue Feb 17 10:27:44 2015 +0000

    Update guest VM OS recommendation in SAIO doc

    The target development platform has changed to Ubuntu 14.04 [1].
    This patch makes the suggested SAIO platform the same.

    Also, remove pointer to wiki page for other platform install
    instructions that either redirects back to this SAIO doc or
    to another wike page and then a dead link.

    [1] I0a96bcf692bb240f3ab5aab7fefd294a07735a83

    DocImpact

    Change-Id: I9f96104b5437c1f1f28f924c048ef83cf03338f4

commit 7bc09dfdea0893a49e50005b22b426ae21c11d22
Author: Arnaud JOST <email address hidden>
Date: Wed Feb 18 11:56:11 2015 +0100

    Add support of x-remove- headers for container-sync

    If the used tool to send header doesn't support empty headers (older versions
    of curl), x-remove can be used to remove metadata.
    sync-key and sync-to metadata, used by container-sync, can now be removed using
    x-remove headers.

    Change-Id: I0edb4d5425a99d20a973aa4fceaf9af6c2ddecc0

commit 949804eda4a85c3c960b0baa090e16f1aa48e95e
Author: John Dickinson <email address hidden>
Date: Mon Feb 16 14:00:24 2015 -0800

    update the getting started doc

    Change-Id: I0a96bcf692bb240f3ab5aab7fefd294a07735a83

commit dd1a05f52765a6273906b5d6ce55f81e269bad12
Author: OpenStack Proposal Bot <email address hidden>
Date: Mon Feb 16 06:30:54 2015 +0000

    Imported Translations from Transifex

    For more information about this automatic import see:
    https://wiki.openstack.org/wiki/Translations/Infrastructure

    Change-Id: I013976c6192a8bff891c9050f829ae7a1e2fec59

commit 7acc2911296f48f10165282eee6bfe8e5c817a69
Author: John Dickinson <email address hidden>
Date: Sun Feb 15 17:14:31 2015 -0800

    added swift_source to ratelimit info calls

    Change-Id: I2b4cc...

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/158370

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

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

commit db29ffc98384a9f61c2d4cc48bb2faf9f5dd0478
Author: Samuel Merritt <email address hidden>
Date: Fri Feb 20 11:04:24 2015 -0800

    Make proxy_logging close the WSGI iterator

    PEP 333 says that the WSGI framework will call .close() on the
    iterator returned by a WSGI application once it's done, provided such
    a method exists. So, if our code wraps an iterator, then we have to
    call .close() on it once we're done with it. proxy_logging wasn't.

    Since WSGIContext gets it right, I looked at making proxy_logging use
    WSGIContext. However, WSGIContext is all about forcing the first chunk
    out of the iterator so that it can capture the final HTTP status and
    headers; it doesn't help if you want to look at every chunk.
    proxy_logging wants every chunk so it can count the bytes sent.

    This didn't hurt anything in Swift, but pconstantine was complaining
    in IRC that our failure to call .close() was goofing up some other
    middleware he had.

    Change-Id: Ic6ea0795ccef6cda2b5c6737697ef7d58eac9ab4

commit 4ca08cc395e686265574366497a6869e94eebcb2
Author: Alistair Coles <email address hidden>
Date: Tue Feb 17 10:27:44 2015 +0000

    Update guest VM OS recommendation in SAIO doc

    The target development platform has changed to Ubuntu 14.04 [1].
    This patch makes the suggested SAIO platform the same.

    Also, remove pointer to wiki page for other platform install
    instructions that either redirects back to this SAIO doc or
    to another wike page and then a dead link.

    [1] I0a96bcf692bb240f3ab5aab7fefd294a07735a83

    DocImpact

    Change-Id: I9f96104b5437c1f1f28f924c048ef83cf03338f4

commit 7bc09dfdea0893a49e50005b22b426ae21c11d22
Author: Arnaud JOST <email address hidden>
Date: Wed Feb 18 11:56:11 2015 +0100

    Add support of x-remove- headers for container-sync

    If the used tool to send header doesn't support empty headers (older versions
    of curl), x-remove can be used to remove metadata.
    sync-key and sync-to metadata, used by container-sync, can now be removed using
    x-remove headers.

    Change-Id: I0edb4d5425a99d20a973aa4fceaf9af6c2ddecc0

commit 949804eda4a85c3c960b0baa090e16f1aa48e95e
Author: John Dickinson <email address hidden>
Date: Mon Feb 16 14:00:24 2015 -0800

    update the getting started doc

    Change-Id: I0a96bcf692bb240f3ab5aab7fefd294a07735a83

commit dd1a05f52765a6273906b5d6ce55f81e269bad12
Author: OpenStack Proposal Bot <email address hidden>
Date: Mon Feb 16 06:30:54 2015 +0000

    Imported Translations from Transifex

    For more information about this automatic import see:
    https://wiki.openstack.org/wiki/Translations/Infrastructure

    Change-Id: I013976c6192a8bff891c9050f829ae7a1e2fec59

commit 7acc2911296f48f10165282eee6bfe8e5c817a69
Author: John Dickinson <email address hidden>
Date: Sun Feb 15 17:14:31 2015 -0800

    added swift_source to ratelimit info calls

    Change-Id: I2...

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

Remote bug watches

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