swift client psudeo-folder upload syntax for segmented objects uses wrong path

Bug #1532981 reported by clayg
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
python-swiftclient
Fix Released
Undecided
James Nzomo

Bug Description

when you create a segmented object with a pseudo-folder syntax the _segment "container" is placed into the same container as the manifest?

swift upload test/crazy swift.tar.gz -S 1M --use-slo

results in *only* a container "test" and all the segments of the object are uploaded into the test container with a common prefix of crazy_segments/.

I'm don't believe this is intentional. It's definitely not documented to have this behavior.

I could imagine a usecase with container-tempurl-keys that want the segments in the same container as the manifest, but it'd probably be better to support that through the use of the --segment-container object (maybe expanding it to include a psudeo folder itself? actually `swift upload nuts swift.tar.gz -S 1M --use-slo --segment-container=nuts/segments` already works)

James Nzomo (moje)
Changed in python-swiftclient:
assignee: nobody → James Nzomo (moje)
James Nzomo (moje)
Changed in python-swiftclient:
status: New → In Progress
Revision history for this message
James Nzomo (moje) wrote :

So currently, segmented object uploads done when <container> arg = `container/pseudo-folder` results in "_segments" string being appended to the full pseudo path instead of the container_name only for the default segments container. (`container-name`_segments)

IMHO the right fix would be to split the container name and pseudo-folder, from <container> and prepend the latter to the SwiftObject's object_name...essentially redoing https://review.openstack.org/#/c/263259 the right way.

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to python-swiftclient (master)

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

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

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

commit 5ed02345d36acf87fc4678e587db713004696124
Author: James Nzomo <email address hidden>
Date: Sun Jan 24 02:43:07 2016 +0300

    Fix segmented upload to pseudo-dir via <container>

    This fix ensures creation and use of the correct default segment
    container when pseudo-folder paths are passed via <container> arg.

    Change-Id: I90356b041dc9dfbd55eb341271975621759476b9
    Closes-Bug: 1532981
    Related-Bug: 1478210

Changed in python-swiftclient:
status: In Progress → Fix Released
Revision history for this message
Doug Hellmann (doug-hellmann) wrote : Fix included in openstack/python-swiftclient 3.0.0

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

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

This issue was fixed in the openstack/python-swiftclient 3.0.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.