Boot resource upload failed: error: length too large
Bug #1363722 reported by
Jason Hobbs
This bug affects 1 person
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
MAAS |
Fix Released
|
Critical
|
Blake Rouse |
Bug Description
This is MAAS 1.7.0~beta2+
ubuntu@
usage: /usr/lib/
/usr/lib/
ubuntu@
-rw-r--r-- 1 ubuntu ubuntu 1.6G Aug 31 19:40 /home/ubuntu/
Related branches
lp:~blake-rouse/maas/multipart-image-upload
- Jason Hobbs (community): Approve
-
Diff: 642 lines (+422/-24)7 files modifiedsrc/maasserver/api/boot_resources.py (+105/-16)
src/maasserver/api/tests/test_boot_resources.py (+218/-3)
src/maasserver/exceptions.py (+4/-0)
src/maasserver/forms.py (+55/-5)
src/maasserver/models/largefile.py (+16/-0)
src/maasserver/models/tests/test_largefile.py (+17/-0)
src/maasserver/urls_api.py (+7/-0)
lp:~blake-rouse/maas/maascli-multipart-upload
- Jason Hobbs (community): Approve
-
Diff: 676 lines (+498/-9)11 files modifiedsrc/maascli/actions/boot_resources_create.py (+186/-0)
src/maascli/actions/tests/test_boot_resources_create.py (+207/-0)
src/maascli/api.py (+22/-1)
src/maascli/tests/test_api.py (+29/-0)
src/maascli/utils.py (+15/-0)
src/maasserver/api/boot_resources.py (+3/-1)
src/maasserver/api/boot_source_selections.py (+2/-2)
src/maasserver/api/boot_sources.py (+2/-2)
src/maasserver/api/doc.py (+5/-3)
src/maasserver/api/tests/test_doc.py (+12/-0)
src/maasserver/models/bootresourcefile.py (+15/-0)
Changed in maas: | |
status: | New → Triaged |
milestone: | none → 1.7.0 |
Changed in maas: | |
assignee: | nobody → Blake Rouse (blake-rouse) |
Changed in maas: | |
status: | Triaged → In Progress |
Changed in maas: | |
status: | In Progress → Fix Committed |
Changed in maas: | |
status: | Fix Committed → Fix Released |
To post a comment you must log in.
It's failing somewhere in encode_ multipart_ message( ) in apiclient/ multipart. py
The base64 encoded size of a 1.6GB file will be over 2GB - I wonder if this is what's causing it.
There is some code in cypthon's cStringIO with a matching error and matching size:
static int
IO_cread(PyObject *self, char **output, Py_ssize_t n) {
Py_ssize_t l;
if (!IO__opencheck (IOOOBJECT( self))) return -1; IOOOBJECT( self)-> pos >= 0); IOOOBJECT( self)-> string_ size >= 0); )self)- >string_ size - ((IOobject* )self)- >pos;
PyErr_ SetString( PyExc_OverflowE rror,
"length too large");
assert(
assert(
l = ((IOobject*
if (n < 0 || n > l) {
n = l;
if (n < 0) n=0;
}
if (n > INT_MAX) {
return -1;
}
*output= ((IOobject* )self)- >buf + ((IOobject* )self)- >pos; )self)- >pos += n;
((IOobject*
return (int)n;
}