awscli-1.14.28-5

General support questions
chrisdornan
Posts: 8
Joined: 2013/10/05 17:55:56

awscli-1.14.28-5

Postby chrisdornan » 2018/05/12 13:52:24

I am seeing this error on systems that have updated awscli-1.11.133-1.el7.noarch from epel to awscli-1.14.28-5.el7.noarch from base:

Code: Select all

Traceback (most recent call last):
  File "/usr/bin/aws", line 19, in <module>
    import awscli.clidriver
  File "/usr/lib/python2.7/site-packages/awscli/clidriver.py", line 25, in <module>
    from botocore.history import get_global_history_recorder
ImportError: No module named history


See https://github.com/aws/aws-cli/issues/2999 from the upstream issue tracker for context.

The solution I am adopting is to filter awscli from base on all of our systems. I recommend that anybody else using AWS services on CentOS check if they are affected by this.

User avatar
avij
Forum Moderator
Posts: 2451
Joined: 2010/12/01 19:25:52
Location: Helsinki, Finland
Contact:

Re: awscli-1.14.28-5

Postby avij » 2018/05/12 14:39:31

Upstream bug: https://bugzilla.redhat.com/show_bug.cgi?id=1576985

You may need to yum swap python2-s3transfer python-s3transfer to switch the packages. I have not used awscli myself, so I can't test this myself.

chrisdornan
Posts: 8
Joined: 2013/10/05 17:55:56

Re: awscli-1.14.28-5

Postby chrisdornan » 2018/05/12 16:30:20

Thanks, upstream discussion is most illuminating.

Until everyone (upstream/EPEL/Python Towers) start plot a path out of this mess I am inclined to just stick with EPEL for awscli.
Last edited by chrisdornan on 2018/05/12 17:12:43, edited 1 time in total.

chrisdornan
Posts: 8
Joined: 2013/10/05 17:55:56

Re: awscli-1.14.28-5

Postby chrisdornan » 2018/05/12 16:41:08

Just in case anybody else wants to do what I am doing, I am adding

Code: Select all

exclude=awscli

to the [base] section of /etc/yum.repos.d/CentOS-Base.repo

User avatar
TrevorH
Forum Moderator
Posts: 22590
Joined: 2009/09/24 10:40:56
Location: Brighton, UK

Re: awscli-1.14.28-5

Postby TrevorH » 2018/05/14 17:08:24

This problem is caused by awscli and its dependencies now being in the base repo. Part of those will install python-s3transfer as it is a Require:. However, EPEL ships python2-s3transfer and that also satisifies the dependency but does not work.

What you need to do is update to awscli from base then yum swap python2-s3transfer python-s3transfer . You should then be able to remove the unneeded EPEL dependencies that python2-s3transfer pulled in using yum remove python2-botocore python2-futures python2-jmespath

The issue has now been added to the CentOS 7.5 Release Notes which you can find on https://wiki.centos.org/Manuals/ReleaseNotes/CentOS7
CentOS 5 died in March 2017 - migrate NOW!
Full time Geek, part time moderator. Use the FAQ Luke

User avatar
avij
Forum Moderator
Posts: 2451
Joined: 2010/12/01 19:25:52
Location: Helsinki, Finland
Contact:

Re: awscli-1.14.28-5

Postby avij » 2018/05/14 19:44:35

EPEL packages python-colorama and python2-rsa may also be unneeded after switching to the CentOS version of awscli. I would suggest removing the unneeded packages to prevent issues in the future. This is assuming you don't need these packages for some other non-AWS task.

User avatar
TrevorH
Forum Moderator
Posts: 22590
Joined: 2009/09/24 10:40:56
Location: Brighton, UK

Re: awscli-1.14.28-5

Postby TrevorH » 2018/05/14 21:02:48

You may also want to read https://bugzilla.redhat.com/show_bug.cgi?id=1578083 for another related bug. The version of awscli from base appears to require a newer python-s3transfer than either RHEL or EPEL provide and it's necessary to edit a file and comment a line out to make it work!
CentOS 5 died in March 2017 - migrate NOW!
Full time Geek, part time moderator. Use the FAQ Luke

chrisdornan
Posts: 8
Joined: 2013/10/05 17:55:56

Re: awscli-1.14.28-5

Postby chrisdornan » 2018/05/16 12:49:19

Thanks for this -- I am being bitten by 1578083 but because the working package has been taken out of EPEL I am now having to patch 1.14 as instructed.

I am astonished to see existing EPEL users being burned in this way (by others) but the assistance here has been awesome, without which this situation would be seriously stressful. Thanks!