S3 upload of empty files fails

Bug #1696800 reported by Lienhart Woitok on 2017-06-08
32
This bug affects 6 people
Affects Status Importance Assigned to Milestone
python-s3transfer (Ubuntu)
Undecided
Kamal Mostafa
Xenial
Undecided
Kamal Mostafa
Yakkety
Undecided
Kamal Mostafa
Zesty
Undecided
Kamal Mostafa
Artful
Undecided
Kamal Mostafa

Bug Description

Trying to use awscli to upload files to S3 fails on empty files. The developers of awscli claim that this is a bug in ubuntus packaging, therefore I'm reporting it here since noone seems to have done before.

Details can be found in the following github issue:
https://github.com/aws/aws-cli/issues/2403

I'm currently affected by this bug and can test a new version, but I can not give any more insights into the issue or what needs to be done.

Thanks Lienhart for the report, I must admit I don't know the backgrounds what might have happened here in regard to the packaging that was referred to in the discussions of the issue you linked.

Subscribing Kamal as he worked on the packaging to get his expertise on this.

Changed in awscli (Ubuntu):
status: New → Confirmed
importance: Undecided → High
assignee: nobody → Kamal Mostafa (kamalmostafa)
Changed in awscli (Ubuntu Xenial):
status: New → Confirmed
Changed in awscli (Ubuntu Zesty):
status: New → Confirmed
Changed in awscli (Ubuntu Yakkety):
status: New → Confirmed
Changed in awscli (Ubuntu Xenial):
assignee: nobody → Kamal Mostafa (kamalmostafa)
Changed in awscli (Ubuntu Yakkety):
assignee: nobody → Kamal Mostafa (kamalmostafa)
Changed in awscli (Ubuntu Zesty):
assignee: nobody → Kamal Mostafa (kamalmostafa)
importance: Undecided → High
Changed in awscli (Ubuntu Yakkety):
importance: Undecided → High
Changed in awscli (Ubuntu Xenial):
importance: Undecided → High
Kamal Mostafa (kamalmostafa) wrote :

This regression occurs in Xenial/Yakkety (1.11.13-1ubuntu1~16.*.0) and also in Zesty/Artful (1.11.44-1):

$ aws --version
aws-cli/1.11.44 Python/3.5.3 Linux/4.10.0-19-generic botocore/1.5.7

$ touch emptyfile

$ aws s3 cp emptyfile s3://kamal-test-1
upload failed: ./emptyfile to s3://kamal-test-1/emptyfile seek() takes 2 positional arguments but 3 were given

Kamal Mostafa (kamalmostafa) wrote :

The failure appears to be due to the incomplete implementation of seek() -- missing the optional 'whence' argument -- in python-s3transfer's ReadFileChunk method.

The attached patch to python-s3transfer fixes it in my testing. Before submitting the patch to the Ubuntu and upstream, I'd like an additional verification that it resolves the problem. Here's a PPA for Xenial which provides python-s3tranfer with the patch applied:

https://launchpad.net/~kamalmostafa/+archive/ubuntu/lp1696800

Please confirm that this PPA (installed along with the stock Ubuntu awscli package) fixes the problem for you.

tags: added: patch

Hello Kamal,

I can confirm that your proposed fix actually fixes the issue.

Thank you for your fast response.

Regards,
Lienhart

no longer affects: awscli (Ubuntu)
no longer affects: awscli (Ubuntu Xenial)
no longer affects: awscli (Ubuntu Yakkety)
no longer affects: awscli (Ubuntu Zesty)
no longer affects: awscli (Ubuntu Artful)
Changed in python-s3transfer (Ubuntu Xenial):
status: New → Confirmed
Changed in python-s3transfer (Ubuntu Yakkety):
status: New → Confirmed
Changed in python-s3transfer (Ubuntu Zesty):
status: New → Confirmed
Changed in python-s3transfer (Ubuntu Artful):
status: New → Confirmed
Changed in python-s3transfer (Ubuntu Xenial):
assignee: nobody → Kamal Mostafa (kamalmostafa)
Changed in python-s3transfer (Ubuntu Yakkety):
assignee: nobody → Kamal Mostafa (kamalmostafa)
Changed in python-s3transfer (Ubuntu Zesty):
assignee: nobody → Kamal Mostafa (kamalmostafa)
Changed in python-s3transfer (Ubuntu Artful):
assignee: nobody → Kamal Mostafa (kamalmostafa)
Kamal Mostafa (kamalmostafa) wrote :

This is still hanging on the GH review since ~a month.
@Kamal are you still driving this actively or just waiting on upstream in this case?

Kamal Mostafa (kamalmostafa) wrote :

@Christian, indeed I'm also just waiting on upstream. I've just added another comment to the github PR to ping the maintainer, kyleknap.

Peter C Baughman (pbaughman) wrote :
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers