Overwriting SLO object does not remove old segments

Bug #1418007 reported by Joel Wright
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
python-swiftclient
Fix Released
Undecided
Joel Wright

Bug Description

The python-swiftclient v2.3.1 code fails to remove old segments when overwriting an SLO.

I have a fix - working on tests now.

Revision history for this message
Joel Wright (joel-wright-k) wrote :

Patch to fix this has been submitted: https://review.openstack.org/#/c/152903

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

Confirmed behavior on SAIO (with min_segment_size lower than default !)

````
 anc@u128:~/0dev/swiftclient (master)$ git log --pretty=oneline -n 1
eb28d8aff6d6b6e985e76643bee7dbf729055c82 Merge "This patch fixes downloading files to stdout."
anc@u128:~/0dev/swiftclient (master)$ swift post c1
anc@u128:~/0dev/swiftclient (master)$ swift upload c1 LICENSE --use-slo --segment-size 1000 --segment-container c1_s1
LICENSE segment 5
LICENSE segment 10
LICENSE segment 9
LICENSE segment 0
LICENSE segment 4
LICENSE segment 1
LICENSE segment 3
LICENSE segment 2
LICENSE segment 6
LICENSE segment 7
LICENSE segment 8
LICENSE
anc@u128:~/0dev/swiftclient (master)$ swift list c1_s1
LICENSE/slo/1392631040.000000/10142/1000/00000000
LICENSE/slo/1392631040.000000/10142/1000/00000001
LICENSE/slo/1392631040.000000/10142/1000/00000002
LICENSE/slo/1392631040.000000/10142/1000/00000003
LICENSE/slo/1392631040.000000/10142/1000/00000004
LICENSE/slo/1392631040.000000/10142/1000/00000005
LICENSE/slo/1392631040.000000/10142/1000/00000006
LICENSE/slo/1392631040.000000/10142/1000/00000007
LICENSE/slo/1392631040.000000/10142/1000/00000008
LICENSE/slo/1392631040.000000/10142/1000/00000009
LICENSE/slo/1392631040.000000/10142/1000/00000010
anc@u128:~/0dev/swiftclient (master)$ swift upload c1 LICENSE --use-slo --segment-size 1000 --segment-container c1_s2
LICENSE segment 8
LICENSE segment 10
LICENSE segment 5
LICENSE segment 1
LICENSE segment 2
LICENSE segment 3
LICENSE segment 7
LICENSE segment 4
LICENSE segment 0
LICENSE segment 9
LICENSE segment 6
LICENSE
anc@u128:~/0dev/swiftclient (master)$ swift list c1_s2
LICENSE/slo/1392631040.000000/10142/1000/00000000
LICENSE/slo/1392631040.000000/10142/1000/00000001
LICENSE/slo/1392631040.000000/10142/1000/00000002
LICENSE/slo/1392631040.000000/10142/1000/00000003
LICENSE/slo/1392631040.000000/10142/1000/00000004
LICENSE/slo/1392631040.000000/10142/1000/00000005
LICENSE/slo/1392631040.000000/10142/1000/00000006
LICENSE/slo/1392631040.000000/10142/1000/00000007
LICENSE/slo/1392631040.000000/10142/1000/00000008
LICENSE/slo/1392631040.000000/10142/1000/00000009
LICENSE/slo/1392631040.000000/10142/1000/00000010

c1_s1 should be empty...

 anc@u128:~/0dev/swiftclient (master)$ swift list c1_s1
LICENSE/slo/1392631040.000000/10142/1000/00000000
LICENSE/slo/1392631040.000000/10142/1000/00000001
LICENSE/slo/1392631040.000000/10142/1000/00000002
LICENSE/slo/1392631040.000000/10142/1000/00000003
LICENSE/slo/1392631040.000000/10142/1000/00000004
LICENSE/slo/1392631040.000000/10142/1000/00000005
LICENSE/slo/1392631040.000000/10142/1000/00000006
LICENSE/slo/1392631040.000000/10142/1000/00000007
LICENSE/slo/1392631040.000000/10142/1000/00000008
LICENSE/slo/1392631040.000000/10142/1000/00000009
LICENSE/slo/1392631040.000000/10142/1000/00000010
````

Changed in python-swiftclient:
status: New → Confirmed
Changed in python-swiftclient:
assignee: nobody → Joel Wright (joel-wright-k)
status: Confirmed → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to python-swiftclient (master)

Reviewed: https://review.openstack.org/152903
Committed: https://git.openstack.org/cgit/openstack/python-swiftclient/commit/?id=06c73c6020e5af873e3ce245a27035da3448de7b
Submitter: Jenkins
Branch: master

commit 06c73c6020e5af873e3ce245a27035da3448de7b
Author: Joel Wright <email address hidden>
Date: Wed Feb 4 13:50:23 2015 +0000

    Fix deleting SLO segments on overwrite

    This patch fixes a bug that results in SLO segments being left
    behind regardless of the setting of --leave-segments.

    Change-Id: I2b3c8ab4817df6facb4b5961dbe570645441a552
    Closes-Bug: 1418007

Changed in python-swiftclient:
status: In Progress → Fix Committed
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Related fix proposed to python-swiftclient (master)

Related fix proposed to branch: master
Review: https://review.openstack.org/161972

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Related fix merged to python-swiftclient (master)

Reviewed: https://review.openstack.org/153177
Committed: https://git.openstack.org/cgit/openstack/python-swiftclient/commit/?id=dcf2124d4190ec8d1b99e3e42cdafdafc92d6cf9
Submitter: Jenkins
Branch: master

commit dcf2124d4190ec8d1b99e3e42cdafdafc92d6cf9
Author: Alistair Coles <email address hidden>
Date: Thu Feb 5 10:01:15 2015 +0000

    Add tests for uploads deleting DLO segments

    This patch adds unit tests to verify that
    uploads overwriting an existing DLO manifest
    will delete any segments pointed to by the
    manifest, unless --leave-segments is specified.

    Also test the --leave-segments option with an
    existing SLO manifest.

    Related-Bug: 1418007

    Change-Id: I54e8eb138976269bb36392a811089c33c1ace4d3

Changed in python-swiftclient:
milestone: none → 2.5.0
status: Fix Committed → Fix Released
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/python-swiftclient 2.4.0

This issue was fixed in the openstack/python-swiftclient 2.4.0 release.

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.