Bug 1578083

Summary: aws s3 cp fails with: __init__() got an unexpected keyword argument 'max_bandwidth'
Product: Red Hat Enterprise Linux 7 Reporter: Andy Grimm <agrimm>
Component: python-s3transferAssignee: Oyvind Albrigtsen <oalbrigt>
Status: CLOSED ERRATA QA Contact: Brandon Perkins <bperkins>
Severity: urgent Docs Contact: Vladimír Slávik <vslavik>
Priority: urgent    
Version: 7.5CC: aherr, ajz, anrussel, cfeist, gfa, jnewbigin, jon.dufresne, karel.klic, leomar, mike, polpot78, rhbugs, rhbz, thomas.oulevey, vslavik
Target Milestone: rcKeywords: ZStream
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: python-s3transfer-0.1.13-1.el7 Doc Type: Bug Fix
Doc Text:
Previously, the "python-s3transfer" library introduced the "max_bandwidth" parameter in a new upstream version 0.1.12, and the updated "awscli" package expected this version to be available. As a consequence, using the "aws s3 cp" command with the non-updated "python-s3transfer" failed. The "aws" command has been modified to not use "max_bandwidth". As a result, the "aws s3 cp" command works again.
Story Points: ---
Clone Of:
: 1581136 1581138 (view as bug list) Environment:
Last Closed: 2018-10-30 10:12:40 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 1581136, 1581138    

Description Andy Grimm 2018-05-14 18:50:40 UTC
Transferring this from RHBZ#1576985

Description of problem:
The problem in the summary is because the version of s3transfer packaged right now is python-s3transfer-0.1.10-8.el7.noarch, whereas awscli is expecting 0.1.12; here is the requires.txt for the version of awscli packaged:

# cat /usr/lib/python2.7/site-packages/awscli-1.14.28-py2.7.egg-info/requires.txt 
botocore==1.8.32
colorama>=0.2.5,<=0.3.7
docutils>=0.10
rsa>=3.1.2,<=3.5.0
s3transfer>=0.1.12,<0.2.0
PyYAML>=3.10,<=3.12

And if you look at the Changelog for s3transfer, it's clear why 0.1.12 is needed:
https://github.com/boto/s3transfer/blob/develop/CHANGELOG.rst#0112

"enhancement:max_bandwidth: Add ability to set maximum bandwidth consumption for streaming of S3 uploads and downloads"

relevant commit (although this shouldn't be cherry-picked on its own):
https://github.com/boto/s3transfer/commit/61e387e361fe20c323f430970a22301906c90e8f



Version-Release number of selected component (if applicable):
python-s3transfer-0.1.10-8.el7.noarch
awscli-1.14.28-5.el7.noarch

How reproducible:
Always

Steps to Reproduce:
1. yum install awscli
2. aws s3 cp foo s3://bucket1/foo

Actual results:
__init__() got an unexpected keyword argument 'max_bandwidth'

Expected results:
Copy should succeed


Additional info:
If an update is not feasible, a patch would be sufficient:

$ diff -u  transferconfig.py.orig /usr/lib/python2.7/site-packages/awscli/customizations/s3/transferconfig.py
--- transferconfig.py.orig	2018-05-11 15:18:07.210978058 -0400
+++ /usr/lib/python2.7/site-packages/awscli/customizations/s3/transferconfig.py	2018-05-11 15:16:57.475659289 -0400
@@ -109,7 +109,7 @@
         'max_queue_size': 'max_request_queue_size',
         'multipart_threshold': 'multipart_threshold',
         'multipart_chunksize': 'multipart_chunksize',
-        'max_bandwidth': 'max_bandwidth',
+        # 'max_bandwidth': 'max_bandwidth',
     }
     kwargs = {}
     for key, value in runtime_config.items():

Comment 8 Kjetil Nygård 2018-06-20 05:14:57 UTC
Why has the progress on this one stopped?

Comment 9 AJ Zmudosky 2018-06-25 21:21:53 UTC
Echoing the previous comment, why is this stuck in QA?

The fix for the 7.4.z version in RHBA-2018:1760 was released nearly a month ago on 2018-05-29 (and the 7.4 EUS awscli package was released 7 days after RHEL 7.5 in RHEA-2018:1163).

This has an impact since EPEL deleted their version, so no downgrade is possible and causes issues with bootstrapping instances that need to retrieve data from S3.

Comment 10 Oyvind Albrigtsen 2018-06-27 07:46:22 UTC
Because this bz is targeted for 7.6.

The following bz is for backport to 7.5:
https://bugzilla.redhat.com/show_bug.cgi?id=1581138

Comment 13 errata-xmlrpc 2018-10-30 10:12:40 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHBA-2018:3123