Large object uploads should validate the -S option

Bug #1514599 reported by clayg
10
This bug affects 2 people
Affects Status Importance Assigned to Milestone
python-swiftclient
In Progress
Undecided
pei ran wu

Bug Description

swift info has all the deets on min_segment_size:

Additional middleware: slo
 Options:
  max_manifest_segments: 1000
  max_manifest_size: 2097152
  min_segment_size: 1048576

But when you try to upload a SLO with too small segments - we *first* upload all the segments - then we fail to create the manifest and return an incomplete and uninformative error (and also orphan the segments):

vagrant@saio:/vagrant/.scratch$ swift upload test testme.builder -H 'x-delete-after: 10' --use-slo -S 100000
testme.builder segment 0
testme.builder segment 1
testme.builder segment 2
testme.builder segment 6
testme.builder segment 3
testme.builder segment 4
testme.builder segment 5
testme.builder segment 7
testme.builder segment 9
testme.builder segment 10
testme.builder segment 8
testme.builder segment 11
testme.builder segment 12
testme.builder segment 13
testme.builder segment 14
testme.builder segment 15
testme.builder segment 16
testme.builder segment 19
testme.builder segment 17
testme.builder segment 20
testme.builder segment 18
testme.builder segment 21
Object PUT failed: http://saio:8080/v1/AUTH_test/test/testme.builder?multipart-manifest=put 400 Bad Request [first 60 chars of response] Index 0: too small; each segment, except the last, must be a

We should check /info before we start to upload the segments, and provide a useful error early (before uploading anything) if the inevitable manifest creation will fail.

Tim Burke (1-tim-z)
Changed in python-swiftclient:
status: New → Confirmed
pei ran wu (wupeiran)
Changed in python-swiftclient:
assignee: nobody → pei ran wu (wupeiran)
Changed in python-swiftclient:
status: Confirmed → In Progress
Revision history for this message
clayg (clay-gerrard) wrote :

Related bad stuff in lp bug #1680083 if we upload with --use-slo to a cluster that doesn't have SLO in the pipeline at all.

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.