View Issue Details

IDProjectCategoryView StatusLast Update
0015518CentOS-7awsclipublic2018-12-12 10:38
Reporterandrewn 
PrioritynormalSeverityminorReproducibilityalways
Status newResolutionopen 
Product Version 
Target VersionFixed in Version 
Summary0015518: awscli errors out on new python-s3transfer build
Descriptionawscli can't find botocore because python-s3transfer-0.1.13-1.el7.noarch puts its bundled deps in /usr/lib64/fence-agents/bundled but aws adds /usr/lib/fence-agents/bundled to sys.path.
Steps To Reproduce$ rpm -q awscli python-s3transfer
package awscli is not installed
package python-s3transfer is not installed
$ sudo yum install -y -q -e 1 awscli
$ rpm -q awscli python-s3transfer
awscli-1.14.28-5.el7_5.1.noarch
python-s3transfer-0.1.13-1.el7.noarch
$ aws
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 18, in <module>
    import botocore.session
ImportError: No module named botocore.session
Additional Information$ rpm -qf /usr/lib64/fence-agents/bundled/botocore/session.py
python-s3transfer-0.1.13-1.el7.noarch
$ grep -F sys.path /usr/lib/python2.7/site-packages/awscli/clidriver.py
sys.path.insert(0, '/usr/lib/fence-agents/bundled')
Tagsaws, python
abrt_hash
URL

Activities

pingram

pingram

2018-12-04 02:52

reporter   ~0033200

For extra points, this was taken from an 'older' working host:
$ rpm -q --whatprovides /usr/lib/fence-agents/bundled
python-s3transfer-0.1.10-8.el7.noarch

Work around hack for anyone encountering this issue who needs to get things working ASAP:

sed -i -e 's/\/lib\//\/lib64\//' /usr/lib/python2.7/site-packages/awscli/clidriver.py

And, the hack for everyone playing the puppet game:
exec {'patch-clidriver':
  command => "sed -i -e 's/\/lib\//\/lib64\//' /usr/lib/python2.7/site-packages/awscli/clidriver.py",
  onlyif => '[ $(grep -c lib64 /usr/lib/python2.7/site-packages/awscli/clidriver.py) -eq 0 ]',
  path => ['/usr/bin', '/usr/sbin'],
  require => Package['awscli']
}
thedot33

thedot33

2018-12-09 20:00

reporter   ~0033283

Same issue here, after applying the latest system updates via "yum update", the aws cli no longer works, can't backup our files.



# awscli-1.14.28-5.el7_5.1.noarch
# python-s3transfer-0.1.13-1.el7.noarch
 
# 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 18, in <module>
    import botocore.session
ImportError: No module named botocore.session
alexh

alexh

2018-12-11 06:03

reporter   ~0033307

This has also been killing our amazon auto scaling group bootstraps:
```
cloud-init: File "/usr/bin/aws", line 19, in <module>
cloud-init: import awscli.clidriver
cloud-init: File "/usr/lib/python2.7/site-packages/awscli/clidriver.py", line 18, in <module>
cloud-init: import botocore.session
cloud-init: ImportError: No module named botocore.session
cloud-init: + EC2_ASG=
cloud-init: ++ aws elb describe-load-balancers --region us-east-1
cloud-init: ++ jq -r '.LoadBalancerDescriptions[] | select(.Instances[].InstanceId == "i-XXX") | .LoadBalancerName '
cloud-init: Traceback (most recent call last):
cloud-init: File "/usr/bin/aws", line 19, in <module>
cloud-init: import awscli.clidriver
cloud-init: File "/usr/lib/python2.7/site-packages/awscli/clidriver.py", line 18, in <module>
```

Not the first time this year python/aws-cli has killed hosts :-(

Issue History

Date Modified Username Field Change
2018-12-03 21:19 andrewn New Issue
2018-12-04 02:52 pingram Note Added: 0033200
2018-12-09 20:00 thedot33 Note Added: 0033283
2018-12-09 20:00 thedot33 Tag Attached: aws
2018-12-09 20:03 thedot33 Tag Attached: python
2018-12-11 06:03 alexh Note Added: 0033307